blob: 54519843d531f1fba22e5a7f717c22d4658407bb [file] [log] [blame]
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Yann Gautier773c5502022-03-10 17:24:47 +01003# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
Fathi Boudra422bf772019-12-02 11:10:16 +02004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8#
9# This script builds the TF in different configs.
10# Rather than telling cov-build to build TF using a simple 'make all' command,
11# the goal here is to combine several build flags to analyse more of our source
12# code in a single 'build'. The Coverity Scan service does not have the notion
13# of separate types of build - there is just one linear sequence of builds in
14# the project history.
15#
16
17# Bail out as soon as an error is encountered.
18set -e
19
20TF_SOURCES=$1
21if [ ! -d "$TF_SOURCES" ]; then
22 echo "ERROR: '$TF_SOURCES' does not exist or is not a directory"
23 echo "Usage: $(basename "$0") <trusted-firmware-directory>"
24 exit 1
25fi
26
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050027containing_dir="$(readlink -f "$(dirname "$0")/")"
28. $containing_dir/common-def.sh
29
Fathi Boudra422bf772019-12-02 11:10:16 +020030# Get mbed TLS library code to build Trusted Firmware with Trusted Board Boot
31# support. The version of mbed TLS to use here must be the same as when
32# building TF in the usual context.
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050033if [ ! -d "$MBED_TLS_DIR" ]; then
34 git clone -q --depth 1 -b "$MBED_TLS_SOURCES_TAG" "$MBED_TLS_URL_REPO" "$MBED_TLS_DIR"
Fathi Boudra422bf772019-12-02 11:10:16 +020035fi
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050036
Fathi Boudra422bf772019-12-02 11:10:16 +020037cd "$TF_SOURCES"
38
39# Clean TF source dir to make sure we don't analyse temporary files.
40make distclean
41
42#
43# Build TF in different configurations to get as much coverage as possible
44#
45
Fathi Boudra422bf772019-12-02 11:10:16 +020046#
47# FVP platform
48# We'll use the following flags for all FVP builds.
49#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050050fvp_common_flags="$(common_flags) PLAT=fvp"
Fathi Boudra422bf772019-12-02 11:10:16 +020051
52# Try all possible SPDs.
53clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd
54clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd TSP_INIT_ASYNC=1 \
55 TSP_NS_INTR_ASYNC_PREEMPT=1
56clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=opteed
57clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tlkd
Florian Lugou70a76c02022-03-25 09:51:42 +010058clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=pncd SPD_PNCD_NS_IRQ=126 SPD_PNCD_S_IRQ=15
Fathi Boudra422bf772019-12-02 11:10:16 +020059
Zelalemc9531f82020-08-04 15:37:08 -050060# Dualroot chain of trust.
61clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tspd COT=dualroot
62
laurenw-armf48e9d22022-04-22 11:30:13 -050063# FEAT_RME with CCA chain of trust.
64clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tspd USE_ROMLIB=1 ENABLE_RME=1 MEASURED_BOOT=1
65
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050066clean_build $fvp_common_flags SPD=trusty
67clean_build $fvp_common_flags SPD=trusty TRUSTY_SPD_WITH_GENERIC_SERVICES=1
Fathi Boudra422bf772019-12-02 11:10:16 +020068
69# SDEI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050070clean_build $fvp_common_flags SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Fathi Boudra422bf772019-12-02 11:10:16 +020071
Zelalemc9531f82020-08-04 15:37:08 -050072# SDEI with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050073clean_build $fvp_common_flags SDEI_IN_FCONF=1 SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Zelalemc9531f82020-08-04 15:37:08 -050074
Zelalem4f3633e2021-06-18 11:53:47 -050075# PCI Service
76clean_build $fvp_common_flags SMC_PCI_SUPPORT=1
77
Zelalemc9531f82020-08-04 15:37:08 -050078# Secure interrupt descriptors with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050079clean_build $fvp_common_flags SEC_INT_DESC_IN_FCONF=1
Zelalemc9531f82020-08-04 15:37:08 -050080
Fathi Boudra422bf772019-12-02 11:10:16 +020081# Without coherent memory
82clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd USE_COHERENT_MEM=0
83
84# Using PSCI extended State ID format rather than the original format
85clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd PSCI_EXTENDED_STATE_ID=1 \
86 ARM_RECOM_STATE_ID_ENC=1
87
88# Alternative boot flows (This changes some of the platform initialisation code)
89clean_build $fvp_common_flags EL3_PAYLOAD=0x80000000
90clean_build $fvp_common_flags PRELOADED_BL33_BASE=0x80000000
91
92# Using the SP804 timer instead of the Generic Timer
93clean_build $fvp_common_flags FVP_USE_SP804_TIMER=1
94
95# Using the CCN driver and multi cluster topology
96clean_build $fvp_common_flags FVP_CLUSTER_COUNT=4
97
98# PMF
99clean_build $fvp_common_flags ENABLE_PMF=1
100
101# stack protector
102clean_build $fvp_common_flags ENABLE_STACK_PROTECTOR=strong
103
104# AArch32 build
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500105clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200106 ARCH=aarch32 AARCH32_SP=sp_min \
107 RESET_TO_SP_MIN=1 PRELOADED_BL33_BASE=0x80000000
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500108clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200109 ARCH=aarch32 AARCH32_SP=sp_min
110
111# Xlat tables lib version 1 (AArch64 and AArch32)
112clean_build $fvp_common_flags ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500113clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200114 ARCH=aarch32 AARCH32_SP=sp_min ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
115
Zelalemc9531f82020-08-04 15:37:08 -0500116# SPM support based on Management Mode Interface Specification
Manish Pandeyaa9a03b2021-11-17 10:03:17 +0000117clean_build $fvp_common_flags SPM_MM=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0
Fathi Boudra422bf772019-12-02 11:10:16 +0200118
Zelalemc9531f82020-08-04 15:37:08 -0500119# SPM support with TOS(optee) as SPM sitting at S-EL1
120clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0
121
Shruti Gupta8cc89b92022-08-09 12:23:46 +0100122# SPM support with SPM at EL3 and TSP at S-EL1
123clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 CTX_INCLUDE_EL2_REGS=0 EL3_EXCEPTION_HANDLING=0 \
124 SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1 \
125 ARM_SPMC_MANIFEST_DTS=plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts
126
Zelalemc9531f82020-08-04 15:37:08 -0500127# SPM support with Secure hafnium as SPM sitting at S-EL2
128# SP_LAYOUT_FILE is used only during FIP creation but build won't progress
129# if we have NULL value to it, so passing a dummy string.
130clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=1 ARM_ARCH_MINOR=4 \
Max Shvetsov44d2a702021-02-18 16:41:45 +0000131 CTX_INCLUDE_EL2_REGS=1 SP_LAYOUT_FILE=dummy
Fathi Boudra422bf772019-12-02 11:10:16 +0200132
Marc Bonnici502fdaa2022-01-10 12:38:23 +0000133# SPM support with SPM sitting at EL3
134clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1
135
Fathi Boudra422bf772019-12-02 11:10:16 +0200136#BL2 at EL3 support
137clean_build $fvp_common_flags BL2_AT_EL3=1
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500138clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200139 ARCH=aarch32 AARCH32_SP=sp_min BL2_AT_EL3=1
140
Zelalemc9531f82020-08-04 15:37:08 -0500141# RAS Extension Support
142clean_build $fvp_common_flags EL3_EXCEPTION_HANDLING=1 \
143 FAULT_INJECTION_SUPPORT=1 HANDLE_EA_EL3_FIRST=1 RAS_EXTENSION=1 \
144 SDEI_SUPPORT=1
145
146# Hardware Assisted Coherency(DynamIQ)
147clean_build $fvp_common_flags FVP_CLUSTER_COUNT=1 FVP_MAX_CPUS_PER_CLUSTER=8 \
148 HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0
149
150# Pointer Authentication Support
151clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 \
152 ARM_ARCH_MINOR=5 EL3_EXCEPTION_HANDLING=1 BRANCH_PROTECTION=1 SDEI_SUPPORT=1 SPD=tspd TSP_NS_INTR_ASYNC_PREEMPT=1
153
154# Undefined Behaviour Sanitizer
155# Building with UBSAN SANITIZE_UB=on increases the executable size.
156# Hence it is only properly supported in bl31 with RESET_TO_BL31 enabled
157make $fvp_common_flags clean
158make $fvp_common_flags SANITIZE_UB=on RESET_TO_BL31=1 bl31
159
160# debugfs feature
161clean_build $fvp_common_flags DEBUG=1 USE_DEBUGFS=1
162
163# MPAM feature
164clean_build $fvp_common_flags ENABLE_MPAM_FOR_LOWER_ELS=1
165
166# Using GICv3.1 driver with extended PPI and SPI range
167clean_build $fvp_common_flags GIC_EXT_INTID=1
168
169# Using GICv4 features with extended PPI and SPI range
170clean_build $fvp_common_flags GIC_ENABLE_V4_EXTN=1 GIC_EXT_INTID=1
171
Alexei Fedorov20fdf502020-07-27 17:36:38 +0100172# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500173clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} MBOOT_EL_HASH_ALG=sha256 MEASURED_BOOT=1 USE_ROMLIB=1
Alexei Fedorov20fdf502020-07-27 17:36:38 +0100174
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100175# CoT descriptors in device tree
Manish V Badarkhe81102d12020-10-05 08:02:30 +0100176clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 USE_ROMLIB=1
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100177
Manish V Badarkhe107c8e32021-08-02 19:49:32 +0100178# PSA FWU support
179clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_GPT_SUPPORT=1 PSA_FWU_SUPPORT=1 USE_ROMLIB=1
180
johpow01153c8b22021-11-03 14:38:36 -0500181# SME and HCX features
182clean_build $fvp_common_flags ENABLE_SME_FOR_NS=1 ENABLE_FEAT_HCX=1
183
Jayanth Dodderi Chidanand84da1962022-04-11 11:38:44 +0100184# Architectural Feature Detection mechanism
185clean_build $fvp_common_flags FEATURE_DETECTION=1
186
Fathi Boudra422bf772019-12-02 11:10:16 +0200187#
188# Juno platform
189# We'll use the following flags for all Juno builds.
190#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500191juno_common_flags="$(common_flags) PLAT=juno"
Fathi Boudra422bf772019-12-02 11:10:16 +0200192clean_build $juno_common_flags SPD=tspd ${ARM_TBB_OPTIONS}
193clean_build $juno_common_flags EL3_PAYLOAD=0x80000000
Madhukar Pappireddydcb31f62021-05-06 11:36:36 -0500194clean_build $juno_common_flags ENABLE_STACK_PROTECTOR=strong ARM_ETHOSN_NPU_DRIVER=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200195clean_build $juno_common_flags CSS_USE_SCMI_SDS_DRIVER=0
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500196
Leonardo Sandoval5163b562020-11-20 17:17:59 -0600197clean_build $juno_common_flags SPD=tspd ${ARM_TBB_OPTIONS} ARM_CRYPTOCELL_INTEG=1 CCSBROM_LIB_PATH=${CRYPTOCELL_LIB_PATH} KEY_SIZE=2048
Fathi Boudra422bf772019-12-02 11:10:16 +0200198
199#
200# System Guidance for Infrastructure platform SGI575
Zelalemc9531f82020-08-04 15:37:08 -0500201# Enable build config with RAS_EXTENSION to cover more files
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500202make $(common_flags) PLAT=sgi575 ${ARM_TBB_OPTIONS} EL3_EXCEPTION_HANDLING=1 FAULT_INJECTION_SUPPORT=1 \
Manish Pandeyaa9a03b2021-11-17 10:03:17 +0000203 HANDLE_EA_EL3_FIRST=1 RAS_EXTENSION=1 SDEI_SUPPORT=1 SPM_MM=1 ENABLE_SVE_FOR_NS=0 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200204
205#
Vijayenthiran Subramaniam2a47a6d2020-07-22 14:16:58 +0530206# System Guidance for Infrastructure platform RD-N1-Edge-Dual
Fathi Boudra422bf772019-12-02 11:10:16 +0200207#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500208make $(common_flags) PLAT=rdn1edge CSS_SGI_CHIP_COUNT=2 ${ARM_TBB_OPTIONS} all
Fathi Boudra422bf772019-12-02 11:10:16 +0200209
210#
211# System Guidance for Infrastructure platform RD-E1Edge
212#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500213make $(common_flags) PLAT=rde1edge ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500214
215#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530216# Reference Design platform RD-V1
Zelalemc9531f82020-08-04 15:37:08 -0500217#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530218make $(common_flags) PLAT=rdv1 ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500219
220#
Aditya Angadi61c54762021-01-04 09:30:52 +0530221# Reference Design platform RD-V1-MC
Zelalemc9531f82020-08-04 15:37:08 -0500222#
Aditya Angadi61c54762021-01-04 09:30:52 +0530223make $(common_flags) PLAT=rdv1mc ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=4 all
Zelalemc9531f82020-08-04 15:37:08 -0500224
225#
Vijayenthiran Subramaniama66de332020-11-23 14:20:14 +0530226# Reference Design Platform RD-N2
227#
228make $(common_flags) PLAT=rdn2 ${ARM_TBB_OPTIONS} all
229
230#
Zelalemc9531f82020-08-04 15:37:08 -0500231# Neoverse N1 SDP platform
232#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500233make $(common_flags) PLAT=n1sdp ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500234
235#
236# FVP VE platform
237#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500238make $(common_flags) PLAT=fvp_ve AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500239 CROSS_COMPILE=arm-none-eabi- ARM_ARCH_MAJOR=7 \
240 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
241 FVP_HW_CONFIG_DTS=fdts/fvp-ve-Cortex-A5x1.dts all
242
243#
244# A5 DesignStart Platform
245#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500246make $(common_flags) PLAT=a5ds AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500247 ARM_ARCH_MAJOR=7 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
248 CROSS_COMPILE=arm-none-eabi- FVP_HW_CONFIG_DTS=fdts/a5ds.dts
249
250#
251# Corstone700 Platform
252#
253
254corstone700_common_flags="CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500255 $(common_flags) \
Zelalemc9531f82020-08-04 15:37:08 -0500256 PLAT=corstone700 \
257 ARCH=aarch32 \
258 RESET_TO_SP_MIN=1 \
259 AARCH32_SP=sp_min \
260 ARM_LINUX_KERNEL_AS_BL33=0 \
261 ARM_PRELOADED_DTB_BASE=0x80400000 \
262 ENABLE_PIE=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500263 ENABLE_STACK_PROTECTOR=all \
264 all"
265
266echo "Info: Building Corstone700 FVP ..."
267
268make TARGET_PLATFORM=fvp ${corstone700_common_flags}
269
270echo "Info: Building Corstone700 FPGA ..."
271
272make TARGET_PLATFORM=fpga ${corstone700_common_flags}
273
274#
275# Arm internal FPGA port
276#
Andre Przywara13361b62022-04-26 11:16:55 +0100277make PLAT=arm_fpga $(common_flags release) \
278 FPGA_PRELOADED_DTB_BASE=0x88000000 PRELOADED_BL33_BASE=0x82080000 all
Zelalemc9531f82020-08-04 15:37:08 -0500279
280#
Usama Arifcba711d2021-08-04 15:53:42 +0100281# Total Compute platforms
Zelalemc9531f82020-08-04 15:37:08 -0500282#
Usama Arifcba711d2021-08-04 15:53:42 +0100283make $(common_flags) PLAT=tc TARGET_PLATFORM=0 ${ARM_TBB_OPTIONS} all
284make $(common_flags) PLAT=tc TARGET_PLATFORM=1 ${ARM_TBB_OPTIONS} all
Rupinderjit Singh385f17d2022-07-18 20:28:10 +0100285make $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} all
Fathi Boudra422bf772019-12-02 11:10:16 +0200286
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530287#
288# Morello platform
289#
Chandni Cherukuricbd45962021-12-12 13:37:33 +0530290clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=fvp ${ARM_TBB_OPTIONS}
291clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=soc ${ARM_TBB_OPTIONS}
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530292
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100293#
Vishnu Banavath2cb72b32022-01-20 14:27:55 +0000294# corstone1000 Platform
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100295#
296
297make $(common_flags) \
Vishnu Banavath2cb72b32022-01-20 14:27:55 +0000298 PLAT=corstone1000 \
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100299 SPD=spmd \
300 TARGET_PLATFORM=fpga \
301 ENABLE_STACK_PROTECTOR=strong \
302 ENABLE_PIE=1 \
303 BL2_AT_EL3=1 \
304 SPMD_SPM_AT_SEL2=0 \
305 ${ARM_TBB_OPTIONS} \
306 CREATE_KEYS=1 \
307 COT=tbbr \
308 ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
309 bl2 \
310 bl31
311
johpow01aac58582021-10-05 16:51:34 -0500312#
313# FVP-R platform
314#
315clean_build $(common_flags) PLAT=fvp_r ${ARM_TBB_OPTIONS} ENABLE_STACK_PROTECTOR=all
316
Fathi Boudra422bf772019-12-02 11:10:16 +0200317# Partners' platforms.
318# Enable as many features as possible.
319# We don't need to clean between each build here because we only do one build
320# per platform so we don't hit the build flags dependency problem.
Fathi Boudra422bf772019-12-02 11:10:16 +0200321
Manish Pandey9c0ee742021-07-08 09:55:59 +0100322# Platforms from Mediatek
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500323make PLAT=mt8173 $(common_flags) all
324make PLAT=mt8183 $(common_flags) all
Rex-BC Chen946cace2021-11-17 10:15:42 +0800325make PLAT=mt8186 $(common_flags) COREBOOT=1 all
Bo-Chen Chen4d63afd2022-08-30 16:34:57 +0800326make PLAT=mt8188 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500327make PLAT=mt8192 $(common_flags) COREBOOT=1 all
Manish Pandey9c0ee742021-07-08 09:55:59 +0100328make PLAT=mt8195 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500329
330# Platforms from Qualcomm
331make PLAT=sc7180 $(common_flags) COREBOOT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200332
Zelalemc9531f82020-08-04 15:37:08 -0500333make PLAT=rk3288 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500334 $(common_flags) ARCH=aarch32 AARCH32_SP=sp_min all
Madhukar Pappireddyd491ad02020-12-03 10:37:05 -0600335make PLAT=rk3368 $(common_flags) COREBOOT=1 \
336 ENABLE_STACK_PROTECTOR=strong all
337make PLAT=rk3399 $(common_flags) COREBOOT=1 PLAT_RK_DP_HDCP=1 \
338 ENABLE_STACK_PROTECTOR=strong all
339make PLAT=rk3328 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
340 ENABLE_STACK_PROTECTOR=strong all
341make PLAT=px30 $(common_flags) PLAT_RK_SECURE_DDR_MINILOADER=1 \
342 ENABLE_STACK_PROTECTOR=strong all
Fathi Boudra422bf772019-12-02 11:10:16 +0200343
344# Although we do several consecutive builds for the Tegra platform below, we
345# don't need to clean between each one because the Tegra makefiles specify
346# a different build directory per SoC.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500347make PLAT=tegra TARGET_SOC=t210 $(common_flags) all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500348make PLAT=tegra TARGET_SOC=t186 $(common_flags) all
349make PLAT=tegra TARGET_SOC=t194 $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200350
351# For the Xilinx platform, artificially increase the extents of BL31 memory
352# (using the platform-specific build options ZYNQMP_ATF_MEM_{BASE,SIZE}).
353# If we keep the default values, BL31 doesn't fit when it is built with all
354# these build flags.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500355make PLAT=zynqmp $(common_flags) \
Fathi Boudra422bf772019-12-02 11:10:16 +0200356 RESET_TO_BL31=1 SPD=tspd \
Zelalem4f3633e2021-06-18 11:53:47 -0500357 SDEI_SUPPORT=1 \
Fathi Boudra422bf772019-12-02 11:10:16 +0200358 ZYNQMP_ATF_MEM_BASE=0xFFFC0000 ZYNQMP_ATF_MEM_SIZE=0x00040000 \
359 all
360
Zelalemc9531f82020-08-04 15:37:08 -0500361# Build both for silicon (default) and virtual QEMU platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500362clean_build PLAT=versal $(common_flags)
363clean_build PLAT=versal $(common_flags) VERSAL_PLATFORM=versal_virt
Zelalemc9531f82020-08-04 15:37:08 -0500364
365# Platforms from Allwinner
Andre Przywara3a78c102022-04-26 11:08:54 +0100366clean_build PLAT=sun50i_a64 $(common_flags release) all
367clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_NATIVE=0 all
368clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_SCPI=0 all
369clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_AMEND_DTB=1 all
Andre Przywaracf78a512021-09-03 14:59:38 +0100370clean_build PLAT=sun50i_h6 $(common_flags) all
371clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_NATIVE=0 all
372clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_SCPI=0 all
373clean_build PLAT=sun50i_h616 $(common_flags) all
374clean_build PLAT=sun50i_r329 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500375
376# Platforms from i.MX
377make AARCH32_SP=optee ARCH=aarch32 ARM_ARCH_MAJOR=7 ARM_CORTEX_A7=yes \
378 CROSS_COMPILE=arm-none-eabi- PLAT=warp7 ${TBB_OPTIONS} \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500379 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500380make AARCH32_SP=optee ARCH=aarch32 CROSS_COMPILE=arm-none-eabi- PLAT=picopi \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500381 $(common_flags) all
Ying-Chun Liu (PaulLiu)f6528982021-11-17 17:20:00 +0800382make PLAT=imx8mm $(common_flags) NEED_BL2=yes MEASURED_BOOT=1 \
laurenw-arm8531e702022-06-09 15:32:37 -0500383 MBOOT_EL_HASH_ALG=sha256 ${TBB_OPTIONS} all
Madhukar Pappireddyc3ec06b2022-05-18 11:15:16 -0500384make PLAT=imx8mn $(common_flags) SDEI_SUPPORT=1 all
Ying-Chun Liu (PaulLiu)413e6102021-09-14 00:22:08 +0800385make PLAT=imx8mp $(common_flags) NEED_BL2=yes ${TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500386
Jacky Baib6cecc82021-06-07 09:49:46 +0800387# Due to the limited OCRAM space that can be used for TF-A, build test
388# will report failure caused by too small RAM size, so comment out the
389# build test for imx8mq in CI. It can also resolve the following ticket:
Zelalemc9531f82020-08-04 15:37:08 -0500390# https://developer.trustedfirmware.org/T626
Jacky Baib6cecc82021-06-07 09:49:46 +0800391#make PLAT=imx8mq $(common_flags release) all
Zelalemc9531f82020-08-04 15:37:08 -0500392
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500393make PLAT=imx8qm $(common_flags) all
394make PLAT=imx8qx $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500395
Olivier Deprezbac70192021-04-02 08:55:36 +0200396# Platforms for NXP Layerscape
Jiafei Pane48e56c2021-09-30 10:32:54 +0800397nxp_sb_flags="TRUSTED_BOARD_BOOT=1 CST_DIR=$(pwd) SPD=opteed"
398nxp_sb_fuse_flags="${nxp_sb_flags} FUSE_PROG=1"
399
400# Platform lx2
Olivier Deprezbac70192021-04-02 08:55:36 +0200401make PLAT=lx2160aqds $(common_flags) all
402make PLAT=lx2160ardb $(common_flags) all
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500403
404#CSF Based CoT:
Jiafei Pane48e56c2021-09-30 10:32:54 +0800405clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
406 $nxp_sb_fuse_flags DDR_PHY_BIN_PATH=$(pwd)
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500407
408#X509 Based CoT
Jiafei Pane48e56c2021-09-30 10:32:54 +0800409clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
410 $nxp_sb_flags GENERATE_COT=1 \
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500411 MBEDTLS_DIR=$(pwd)/mbedtls
412
413#BOOT_MODE=emmc and Stack protector
Jiafei Pane48e56c2021-09-30 10:32:54 +0800414clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=emmc \
415 $nxp_sb_fuse_flags ENABLE_STACK_PROTECTOR=strong
416
417# Platform ls1028ardb
418clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor
419clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc
420clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd
421
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800422# ls1028a Secure Boot
Jiafei Pane48e56c2021-09-30 10:32:54 +0800423clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor $nxp_sb_fuse_flags
424clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
425clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
Olivier Deprezbac70192021-04-02 08:55:36 +0200426
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800427# Platform ls1043ardb
428clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor
429clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand
430clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd
431
432# ls1043ardb Secure Boot
433clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
434clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
435clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
436
Jiafei Panbd0c22a2022-01-29 00:04:44 +0800437# ls1046ardb Secure Boot
438clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
439clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
440clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
441
442# ls1046afrwy Secure Boot
443clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
444clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
445
446# ls1046aqds Secure Boot
447clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
448clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
449clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
450clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
451
Jiafei Pan332cd792022-02-24 16:44:48 +0800452# ls1088ardb Secure Boot
453clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
454clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
455
456# ls1088aqds Secure Boot
457clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
458clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
459clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
460
Zelalemc9531f82020-08-04 15:37:08 -0500461# Platforms from Intel
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500462make PLAT=stratix10 $(common_flags) all
463make PLAT=agilex $(common_flags) all
Sieu Mun Tang03b57362022-03-05 01:54:59 +0800464make PLAT=n5x $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500465
466# Platforms from Broadcom
Madhukar Pappireddy97ad2582021-11-15 10:29:23 -0600467clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t \
468 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 DRIVER_I2C_ENABLE=1
469clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t-ns3 \
470 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 USE_USB=yes
Zelalemc9531f82020-08-04 15:37:08 -0500471
472# Platforms from Marvell
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500473make PLAT=a3700 $(common_flags) SCP_BL2=/dev/null CM3_SYSTEM_RESET=1 \
474 A3720_DB_PM_WAKEUP_SRC=1 HANDLE_EA_EL3_FIRST=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500475
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600476# Source files from mv-ddr-marvell repository are necessary
477# to build below four platforms
Manish Pandey7c1e7452021-11-05 12:54:15 +0000478wget https://downloads.trustedfirmware.org/tf-a/mv-ddr-marvell/mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
479tar -xzf mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600480mv mv-ddr-marvell drivers/marvell/mv_ddr
Zelalemc9531f82020-08-04 15:37:08 -0500481
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600482# These platforms from Marvell have dependency on GCC-6.2.1 toolchain
Pali Rohár8f890402021-07-19 13:48:05 +0200483make PLAT=a80x0 DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200484 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200485make PLAT=a80x0_mcbin DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200486 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200487make PLAT=a70x0 DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200488 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200489make PLAT=a70x0_amc DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200490 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Robert Markodf3319e2021-10-20 11:01:12 +0200491make PLAT=a70x0_mochabin DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
492 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200493make PLAT=a80x0_puzzle DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200494 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200495make PLAT=t9130 DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
Pali Rohárc344a622021-07-15 22:01:04 +0200496 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500497make PLAT=t9130_cex7_eval DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
498 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500499
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600500# Removing the source files
501rm -rf drivers/marvell/mv_ddr 2> /dev/null
Zelalemc9531f82020-08-04 15:37:08 -0500502
503# Platforms from Meson
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500504make PLAT=gxbb $(common_flags) all
505make PLAT=gxl $(common_flags) all
506make PLAT=g12a $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500507
508# Platforms from Renesas
509# Renesas R-Car D3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500510clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500511 BL33=Makefile LIFEC_DBSC_PROTECT_ENABLE=0 LSI=D3 \
512 MBEDTLS_DIR=$(pwd)/mbedtls PMIC_ROHM_BD9571=0 \
513 RCAR_AVS_SETTING_ENABLE=0 SPD=none RCAR_LOSSY_ENABLE=0 \
514 RCAR_SA0_SIZE=0 RCAR_SYSTEM_SUSPEND=0 TRUSTED_BOARD_BOOT=1
515
516# Renesas R-Car H3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500517clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500518 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3 \
519 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
520 RCAR_DRAM_SPLIT=1 RCAR_GEN3_ULCB=1 SPD=opteed \
521 TRUSTED_BOARD_BOOT=1
522
523# Renesas R-Car H3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500524clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500525 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3N \
526 SPD=opteed TRUSTED_BOARD_BOOT=1
527
528# Renesas R-Car M3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500529clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500530 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3 \
531 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
532 RCAR_DRAM_SPLIT=2 RCAR_GEN3_ULCB=1 SPD=opteed \
533 TRUSTED_BOARD_BOOT=1
534
535# Renesas R-Car M3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500536clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500537 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3N \
538 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
539 RCAR_GEN3_ULCB=1 SPD=opteed TRUSTED_BOARD_BOOT=1
540
541# Renesas R-Car E3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500542clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500543 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=E3 \
544 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 \
545 RCAR_SA0_SIZE=0 SPD=opteed TRUSTED_BOARD_BOOT=1
546
547# Renesas R-Car V3M Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500548clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500549 MBEDTLS_DIR=$(pwd)/mbedtls BL33=Makefile LSI=V3M MACHINE=eagle \
550 PMIC_ROHM_BD9571=0 RCAR_DRAM_SPLIT=0 RCAR_SYSTEM_SUSPEND=0 \
551 AVS_SETTING_ENABLE=0 SPD=none TRUSTED_BOARD_BOOT=1
552
Zelalemf4299672021-01-29 12:52:59 -0600553# Renesas HiHope RZ/G2M development kit
554clean_build PLAT=rzg $(common_flags) \
555 MBEDTLS_DIR=$(pwd)/mbedtls LSI=G2M \
556 RCAR_DRAM_SPLIT=2 RCAR_LOSSY_ENABLE=1 SPD=none
557
Zelalemc9531f82020-08-04 15:37:08 -0500558# Platforms from ST
Yann Gautiera69cf792021-09-01 11:19:01 +0200559# STM32MP1 SDMMC boot
560make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
561 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_SDMMC=1 \
562 BUILD_PLAT=build/stm32mp1-sdmmc/debug \
563 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
564
565# STM32MP1 eMMC boot
Zelalemc9531f82020-08-04 15:37:08 -0500566make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500567 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_EMMC=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200568 BUILD_PLAT=build/stm32mp1-emmc/debug \
569 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
570
571# STM32MP1 Raw NAND boot
572make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
573 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_RAW_NAND=1 \
574 BUILD_PLAT=build/stm32mp1-nand/debug \
575 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
576
577# STM32MP1 SPI NAND boot
578make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
579 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_SPI_NAND=1 \
580 BUILD_PLAT=build/stm32mp1-snand/debug \
581 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
582
583# STM32MP1 SPI NOR boot
584make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
585 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_SPI_NOR=1 \
586 BUILD_PLAT=build/stm32mp1-snor/debug \
587 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
588
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100589# STM32MP1 UART boot
590make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
591 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_UART_PROGRAMMER=1 \
592 BUILD_PLAT=build/stm32mp1-uart/debug \
593 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
594
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200595# STM32MP1 USB boot
596make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
597 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_USB_PROGRAMMER=1 \
598 BUILD_PLAT=build/stm32mp1-usb/debug \
599 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
600
Yann Gautiera69cf792021-09-01 11:19:01 +0200601# STM32MP1 SDMMC boot without FIP
602make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
603 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_SDMMC=1 \
604 BUILD_PLAT=build/stm32mp1-sdmmc-stm32image/debug \
605 STM32MP_USE_STM32IMAGE=1 \
606 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl2 bl32
Zelalemc9531f82020-08-04 15:37:08 -0500607
Yann Gautier773c5502022-03-10 17:24:47 +0100608# STM32MP13 SDMMC boot
609make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
610 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_SDMMC=1 \
611 BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug STM32MP13=1 \
612 ARCH=aarch32 AARCH32_SP=optee ENABLE_STACK_PROTECTOR=strong bl2
613
Zelalemc9531f82020-08-04 15:37:08 -0500614# Platforms from TI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500615make PLAT=k3 $(common_flags) all
Hari Nagalladadd89f2022-08-30 12:10:00 -0500616make PLAT=k3 TARGET_BOARD=j784s4 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500617
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500618clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS}
Zelalemc9531f82020-08-04 15:37:08 -0500619# Use GICV3 driver
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500620clean_build PLAT=qemu $(common_flags) QEMU_USE_GIC_DRIVER=QEMU_GICV3 \
Zelalemc9531f82020-08-04 15:37:08 -0500621 ENABLE_STACK_PROTECTOR=strong
622# Use encrypted FIP feature.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500623clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500624 BL32_RAM_LOCATION=tdram DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL31=1 \
625 ENCRYPT_BL32=1 FW_ENC_STATUS=0 SPD=opteed
Jens Wiklander1a9c2be2021-11-26 09:56:55 +0100626# QEMU with SPMD support
627clean_build PLAT=qemu $(common_flags) BL32=Makefile \
628 BL32_RAM_LOCATION=tdram ARM_BL31_IN_DRAM=1 \
629 SPD=spmd CTX_INCLUDE_EL2_REGS=0 SPMD_SPM_AT_SEL2=0 SPMC_OPTEE=1
Ruchika Gupta86e7f682022-04-12 10:25:46 +0530630# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500631clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} MBOOT_EL_HASH_ALG=sha256 MEASURED_BOOT=1
Zelalemc9531f82020-08-04 15:37:08 -0500632
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500633clean_build PLAT=qemu_sbsa $(common_flags)
Fathi Boudra422bf772019-12-02 11:10:16 +0200634
Zelalemd86e8762020-08-21 18:24:28 -0500635# QEMU with SPM support
636clean_build PLAT=qemu_sbsa $(common_flags) BL32=Makefile SPM_MM=1 \
Manish Pandeyaa9a03b2021-11-17 10:03:17 +0000637 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0
Zelalemd86e8762020-08-21 18:24:28 -0500638
Fathi Boudra422bf772019-12-02 11:10:16 +0200639# For hikey enable PMF to include all files in the platform port
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500640make PLAT=hikey $(common_flags) ${TBB_OPTIONS} ENABLE_PMF=1 all
641make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} all
642make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200643
Zelalemc9531f82020-08-04 15:37:08 -0500644# Platforms from Socionext
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500645clean_build PLAT=uniphier $(common_flags) ${TBB_OPTIONS} SPD=tspd
646clean_build PLAT=uniphier $(common_flags) FIP_GZIP=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200647
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500648clean_build PLAT=synquacer $(common_flags) SPM_MM=1 \
Jassi Brar86080922022-06-27 14:16:34 -0500649 RESET_TO_BL31=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0 \
650 PRELOADED_BL33_BASE=0x0
Zelalemc9531f82020-08-04 15:37:08 -0500651
652# Support for SCP Message Interface protocol with platform specific drivers
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500653clean_build PLAT=synquacer $(common_flags) \
Jassi Brar86080922022-06-27 14:16:34 -0500654 RESET_TO_BL31=1 PRELOADED_BL33_BASE=0x0 SQ_USE_SCMI_DRIVER=1
Zelalemc9531f82020-08-04 15:37:08 -0500655
Jassi Brarb8c7ca02022-06-27 14:22:10 -0500656# Support for BL2 and TBBR
657clean_build PLAT=synquacer $(common_flags) \
658 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
659 SQ_USE_SCMI_DRIVER=1 SPD=opteed all
660
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500661make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200662
Zelalemc9531f82020-08-04 15:37:08 -0500663# Raspberry Pi Platforms
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500664make PLAT=rpi3 $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500665 ENABLE_STACK_PROTECTOR=strong PRELOADED_BL33_BASE=0xDEADBEEF all
Andre Przywarae917ec82021-09-03 15:01:30 +0100666clean_build PLAT=rpi4 $(common_flags) SMC_PCI_SUPPORT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200667
Zelalemc9531f82020-08-04 15:37:08 -0500668# A113D (AXG) platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500669clean_build PLAT=axg $(common_flags) SPD=opteed
670clean_build PLAT=axg $(common_flags) AML_USE_ATOS=1
Zelalemc9531f82020-08-04 15:37:08 -0500671
Stephan Gerhold141a7662021-12-07 20:42:14 +0100672# QTI MSM8916 platform
673clean_build PLAT=msm8916 $(common_flags)
674
Fathi Boudra422bf772019-12-02 11:10:16 +0200675cd ..