xref: /optee_os/mk/config.mk (revision b5569a68c7ef6c8fd593d561f85c6d944daeb1ca)
1120c43adSJerome Forissier# Default configuration values for OP-TEE core (all platforms).
2120c43adSJerome Forissier#
3120c43adSJerome Forissier# Platform-specific overrides are in core/arch/arm32/plat-*/conf.mk.
4120c43adSJerome Forissier# Some subsystem-specific defaults are not here but rather in */sub.mk.
5120c43adSJerome Forissier#
6120c43adSJerome Forissier# Configuration values may be assigned from multiple sources.
7120c43adSJerome Forissier# From higher to lower priority:
8120c43adSJerome Forissier#
9120c43adSJerome Forissier#   1. Make arguments ('make CFG_FOO=bar...')
10120c43adSJerome Forissier#   2. The file specified by $(CFG_OPTEE_CONFIG) (if defined)
11120c43adSJerome Forissier#   3. The environment ('CFG_FOO=bar make...')
12120c43adSJerome Forissier#   4. The platform-specific configuration file: core/arch/arm32/plat-*/conf.mk
13120c43adSJerome Forissier#   5. This file
14120c43adSJerome Forissier#   6. Subsystem-specific makefiles (*/sub.mk)
15120c43adSJerome Forissier#
16*b5569a68SPascal Brand# Actual values used during the build are output to $(out-dir)/conf.mk
17120c43adSJerome Forissier# (CFG_* variables only).
18120c43adSJerome Forissier
19a75f2e14SJerome Forissier# Cross-compiler prefix and suffix
20a75f2e14SJerome ForissierCROSS_COMPILE ?= arm-linux-gnueabihf-
21a75f2e14SJerome ForissierCOMPILER ?= gcc
22a75f2e14SJerome Forissier
23120c43adSJerome Forissier# Compiler warning level.
24120c43adSJerome Forissier# Supported values: undefined, 1, 2 and 3. 3 gives more warnings.
25b0104773SPascal BrandWARNS ?= 3
26b0104773SPascal Brand
27b0104773SPascal Brand# Define NOWERROR=1 so that warnings are not treated as errors
28b0104773SPascal Brand# NOWERROR=1
29b0104773SPascal Brand
30b0104773SPascal Brand# Define DEBUG=1 to compile with -g option
31b0104773SPascal Brand# DEBUG=1
32b0104773SPascal Brand
33b0104773SPascal Brand# If 1, debug mode of the tee firmware (CPU restart, Core Status)
3431908aeaSPascal BrandCFG_TEE_CORE_DEBUG ?= 0
35b0104773SPascal Brand
36e0042c88SPascal Brand# Max level of the tee core traces. 0 means disable, 4 is max.
37e0042c88SPascal Brand# Supported values: 0 (no traces) to 4 (all traces)
38b0104773SPascal Brand# If CFG_TEE_DRV_DEBUGFS is set, the level of traces to print can be
39b0104773SPascal Brand# dynamically changes via debugfs in the range 1 => CFG_TEE_CORE_LOG_LEVEL
40e0042c88SPascal BrandCFG_TEE_CORE_LOG_LEVEL ?= 1
41b0104773SPascal Brand
42b0104773SPascal Brand# TA and TEECore log level
43e0042c88SPascal Brand# Supported values: 0 (no traces) to 4 (all traces)
44b0104773SPascal Brand# If CFG_TEE_DRV_DEBUGFS is set, the level of traces to print can be
45b0104773SPascal Brand# dynamically changes via debugfs in the range 1 => CFG_TEE_TA_LOG_LEVEL
46e0042c88SPascal BrandCFG_TEE_TA_LOG_LEVEL ?= 1
47b0104773SPascal Brand
487c876f12SPascal Brand# TA enablement
497c876f12SPascal Brand# When defined to "y", TA traces are output according to
507c876f12SPascal Brand# CFG_TEE_TA_LOG_LEVEL. Otherwise, they are not output at all
517c876f12SPascal BrandCFG_TEE_CORE_TA_TRACE ?= y
52b0104773SPascal Brand
5394e8a4fcSJens Wiklander# Define TEE_Panic as a macro to help debugging panics caused by calls to
5494e8a4fcSJens Wiklander# TEE_Panic. This flag can have a different value when later compiling the
5594e8a4fcSJens Wiklander# TA
5694e8a4fcSJens WiklanderCFG_TEE_PANIC_DEBUG ?= y
5794e8a4fcSJens Wiklander
58120c43adSJerome Forissier# If 1, enable debug features in TA memory allocation.
59120c43adSJerome Forissier# Debug features include check of buffer overflow, statistics, mark/check heap
60120c43adSJerome Forissier# feature.
61b0104773SPascal BrandCFG_TEE_CORE_USER_MEM_DEBUG ?= 1
627018ae01SSY Chiu
630fcbddd4SSY Chiu# If y, enable memory leak detection feature in bget memory allocator.
640fcbddd4SSY ChiuCFG_TEE_CORE_MALLOC_DEBUG ?= n
650fcbddd4SSY ChiuCFG_TEE_TA_MALLOC_DEBUG ?= n
660fcbddd4SSY Chiu
67120c43adSJerome Forissier# PRNG configuration
687018ae01SSY Chiu# If CFG_WITH_SOFTWARE_PRNG is enabled, crypto provider provided
697018ae01SSY Chiu# software PRNG implementation is used.
707018ae01SSY Chiu# Otherwise, you need to implement hw_get_random_byte() for your platform
717018ae01SSY ChiuCFG_WITH_SOFTWARE_PRNG ?= y
72120c43adSJerome Forissier
73120c43adSJerome Forissier# Number of threads
74120c43adSJerome ForissierCFG_NUM_THREADS ?= 2
75ab35d7adSCedric Chaumont
76ab35d7adSCedric Chaumont# API implementation version
77ab35d7adSCedric ChaumontCFG_TEE_API_VERSION ?= GPD-1.1-dev
78ab35d7adSCedric Chaumont
79ab35d7adSCedric Chaumont# Implementation description (implementation-dependent)
80ab35d7adSCedric ChaumontCFG_TEE_IMPL_DESCR ?= OPTEE
81ab35d7adSCedric Chaumont
82ab35d7adSCedric Chaumont# Trusted OS implementation version
834bf425c1SJens WiklanderTEE_IMPL_VERSION ?= $(shell git describe --always --dirty=-dev 2>/dev/null || echo Unknown)
84ab35d7adSCedric Chaumont
85ab35d7adSCedric Chaumont# Trusted OS implementation manufacturer name
86ab35d7adSCedric ChaumontCFG_TEE_MANUFACTURER ?= LINARO
87ab35d7adSCedric Chaumont
88ab35d7adSCedric Chaumont# Trusted firmware version
89ab35d7adSCedric ChaumontCFG_TEE_FW_IMPL_VERSION ?= FW_IMPL_UNDEF
90ab35d7adSCedric Chaumont
91ab35d7adSCedric Chaumont# Trusted OS implementation manufacturer name
92ab35d7adSCedric ChaumontCFG_TEE_FW_MANUFACTURER ?= FW_MAN_UNDEF
93ab35d7adSCedric Chaumont
94a8224611SJames Kung# Encrypted File System Support
95c7856574SJames KungCFG_ENC_FS ?= y
96bc420748SJens Wiklander
972ab7da0fSSY Chiu# File System Block Cache Support
982ab7da0fSSY ChiuCFG_FS_BLOCK_CACHE ?= n
992ab7da0fSSY Chiu
100bc420748SJens Wiklander# Embed public part of this key in OP-TEE OS
101bc420748SJens WiklanderTA_SIGN_KEY ?= keys/default_ta.pem
102c4553de7SJerome Forissier
103c4553de7SJerome Forissier# Include lib/libutils/isoc in the build? Most platforms need this, but some
104c4553de7SJerome Forissier# may not because they obtain the isoc functions from elsewhere
105c4553de7SJerome ForissierCFG_LIBUTILS_WITH_ISOC ?= y
106fce4cfa1SJens Wiklander
107fce4cfa1SJens Wiklander# Floating point support for TAs default on only for arm32 core
108fce4cfa1SJens WiklanderCFG_TA_FLOAT_SUPPORT ?= $(CFG_ARM32_core)
109