aboutsummaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2017-11-23 13:26:40 +0100
committerJérôme Forissier <jerome.forissier@linaro.org>2017-11-24 10:02:55 +0100
commita3f02fb35f3d2fd8fcc6696bd3074e47eb1c7d6c (patch)
tree7f5af2c769fcc3dd0038731122ad4cf1cf44e717 /documentation
parentc2ff5ecf3773e486546a22922340658240e98e92 (diff)
Documentation: update description of platform conf.mk
The content of plat-xxx/conf.mk has changed a bit since the documentation was written. Therefore, remove the inline example, explain the main things that should appear in conf.mk, and link to an example (plat-hikey/conf.mk). Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/porting_guidelines.md53
1 files changed, 13 insertions, 40 deletions
diff --git a/documentation/porting_guidelines.md b/documentation/porting_guidelines.md
index 3e56250a..01ccb728 100644
--- a/documentation/porting_guidelines.md
+++ b/documentation/porting_guidelines.md
@@ -54,46 +54,17 @@ core/arch/arm/plat-gendev
##### conf.mk
This is the device specific makefile where you define configurations unique to
-your platform. Add good start for a new platform would be:
-```Makefile
-PLATFORM_FLAVOR ?= gendev-flav
-PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y
-
-# 32-bit flags
-arm32-platform-cpuarch := cortex-a15
-arm32-platform-cflags += -mcpu=$(arm32-platform-cpuarch)
-arm32-platform-aflags += -mcpu=$(arm32-platform-cpuarch)
-arm32-platform-aflags += -mfpu=neon
-
-# Running 32-bit core?
-CFG_ARM32_core ?= y
-ta-targets = ta_arm32
-
-# How many threads are enabled in TEE core
-CFG_NUM_THREADS ?= 4
-
-# What kind of UART should be used?
-CFG_8250_UART ?= y
-#CFG_PL011 ?= y
-
-# Enable power management stubs
-CFG_PM_STUBS := y
-
-# Use the generic boot
-CFG_GENERIC_BOOT := y
-
-# Enable internal tests by default
-CFG_TEE_CORE_EMBED_INTERNAL_TESTS ?= y
-
-# User software random number generator
-CFG_WITH_SOFTWARE_PRNG ?= y
-
-# Does the device support crypto extensions?
-CFG_CRYPTO_WITH_CE ?= n
-```
-There are probably quite a few other flags that could be useful or even
-necessary. Please refer to the other `conf.mk` file in the already existing
-platforms.
+your platform. This mainly comprises two things:
+- OP-TEE configuration variables (`CFG_`), which may be assigned values in two
+ways. `CFG_FOO ?= bar` should be used to provide a default value that may be
+modified at compile time. On the other hand, variables that must be set to some
+value and cannot be modified should be set by: `$(call force,CFG_FOO,bar)`.
+- Compiler flags for the TEE core, the user mode libraries and the Trusted
+Applications, which may be added to macros used by the build system. Please see
+[Platform-specific configuration and flags] in the build system documentation.
+
+It is recommended to use a existing platform configuration file as a starting
+point. For instance, [core/arch/arm/plat-hikey/conf.mk].
##### main.c
This platform specific file will contain power management handlers and code
@@ -377,3 +348,5 @@ happen has not been decided yet.
[TZC-380]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0431c/index.html
[TZC-400]: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.100325_0001_02_en/index.html
[travis]: ../.travis.yml
+[Platform-specific configuration and flags]: build_system.md#platform-specific-configuration-and-flags
+[core/arch/arm/plat-hikey/conf.mk]: ../core/arch/arm/plat-hikey/conf.mk