blob: 88154662e520c32d21d0d0bf8c2e7e9426d285b8 [file] [log] [blame]
Jimmy Brissonff08d3e2020-04-02 15:19:27 -05001Build Options Summary
2=====================
Jimmy Brisson0862f012020-04-02 15:19:12 -05003
Jimmy Brissonff08d3e2020-04-02 15:19:27 -05004As far as possible, TF-A Tests dynamically detects the platform hardware
Jimmy Brisson0862f012020-04-02 15:19:12 -05005components and available features. There are a few build options to select
Jimmy Brissonff08d3e2020-04-02 15:19:27 -05006specific features where the dynamic detection falls short.
Jimmy Brisson0862f012020-04-02 15:19:12 -05007
8Unless mentioned otherwise, these options are expected to be specified at the
9build command line and are not to be modified in any component makefiles.
10
Jimmy Brissonff08d3e2020-04-02 15:19:27 -050011.. note::
12 The build system doesn't track dependencies for build options. Therefore, if
13 any of the build options are changed from a previous build, a clean build
14 must be performed.
Jimmy Brisson0862f012020-04-02 15:19:12 -050015
Jimmy Brissonff08d3e2020-04-02 15:19:27 -050016Common (Shared) Build Options
17-----------------------------
Jimmy Brisson0862f012020-04-02 15:19:12 -050018
19Most of the build options listed in this section apply to TFTF, the FWU test
20images and Cactus, unless otherwise specified. These do not influence the EL3
21payload, whose simplistic build system is mostly independent.
22
23- ``ARCH``: Choose the target build architecture for TF-A Tests. It can take
24 either ``aarch64`` or ``aarch32`` as values. By default, it is defined to
25 ``aarch64``. Not all test images support this build option.
26
27- ``ARM_ARCH_MAJOR``: The major version of Arm Architecture to target when
28 compiling TF-A Tests. Its value must be numeric, and defaults to 8.
29
30- ``ARM_ARCH_MINOR``: The minor version of Arm Architecture to target when
31 compiling TF-A Tests. Its value must be a numeric, and defaults to 0.
32
Alexei Fedorov7fac1622020-06-19 14:25:43 +010033- ``BRANCH_PROTECTION``: Numeric value to enable ARMv8.3 Pointer Authentication
34 (``ARMv8.3-PAuth``) and ARMv8.5 Branch Target Identification (``ARMv8.5-BTI``)
35 support in the Trusted Firmware-A Test Framework itself.
36 If enabled, it is needed to use a compiler that supports the option
37 ``-mbranch-protection`` (GCC 9 and later).
38 Selects the branch protection features to use:
39- 0: Default value turns off all types of branch protection
40- 1: Enables all types of branch protection features
41- 2: Return address signing to its standard level
42- 3: Extend the signing to include leaf functions
43- 4: Turn on branch target identification mechanism
44
45 The table below summarizes ``BRANCH_PROTECTION`` values, GCC compilation
46 options and resulting PAuth/BTI features.
47
48 +-------+--------------+-------+-----+
49 | Value | GCC option | PAuth | BTI |
50 +=======+==============+=======+=====+
51 | 0 | none | N | N |
52 +-------+--------------+-------+-----+
53 | 1 | standard | Y | Y |
54 +-------+--------------+-------+-----+
55 | 2 | pac-ret | Y | N |
56 +-------+--------------+-------+-----+
57 | 3 | pac-ret+leaf | Y | N |
58 +-------+--------------+-------+-----+
59 | 4 | bti | N | Y |
60 +-------+--------------+-------+-----+
61
62 This option defaults to 0 and this is an experimental feature.
63
Jimmy Brisson0862f012020-04-02 15:19:12 -050064- ``DEBUG``: Chooses between a debug and a release build. A debug build
65 typically embeds assertions checking the validity of some assumptions and its
66 output is more verbose. The option can take either 0 (release) or 1 (debug)
67 as values. 0 is the default.
68
69- ``ENABLE_ASSERTIONS``: This option controls whether calls to ``assert()`` are
70 compiled out.
71
72 - For debug builds, this option defaults to 1, and calls to ``assert()`` are
73 compiled in.
74 - For release builds, this option defaults to 0 and calls to ``assert()``
75 are compiled out.
76
77 This option can be set independently of ``DEBUG``. It can also be used to
78 hide any auxiliary code that is only required for the assertion and does not
79 fit in the assertion itself.
80
81- ``LOG_LEVEL``: Chooses the log level, which controls the amount of console log
82 output compiled into the build. This should be one of the following:
83
84 ::
85
86 0 (LOG_LEVEL_NONE)
87 10 (LOG_LEVEL_ERROR)
88 20 (LOG_LEVEL_NOTICE)
89 30 (LOG_LEVEL_WARNING)
90 40 (LOG_LEVEL_INFO)
91 50 (LOG_LEVEL_VERBOSE)
92
93 All log output up to and including the selected log level is compiled into
94 the build. The default value is 40 in debug builds and 20 in release builds.
95
96- ``PLAT``: Choose a platform to build TF-A Tests for. The chosen platform name
97 must be a subdirectory of any depth under ``plat/``, and must contain a
98 platform makefile named ``platform.mk``. For example, to build TF-A Tests for
99 the Arm Juno board, select ``PLAT=juno``.
100
101- ``V``: Verbose build. If assigned anything other than 0, the build commands
102 are printed. Default is 0.
103
Alexei Fedorov7cc25872020-06-02 16:35:36 +0100104Arm FVP Platform Specific Build Options
105---------------------------------------
106
107- ``FVP_CLUSTER_COUNT`` : Configures the cluster count to be used to build the
108 topology tree within TFTF. By default TFTF is configured for dual cluster for
109 CPUs with single thread (ST) and single cluster for SMT CPUs.
110 For ST CPUs this option can be used to override the default number of clusters
111 with a value in the range 1-4.
112
113- ``FVP_MAX_CPUS_PER_CLUSTER``: Sets the maximum number of CPUs implemented in
114 a single cluster. This option defaults to the maximum value of 4 for ST CPUs
115 and maximum value of 8 for SMT CPUs.
116
117- ``FVP_MAX_PE_PER_CPU``: Sets the maximum number of PEs implemented on any CPU
118 in the system. This option defaults to 1 to select ST CPUs. For platforms with
119 SMT CPUs this value must be set to 2.
120
Jimmy Brissonff08d3e2020-04-02 15:19:27 -0500121TFTF-specific Build Options
122---------------------------
Jimmy Brisson0862f012020-04-02 15:19:12 -0500123
Jimmy Brisson0862f012020-04-02 15:19:12 -0500124- ``NEW_TEST_SESSION``: Choose whether a new test session should be started
125 every time or whether the framework should determine whether a previous
126 session was interrupted and resume it. It can take either 1 (always
127 start new session) or 0 (resume session as appropriate). 1 is the default.
128
129- ``TESTS``: Set of tests to run. Use the following command to list all
130 possible sets of tests:
131
132 ::
133
134 make help_tests
135
136 If no set of tests is specified, the standard tests will be selected (see
137 ``tftf/tests/tests-standard.xml``).
138
139- ``USE_NVM``: Used to select the location of test results. It can take either 0
140 (RAM) or 1 (non-volatile memory like flash) as test results storage. Default
141 value is 0, as writing to the flash significantly slows tests down.
142
Jimmy Brissonff08d3e2020-04-02 15:19:27 -0500143FWU-specific Build Options
144--------------------------
Jimmy Brisson0862f012020-04-02 15:19:12 -0500145
146- ``FIRMWARE_UPDATE``: Whether the Firmware Update test images (i.e.
147 ``NS_BL1U`` and ``NS_BL2U``) should be built. The default value is 0. The
148 platform makefile is free to override this value if Firmware Update is
149 supported on this platform.
Jimmy Brissonff08d3e2020-04-02 15:19:27 -0500150
151--------------
152
Alexei Fedorov7cc25872020-06-02 16:35:36 +0100153*Copyright (c) 2019-2020, Arm Limited. All rights reserved.*