blob: c61418a7665ae38a23bb6eaf58c58592eb0f274d [file] [log] [blame]
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Govindraj Raja95f855c2023-03-01 13:11:42 +00003# Copyright (c) 2019-2023, 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.
Sandrine Bailleuxe30bd0c2022-08-31 14:49:17 +020064#
65# Note that we override PLAT_RSS_NOT_SUPPORTED build flag (which defaults to 1
66# on the Base AEM FVP) just to analyse the RSS communication driver code through
67# Coverity. In reality, RSS is not supported on FVP right now (or on any other
68# upstream platform, for that matter) so the resulting firmware would not be
69# functional.
Manish V Badarkhe21402bb2023-03-18 12:39:33 +000070clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} USE_ROMLIB=1 \
Sandrine Bailleuxe30bd0c2022-08-31 14:49:17 +020071 ENABLE_RME=1 MEASURED_BOOT=1 PLAT_RSS_NOT_SUPPORTED=0
laurenw-armf48e9d22022-04-22 11:30:13 -050072
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050073clean_build $fvp_common_flags SPD=trusty
74clean_build $fvp_common_flags SPD=trusty TRUSTY_SPD_WITH_GENERIC_SERVICES=1
Fathi Boudra422bf772019-12-02 11:10:16 +020075
Sona Mathewff9c2a72023-05-10 21:18:01 -050076# ERRATA ABI
77clean_build $fvp_common_flags ERRATA_ABI_SUPPORT=1
78
Fathi Boudra422bf772019-12-02 11:10:16 +020079# SDEI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050080clean_build $fvp_common_flags SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Fathi Boudra422bf772019-12-02 11:10:16 +020081
Zelalemc9531f82020-08-04 15:37:08 -050082# SDEI with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050083clean_build $fvp_common_flags SDEI_IN_FCONF=1 SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Zelalemc9531f82020-08-04 15:37:08 -050084
Zelalem4f3633e2021-06-18 11:53:47 -050085# PCI Service
86clean_build $fvp_common_flags SMC_PCI_SUPPORT=1
87
Zelalemc9531f82020-08-04 15:37:08 -050088# Secure interrupt descriptors with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050089clean_build $fvp_common_flags SEC_INT_DESC_IN_FCONF=1
Zelalemc9531f82020-08-04 15:37:08 -050090
Fathi Boudra422bf772019-12-02 11:10:16 +020091# Without coherent memory
92clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd USE_COHERENT_MEM=0
93
94# Using PSCI extended State ID format rather than the original format
95clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd PSCI_EXTENDED_STATE_ID=1 \
96 ARM_RECOM_STATE_ID_ENC=1
97
98# Alternative boot flows (This changes some of the platform initialisation code)
99clean_build $fvp_common_flags EL3_PAYLOAD=0x80000000
100clean_build $fvp_common_flags PRELOADED_BL33_BASE=0x80000000
101
102# Using the SP804 timer instead of the Generic Timer
103clean_build $fvp_common_flags FVP_USE_SP804_TIMER=1
104
105# Using the CCN driver and multi cluster topology
106clean_build $fvp_common_flags FVP_CLUSTER_COUNT=4
107
108# PMF
109clean_build $fvp_common_flags ENABLE_PMF=1
110
111# stack protector
112clean_build $fvp_common_flags ENABLE_STACK_PROTECTOR=strong
113
114# AArch32 build
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500115clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200116 ARCH=aarch32 AARCH32_SP=sp_min \
117 RESET_TO_SP_MIN=1 PRELOADED_BL33_BASE=0x80000000
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500118clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200119 ARCH=aarch32 AARCH32_SP=sp_min
120
121# Xlat tables lib version 1 (AArch64 and AArch32)
122clean_build $fvp_common_flags ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500123clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200124 ARCH=aarch32 AARCH32_SP=sp_min ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
125
Zelalemc9531f82020-08-04 15:37:08 -0500126# SPM support based on Management Mode Interface Specification
Manish Pandeyaa9a03b2021-11-17 10:03:17 +0000127clean_build $fvp_common_flags SPM_MM=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0
Fathi Boudra422bf772019-12-02 11:10:16 +0200128
Zelalemc9531f82020-08-04 15:37:08 -0500129# SPM support with TOS(optee) as SPM sitting at S-EL1
130clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0
131
Shruti Gupta8cc89b92022-08-09 12:23:46 +0100132# SPM support with SPM at EL3 and TSP at S-EL1
133clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 CTX_INCLUDE_EL2_REGS=0 EL3_EXCEPTION_HANDLING=0 \
134 SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1 \
135 ARM_SPMC_MANIFEST_DTS=plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts
136
Zelalemc9531f82020-08-04 15:37:08 -0500137# SPM support with Secure hafnium as SPM sitting at S-EL2
138# SP_LAYOUT_FILE is used only during FIP creation but build won't progress
139# if we have NULL value to it, so passing a dummy string.
140clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=1 ARM_ARCH_MINOR=4 \
Max Shvetsov44d2a702021-02-18 16:41:45 +0000141 CTX_INCLUDE_EL2_REGS=1 SP_LAYOUT_FILE=dummy
Fathi Boudra422bf772019-12-02 11:10:16 +0200142
Marc Bonnici502fdaa2022-01-10 12:38:23 +0000143# SPM support with SPM sitting at EL3
144clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1
145
Fathi Boudra422bf772019-12-02 11:10:16 +0200146#BL2 at EL3 support
Maksims Svecovs7a0da522023-03-06 16:28:27 +0000147clean_build $fvp_common_flags RESET_TO_BL2=1
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500148clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Maksims Svecovs7a0da522023-03-06 16:28:27 +0000149 ARCH=aarch32 AARCH32_SP=sp_min RESET_TO_BL2=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200150
Zelalemc9531f82020-08-04 15:37:08 -0500151# RAS Extension Support
Manish Pandeyc1fa25b2023-02-16 17:35:36 +0000152clean_build $fvp_common_flags EL3_EXCEPTION_HANDLING=1 ENABLE_FEAT_RAS=1 \
153 RAS_FFH_SUPPORT=1 FAULT_INJECTION_SUPPORT=1 HANDLE_EA_EL3_FIRST_NS=1 \
Manish Pandey010e9b42023-04-24 15:49:27 +0100154 SDEI_SUPPORT=1 PLATFORM_TEST_RAS_FFH=1
Zelalemc9531f82020-08-04 15:37:08 -0500155
Manish Pandeyfd4c6b72023-04-24 10:29:52 +0100156# EA handled in EL3 first
157clean_build $fvp_common_flags HANDLE_EA_EL3_FIRST_NS=1 PLATFORM_TEST_EA_FFH=1
158
Zelalemc9531f82020-08-04 15:37:08 -0500159# Hardware Assisted Coherency(DynamIQ)
160clean_build $fvp_common_flags FVP_CLUSTER_COUNT=1 FVP_MAX_CPUS_PER_CLUSTER=8 \
161 HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0
162
163# Pointer Authentication Support
164clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 \
165 ARM_ARCH_MINOR=5 EL3_EXCEPTION_HANDLING=1 BRANCH_PROTECTION=1 SDEI_SUPPORT=1 SPD=tspd TSP_NS_INTR_ASYNC_PREEMPT=1
166
167# Undefined Behaviour Sanitizer
168# Building with UBSAN SANITIZE_UB=on increases the executable size.
169# Hence it is only properly supported in bl31 with RESET_TO_BL31 enabled
170make $fvp_common_flags clean
171make $fvp_common_flags SANITIZE_UB=on RESET_TO_BL31=1 bl31
172
173# debugfs feature
174clean_build $fvp_common_flags DEBUG=1 USE_DEBUGFS=1
175
176# MPAM feature
177clean_build $fvp_common_flags ENABLE_MPAM_FOR_LOWER_ELS=1
178
179# Using GICv3.1 driver with extended PPI and SPI range
180clean_build $fvp_common_flags GIC_EXT_INTID=1
181
182# Using GICv4 features with extended PPI and SPI range
183clean_build $fvp_common_flags GIC_ENABLE_V4_EXTN=1 GIC_EXT_INTID=1
184
Alexei Fedorov20fdf502020-07-27 17:36:38 +0100185# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500186clean_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 +0100187
Manish V Badarkhef43e3f52022-06-21 20:37:25 +0100188# DRTM
189clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} TPM_HASH_ALG=sha256 DRTM_SUPPORT=1 USE_ROMLIB=1
190
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100191# CoT descriptors in device tree
Manish V Badarkhe81102d12020-10-05 08:02:30 +0100192clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 USE_ROMLIB=1
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100193
Manish V Badarkhe107c8e32021-08-02 19:49:32 +0100194# PSA FWU support
195clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_GPT_SUPPORT=1 PSA_FWU_SUPPORT=1 USE_ROMLIB=1
196
johpow01153c8b22021-11-03 14:38:36 -0500197# SME and HCX features
198clean_build $fvp_common_flags ENABLE_SME_FOR_NS=1 ENABLE_FEAT_HCX=1
199
Jayanth Dodderi Chidanand41edd012023-01-12 14:50:34 +0000200# SME2
201clean_build $fvp_common_flags ENABLE_SME2_FOR_NS=1 ENABLE_SME_FOR_NS=1 ENABLE_FEAT_HCX=1
202
Jayanth Dodderi Chidanand84da1962022-04-11 11:38:44 +0100203# Architectural Feature Detection mechanism
204clean_build $fvp_common_flags FEATURE_DETECTION=1
205
Manish Pandeye3561fd2023-01-05 10:46:25 +0000206# RNG trap feature
207clean_build $fvp_common_flags ENABLE_FEAT_RNG=1 ENABLE_FEAT_RNG_TRAP=1
208
Govindraj Rajab06f9c82023-05-09 14:46:38 -0500209# OPTEE_ALLOW_SMC_LOAD feature - Disable debug build for this option as its causing bl31 image overflow
210clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=opteed OPTEE_ALLOW_SMC_LOAD=1 PLAT_XLAT_TABLES_DYNAMIC=1 DEBUG=0
Jeffrey Kardatzke09e18e22023-01-25 12:24:13 -0800211
Fathi Boudra422bf772019-12-02 11:10:16 +0200212#
213# Juno platform
214# We'll use the following flags for all Juno builds.
215#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500216juno_common_flags="$(common_flags) PLAT=juno"
Fathi Boudra422bf772019-12-02 11:10:16 +0200217clean_build $juno_common_flags SPD=tspd ${ARM_TBB_OPTIONS}
218clean_build $juno_common_flags EL3_PAYLOAD=0x80000000
Madhukar Pappireddydcb31f62021-05-06 11:36:36 -0500219clean_build $juno_common_flags ENABLE_STACK_PROTECTOR=strong ARM_ETHOSN_NPU_DRIVER=1
Mikael Olssoncd8c7822023-02-28 17:30:44 +0100220clean_build $juno_common_flags ${ARM_TBB_OPTIONS} ENABLE_STACK_PROTECTOR=strong ARM_ETHOSN_NPU_DRIVER=1 ARM_ETHOSN_NPU_TZMP1=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200221clean_build $juno_common_flags CSS_USE_SCMI_SDS_DRIVER=0
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500222
Leonardo Sandoval5163b562020-11-20 17:17:59 -0600223clean_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 +0200224
Jayanth Dodderi Chidanand055394a2022-10-19 09:20:20 +0100225# TRNG Service
226clean_build $juno_common_flags TRNG_SUPPORT=1
227
Fathi Boudra422bf772019-12-02 11:10:16 +0200228#
Fathi Boudra422bf772019-12-02 11:10:16 +0200229# System Guidance for Infrastructure platform RD-E1Edge
230#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500231make $(common_flags) PLAT=rde1edge ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500232
233#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530234# Reference Design platform RD-V1
Zelalemc9531f82020-08-04 15:37:08 -0500235#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530236make $(common_flags) PLAT=rdv1 ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500237
238#
Aditya Angadi61c54762021-01-04 09:30:52 +0530239# Reference Design platform RD-V1-MC
Zelalemc9531f82020-08-04 15:37:08 -0500240#
Aditya Angadi61c54762021-01-04 09:30:52 +0530241make $(common_flags) PLAT=rdv1mc ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=4 all
Zelalemc9531f82020-08-04 15:37:08 -0500242
243#
Vijayenthiran Subramaniama66de332020-11-23 14:20:14 +0530244# Reference Design Platform RD-N2
245#
246make $(common_flags) PLAT=rdn2 ${ARM_TBB_OPTIONS} all
247
248#
Zelalemc9531f82020-08-04 15:37:08 -0500249# Neoverse N1 SDP platform
250#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500251make $(common_flags) PLAT=n1sdp ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500252
253#
254# FVP VE platform
255#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500256make $(common_flags) PLAT=fvp_ve AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500257 CROSS_COMPILE=arm-none-eabi- ARM_ARCH_MAJOR=7 \
258 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
259 FVP_HW_CONFIG_DTS=fdts/fvp-ve-Cortex-A5x1.dts all
260
261#
262# A5 DesignStart Platform
263#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500264make $(common_flags) PLAT=a5ds AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500265 ARM_ARCH_MAJOR=7 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
266 CROSS_COMPILE=arm-none-eabi- FVP_HW_CONFIG_DTS=fdts/a5ds.dts
267
268#
269# Corstone700 Platform
270#
271
272corstone700_common_flags="CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500273 $(common_flags) \
Zelalemc9531f82020-08-04 15:37:08 -0500274 PLAT=corstone700 \
275 ARCH=aarch32 \
276 RESET_TO_SP_MIN=1 \
277 AARCH32_SP=sp_min \
278 ARM_LINUX_KERNEL_AS_BL33=0 \
279 ARM_PRELOADED_DTB_BASE=0x80400000 \
280 ENABLE_PIE=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500281 ENABLE_STACK_PROTECTOR=all \
282 all"
283
284echo "Info: Building Corstone700 FVP ..."
285
286make TARGET_PLATFORM=fvp ${corstone700_common_flags}
287
288echo "Info: Building Corstone700 FPGA ..."
289
290make TARGET_PLATFORM=fpga ${corstone700_common_flags}
291
292#
293# Arm internal FPGA port
294#
Andre Przywara13361b62022-04-26 11:16:55 +0100295make PLAT=arm_fpga $(common_flags release) \
296 FPGA_PRELOADED_DTB_BASE=0x88000000 PRELOADED_BL33_BASE=0x82080000 all
Zelalemc9531f82020-08-04 15:37:08 -0500297
298#
Usama Arifcba711d2021-08-04 15:53:42 +0100299# Total Compute platforms
Zelalemc9531f82020-08-04 15:37:08 -0500300#
Usama Arifcba711d2021-08-04 15:53:42 +0100301make $(common_flags) PLAT=tc TARGET_PLATFORM=0 ${ARM_TBB_OPTIONS} all
302make $(common_flags) PLAT=tc TARGET_PLATFORM=1 ${ARM_TBB_OPTIONS} all
Tamas Banaf5a6632022-09-21 16:02:39 +0200303make $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} MEASURED_BOOT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200304
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530305#
306# Morello platform
307#
Chandni Cherukuricbd45962021-12-12 13:37:33 +0530308clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=fvp ${ARM_TBB_OPTIONS}
309clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=soc ${ARM_TBB_OPTIONS}
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530310
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100311#
Vishnu Banavath2cb72b32022-01-20 14:27:55 +0000312# corstone1000 Platform
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100313#
314
315make $(common_flags) \
Vishnu Banavath2cb72b32022-01-20 14:27:55 +0000316 PLAT=corstone1000 \
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100317 SPD=spmd \
318 TARGET_PLATFORM=fpga \
319 ENABLE_STACK_PROTECTOR=strong \
320 ENABLE_PIE=1 \
Maksims Svecovs7a0da522023-03-06 16:28:27 +0000321 RESET_TO_BL2=1 \
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100322 SPMD_SPM_AT_SEL2=0 \
323 ${ARM_TBB_OPTIONS} \
324 CREATE_KEYS=1 \
325 COT=tbbr \
326 ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
327 bl2 \
328 bl31
329
johpow01aac58582021-10-05 16:51:34 -0500330#
331# FVP-R platform
332#
333clean_build $(common_flags) PLAT=fvp_r ${ARM_TBB_OPTIONS} ENABLE_STACK_PROTECTOR=all
334
Fathi Boudra422bf772019-12-02 11:10:16 +0200335# Partners' platforms.
336# Enable as many features as possible.
337# We don't need to clean between each build here because we only do one build
338# per platform so we don't hit the build flags dependency problem.
Fathi Boudra422bf772019-12-02 11:10:16 +0200339
Manish Pandey9c0ee742021-07-08 09:55:59 +0100340# Platforms from Mediatek
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500341make PLAT=mt8173 $(common_flags) all
342make PLAT=mt8183 $(common_flags) all
Rex-BC Chen946cace2021-11-17 10:15:42 +0800343make PLAT=mt8186 $(common_flags) COREBOOT=1 all
Bo-Chen Chen4d63afd2022-08-30 16:34:57 +0800344make PLAT=mt8188 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500345make PLAT=mt8192 $(common_flags) COREBOOT=1 all
Manish Pandey9c0ee742021-07-08 09:55:59 +0100346make PLAT=mt8195 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500347
348# Platforms from Qualcomm
349make PLAT=sc7180 $(common_flags) COREBOOT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200350
Zelalemc9531f82020-08-04 15:37:08 -0500351make PLAT=rk3288 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500352 $(common_flags) ARCH=aarch32 AARCH32_SP=sp_min all
Madhukar Pappireddyd491ad02020-12-03 10:37:05 -0600353make PLAT=rk3368 $(common_flags) COREBOOT=1 \
354 ENABLE_STACK_PROTECTOR=strong all
355make PLAT=rk3399 $(common_flags) COREBOOT=1 PLAT_RK_DP_HDCP=1 \
356 ENABLE_STACK_PROTECTOR=strong all
357make PLAT=rk3328 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
358 ENABLE_STACK_PROTECTOR=strong all
359make PLAT=px30 $(common_flags) PLAT_RK_SECURE_DDR_MINILOADER=1 \
360 ENABLE_STACK_PROTECTOR=strong all
Fathi Boudra422bf772019-12-02 11:10:16 +0200361
362# Although we do several consecutive builds for the Tegra platform below, we
363# don't need to clean between each one because the Tegra makefiles specify
364# a different build directory per SoC.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500365make PLAT=tegra TARGET_SOC=t210 $(common_flags) all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500366make PLAT=tegra TARGET_SOC=t186 $(common_flags) all
367make PLAT=tegra TARGET_SOC=t194 $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200368
369# For the Xilinx platform, artificially increase the extents of BL31 memory
370# (using the platform-specific build options ZYNQMP_ATF_MEM_{BASE,SIZE}).
371# If we keep the default values, BL31 doesn't fit when it is built with all
372# these build flags.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500373make PLAT=zynqmp $(common_flags) \
Fathi Boudra422bf772019-12-02 11:10:16 +0200374 RESET_TO_BL31=1 SPD=tspd \
Zelalem4f3633e2021-06-18 11:53:47 -0500375 SDEI_SUPPORT=1 \
Fathi Boudra422bf772019-12-02 11:10:16 +0200376 ZYNQMP_ATF_MEM_BASE=0xFFFC0000 ZYNQMP_ATF_MEM_SIZE=0x00040000 \
377 all
378
Zelalemc9531f82020-08-04 15:37:08 -0500379# Build both for silicon (default) and virtual QEMU platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500380clean_build PLAT=versal $(common_flags)
381clean_build PLAT=versal $(common_flags) VERSAL_PLATFORM=versal_virt
Zelalemc9531f82020-08-04 15:37:08 -0500382
Michal Simek0f135242022-09-20 15:24:56 +0200383# Build Xilinx Versal NET platform
384clean_build PLAT=versal_net $(common_flags)
385
Jayanth Dodderi Chidanand0a2dd1e2022-10-27 11:17:37 +0100386# Build Xilinx Versal NET without Platform Management support
387clean_build PLAT=versal_net $(common_flags) TFA_NO_PM=1
388
Zelalemc9531f82020-08-04 15:37:08 -0500389# Platforms from Allwinner
Andre Przywara3a78c102022-04-26 11:08:54 +0100390clean_build PLAT=sun50i_a64 $(common_flags release) all
391clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_NATIVE=0 all
392clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_SCPI=0 all
393clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_AMEND_DTB=1 all
Andre Przywaracf78a512021-09-03 14:59:38 +0100394clean_build PLAT=sun50i_h6 $(common_flags) all
395clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_NATIVE=0 all
396clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_SCPI=0 all
397clean_build PLAT=sun50i_h616 $(common_flags) all
398clean_build PLAT=sun50i_r329 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500399
400# Platforms from i.MX
401make AARCH32_SP=optee ARCH=aarch32 ARM_ARCH_MAJOR=7 ARM_CORTEX_A7=yes \
402 CROSS_COMPILE=arm-none-eabi- PLAT=warp7 ${TBB_OPTIONS} \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500403 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500404make AARCH32_SP=optee ARCH=aarch32 CROSS_COMPILE=arm-none-eabi- PLAT=picopi \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500405 $(common_flags) all
Ying-Chun Liu (PaulLiu)f6528982021-11-17 17:20:00 +0800406make PLAT=imx8mm $(common_flags) NEED_BL2=yes MEASURED_BOOT=1 \
laurenw-arm8531e702022-06-09 15:32:37 -0500407 MBOOT_EL_HASH_ALG=sha256 ${TBB_OPTIONS} all
Madhukar Pappireddyc3ec06b2022-05-18 11:15:16 -0500408make PLAT=imx8mn $(common_flags) SDEI_SUPPORT=1 all
Ying-Chun Liu (PaulLiu)413e6102021-09-14 00:22:08 +0800409make PLAT=imx8mp $(common_flags) NEED_BL2=yes ${TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500410
Jacky Baib6cecc82021-06-07 09:49:46 +0800411# Due to the limited OCRAM space that can be used for TF-A, build test
412# will report failure caused by too small RAM size, so comment out the
413# build test for imx8mq in CI. It can also resolve the following ticket:
Zelalemc9531f82020-08-04 15:37:08 -0500414# https://developer.trustedfirmware.org/T626
Jacky Baib6cecc82021-06-07 09:49:46 +0800415#make PLAT=imx8mq $(common_flags release) all
Zelalemc9531f82020-08-04 15:37:08 -0500416
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500417make PLAT=imx8qm $(common_flags) all
418make PLAT=imx8qx $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500419
Olivier Deprezbac70192021-04-02 08:55:36 +0200420# Platforms for NXP Layerscape
Jiafei Pane48e56c2021-09-30 10:32:54 +0800421nxp_sb_flags="TRUSTED_BOARD_BOOT=1 CST_DIR=$(pwd) SPD=opteed"
422nxp_sb_fuse_flags="${nxp_sb_flags} FUSE_PROG=1"
423
424# Platform lx2
Olivier Deprezbac70192021-04-02 08:55:36 +0200425make PLAT=lx2160aqds $(common_flags) all
426make PLAT=lx2160ardb $(common_flags) all
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500427
428#CSF Based CoT:
Jiafei Pane48e56c2021-09-30 10:32:54 +0800429clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
430 $nxp_sb_fuse_flags DDR_PHY_BIN_PATH=$(pwd)
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500431
432#X509 Based CoT
Jiafei Pane48e56c2021-09-30 10:32:54 +0800433clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
434 $nxp_sb_flags GENERATE_COT=1 \
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500435 MBEDTLS_DIR=$(pwd)/mbedtls
436
437#BOOT_MODE=emmc and Stack protector
Jiafei Pane48e56c2021-09-30 10:32:54 +0800438clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=emmc \
439 $nxp_sb_fuse_flags ENABLE_STACK_PROTECTOR=strong
440
441# Platform ls1028ardb
442clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor
443clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc
444clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd
445
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800446# ls1028a Secure Boot
Jiafei Pane48e56c2021-09-30 10:32:54 +0800447clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor $nxp_sb_fuse_flags
448clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
449clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
Olivier Deprezbac70192021-04-02 08:55:36 +0200450
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800451# Platform ls1043ardb
452clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor
453clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand
454clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd
455
456# ls1043ardb Secure Boot
457clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
458clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
459clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
460
Jiafei Panbd0c22a2022-01-29 00:04:44 +0800461# ls1046ardb Secure Boot
462clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
463clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
464clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
465
466# ls1046afrwy Secure Boot
467clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
468clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
469
470# ls1046aqds Secure Boot
471clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
472clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
473clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
474clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
475
Jiafei Pan332cd792022-02-24 16:44:48 +0800476# ls1088ardb Secure Boot
477clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
478clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
479
480# ls1088aqds Secure Boot
481clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
482clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
483clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
484
Zelalemc9531f82020-08-04 15:37:08 -0500485# Platforms from Intel
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500486make PLAT=stratix10 $(common_flags) all
487make PLAT=agilex $(common_flags) all
Sieu Mun Tang03b57362022-03-05 01:54:59 +0800488make PLAT=n5x $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500489
490# Platforms from Broadcom
Madhukar Pappireddy97ad2582021-11-15 10:29:23 -0600491clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t \
492 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 DRIVER_I2C_ENABLE=1
493clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t-ns3 \
494 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 USE_USB=yes
Zelalemc9531f82020-08-04 15:37:08 -0500495
496# Platforms from Marvell
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500497make PLAT=a3700 $(common_flags) SCP_BL2=/dev/null CM3_SYSTEM_RESET=1 \
Manish Pandey9ef33c52022-10-25 16:41:49 +0100498 A3720_DB_PM_WAKEUP_SRC=1 HANDLE_EA_EL3_FIRST_NS=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500499
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600500# Source files from mv-ddr-marvell repository are necessary
501# to build below four platforms
Manish Pandey7c1e7452021-11-05 12:54:15 +0000502wget https://downloads.trustedfirmware.org/tf-a/mv-ddr-marvell/mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
503tar -xzf mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600504mv mv-ddr-marvell drivers/marvell/mv_ddr
Zelalemc9531f82020-08-04 15:37:08 -0500505
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600506# These platforms from Marvell have dependency on GCC-6.2.1 toolchain
Pali Rohár8f890402021-07-19 13:48:05 +0200507make 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 +0200508 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200509make 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 +0200510 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200511make 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 +0200512 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200513make 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 +0200514 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Robert Markodf3319e2021-10-20 11:01:12 +0200515make PLAT=a70x0_mochabin DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
516 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200517make 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 +0200518 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200519make 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 +0200520 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500521make PLAT=t9130_cex7_eval DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
522 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500523
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600524# Removing the source files
525rm -rf drivers/marvell/mv_ddr 2> /dev/null
Zelalemc9531f82020-08-04 15:37:08 -0500526
527# Platforms from Meson
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500528make PLAT=gxbb $(common_flags) all
529make PLAT=gxl $(common_flags) all
530make PLAT=g12a $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500531
532# Platforms from Renesas
533# Renesas R-Car D3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500534clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500535 BL33=Makefile LIFEC_DBSC_PROTECT_ENABLE=0 LSI=D3 \
536 MBEDTLS_DIR=$(pwd)/mbedtls PMIC_ROHM_BD9571=0 \
537 RCAR_AVS_SETTING_ENABLE=0 SPD=none RCAR_LOSSY_ENABLE=0 \
538 RCAR_SA0_SIZE=0 RCAR_SYSTEM_SUSPEND=0 TRUSTED_BOARD_BOOT=1
539
540# Renesas R-Car H3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500541clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500542 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3 \
543 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
544 RCAR_DRAM_SPLIT=1 RCAR_GEN3_ULCB=1 SPD=opteed \
545 TRUSTED_BOARD_BOOT=1
546
547# Renesas R-Car H3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500548clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500549 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3N \
550 SPD=opteed TRUSTED_BOARD_BOOT=1
551
552# Renesas R-Car M3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500553clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500554 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3 \
555 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
556 RCAR_DRAM_SPLIT=2 RCAR_GEN3_ULCB=1 SPD=opteed \
557 TRUSTED_BOARD_BOOT=1
558
559# Renesas R-Car M3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500560clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500561 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3N \
562 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
563 RCAR_GEN3_ULCB=1 SPD=opteed TRUSTED_BOARD_BOOT=1
564
565# Renesas R-Car E3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500566clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500567 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=E3 \
568 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 \
569 RCAR_SA0_SIZE=0 SPD=opteed TRUSTED_BOARD_BOOT=1
570
571# Renesas R-Car V3M Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500572clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500573 MBEDTLS_DIR=$(pwd)/mbedtls BL33=Makefile LSI=V3M MACHINE=eagle \
574 PMIC_ROHM_BD9571=0 RCAR_DRAM_SPLIT=0 RCAR_SYSTEM_SUSPEND=0 \
575 AVS_SETTING_ENABLE=0 SPD=none TRUSTED_BOARD_BOOT=1
576
Zelalemf4299672021-01-29 12:52:59 -0600577# Renesas HiHope RZ/G2M development kit
578clean_build PLAT=rzg $(common_flags) \
579 MBEDTLS_DIR=$(pwd)/mbedtls LSI=G2M \
580 RCAR_DRAM_SPLIT=2 RCAR_LOSSY_ENABLE=1 SPD=none
581
Zelalemc9531f82020-08-04 15:37:08 -0500582# Platforms from ST
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100583stm32mp1_common_flags="$(common_flags) \
584 ARCH=aarch32 \
585 ARM_ARCH_MAJOR=7 \
586 CROSS_COMPILE=arm-none-eabi- \
587 ENABLE_STACK_PROTECTOR=strong \
588 PLAT=stm32mp1"
589
Yann Gautiera69cf792021-09-01 11:19:01 +0200590# STM32MP1 SDMMC boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000591make ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200592 BUILD_PLAT=build/stm32mp1-sdmmc/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100593 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200594
595# STM32MP1 eMMC boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000596make ${stm32mp1_common_flags} STM32MP_EMMC=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200597 BUILD_PLAT=build/stm32mp1-emmc/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100598 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200599
600# STM32MP1 Raw NAND boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000601make ${stm32mp1_common_flags} STM32MP_RAW_NAND=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200602 BUILD_PLAT=build/stm32mp1-nand/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100603 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200604
605# STM32MP1 SPI NAND boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000606make ${stm32mp1_common_flags} STM32MP_SPI_NAND=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200607 BUILD_PLAT=build/stm32mp1-snand/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100608 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200609
610# STM32MP1 SPI NOR boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000611make ${stm32mp1_common_flags} STM32MP_SPI_NOR=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200612 BUILD_PLAT=build/stm32mp1-snor/debug \
Govindraj Raja95f855c2023-03-01 13:11:42 +0000613 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200614
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100615# STM32MP1 UART boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000616make ${stm32mp1_common_flags} STM32MP_UART_PROGRAMMER=1 \
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100617 BUILD_PLAT=build/stm32mp1-uart/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100618 AARCH32_SP=sp_min bl2 bl32
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100619
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200620# STM32MP1 USB boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000621make ${stm32mp1_common_flags} STM32MP_USB_PROGRAMMER=1 \
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200622 BUILD_PLAT=build/stm32mp1-usb/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100623 AARCH32_SP=sp_min bl2 bl32
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200624
Lionel Debieve8f464c02022-10-13 09:25:45 +0200625# STM32MP1 TBBR
Govindraj Raja95f855c2023-03-01 13:11:42 +0000626make ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautier741e8492022-11-14 19:04:27 +0100627 BUILD_PLAT=build/stm32mp1-sdmmc-tbbr/debug \
Lionel Debieve8f464c02022-10-13 09:25:45 +0200628 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100629 AARCH32_SP=sp_min bl2 bl32
Lionel Debieve8f464c02022-10-13 09:25:45 +0200630
Govindraj Raja95f855c2023-03-01 13:11:42 +0000631stm32mp13_common_flags="${stm32mp1_common_flags} \
632 AARCH32_SP=optee \
633 STM32MP13=1"
634
Yann Gautier773c5502022-03-10 17:24:47 +0100635# STM32MP13 SDMMC boot
Govindraj Raja95f855c2023-03-01 13:11:42 +0000636make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100637 BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug bl2
Yann Gautier773c5502022-03-10 17:24:47 +0100638
Lionel Debieve8f464c02022-10-13 09:25:45 +0200639# STM32MP13 TBBR
Govindraj Raja95f855c2023-03-01 13:11:42 +0000640make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Lionel Debieve8f464c02022-10-13 09:25:45 +0200641 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100642 BUILD_PLAT=build/stm32mp1-mp13-sdmmc-tbbr/debug bl2
Lionel Debieve8f464c02022-10-13 09:25:45 +0200643
Yann Gautiera66e5012022-12-13 13:52:35 +0100644# STM32MP13 TBBR DECRYPTION AES GCM
Govindraj Raja95f855c2023-03-01 13:11:42 +0000645make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Yann Gautiera66e5012022-12-13 13:52:35 +0100646 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
647 DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL32=1 \
648 BUILD_PLAT=build/stm32mp1-mp13-sdmmc-tbbr-dec/debug bl2
649
Zelalemc9531f82020-08-04 15:37:08 -0500650# Platforms from TI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500651make PLAT=k3 $(common_flags) all
Hari Nagalladadd89f2022-08-30 12:10:00 -0500652make PLAT=k3 TARGET_BOARD=j784s4 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500653
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500654clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS}
Zelalemc9531f82020-08-04 15:37:08 -0500655# Use GICV3 driver
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500656clean_build PLAT=qemu $(common_flags) QEMU_USE_GIC_DRIVER=QEMU_GICV3 \
Zelalemc9531f82020-08-04 15:37:08 -0500657 ENABLE_STACK_PROTECTOR=strong
658# Use encrypted FIP feature.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500659clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500660 BL32_RAM_LOCATION=tdram DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL31=1 \
661 ENCRYPT_BL32=1 FW_ENC_STATUS=0 SPD=opteed
Jens Wiklander1a9c2be2021-11-26 09:56:55 +0100662# QEMU with SPMD support
663clean_build PLAT=qemu $(common_flags) BL32=Makefile \
664 BL32_RAM_LOCATION=tdram ARM_BL31_IN_DRAM=1 \
665 SPD=spmd CTX_INCLUDE_EL2_REGS=0 SPMD_SPM_AT_SEL2=0 SPMC_OPTEE=1
Ruchika Gupta86e7f682022-04-12 10:25:46 +0530666# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500667clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} MBOOT_EL_HASH_ALG=sha256 MEASURED_BOOT=1
Zelalemc9531f82020-08-04 15:37:08 -0500668
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500669clean_build PLAT=qemu_sbsa $(common_flags)
Fathi Boudra422bf772019-12-02 11:10:16 +0200670
Zelalemd86e8762020-08-21 18:24:28 -0500671# QEMU with SPM support
672clean_build PLAT=qemu_sbsa $(common_flags) BL32=Makefile SPM_MM=1 \
Paul Sokolovskycf9fe862023-01-02 16:22:21 +0300673 EL3_EXCEPTION_HANDLING=1 ENABLE_SME_FOR_NS=0 ENABLE_SVE_FOR_NS=0
Zelalemd86e8762020-08-21 18:24:28 -0500674
Fathi Boudra422bf772019-12-02 11:10:16 +0200675# For hikey enable PMF to include all files in the platform port
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500676make PLAT=hikey $(common_flags) ${TBB_OPTIONS} ENABLE_PMF=1 all
677make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} all
Lukas Haneld0752392022-10-13 11:13:19 +0200678make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} SPD=spmd SPMC_AT_EL3=1 \
679 SPMD_SPM_AT_SEL2=0 BL32=optee PLAT_SP_MANIFEST_DTS=foo NEED_FDT=no all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500680make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200681
Zelalemc9531f82020-08-04 15:37:08 -0500682# Platforms from Socionext
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500683clean_build PLAT=uniphier $(common_flags) ${TBB_OPTIONS} SPD=tspd
684clean_build PLAT=uniphier $(common_flags) FIP_GZIP=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200685
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500686clean_build PLAT=synquacer $(common_flags) SPM_MM=1 \
Jassi Brar86080922022-06-27 14:16:34 -0500687 RESET_TO_BL31=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0 \
688 PRELOADED_BL33_BASE=0x0
Zelalemc9531f82020-08-04 15:37:08 -0500689
690# Support for SCP Message Interface protocol with platform specific drivers
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500691clean_build PLAT=synquacer $(common_flags) \
Jassi Brar86080922022-06-27 14:16:34 -0500692 RESET_TO_BL31=1 PRELOADED_BL33_BASE=0x0 SQ_USE_SCMI_DRIVER=1
Zelalemc9531f82020-08-04 15:37:08 -0500693
Jassi Brarb8c7ca02022-06-27 14:22:10 -0500694# Support for BL2 and TBBR
695clean_build PLAT=synquacer $(common_flags) \
696 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
697 SQ_USE_SCMI_DRIVER=1 SPD=opteed all
698
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500699make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200700
Zelalemc9531f82020-08-04 15:37:08 -0500701# Raspberry Pi Platforms
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500702make PLAT=rpi3 $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500703 ENABLE_STACK_PROTECTOR=strong PRELOADED_BL33_BASE=0xDEADBEEF all
Andre Przywarae917ec82021-09-03 15:01:30 +0100704clean_build PLAT=rpi4 $(common_flags) SMC_PCI_SUPPORT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200705
Zelalemc9531f82020-08-04 15:37:08 -0500706# A113D (AXG) platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500707clean_build PLAT=axg $(common_flags) SPD=opteed
708clean_build PLAT=axg $(common_flags) AML_USE_ATOS=1
Zelalemc9531f82020-08-04 15:37:08 -0500709
Stephan Gerhold141a7662021-12-07 20:42:14 +0100710# QTI MSM8916 platform
711clean_build PLAT=msm8916 $(common_flags)
712
Fathi Boudra422bf772019-12-02 11:10:16 +0200713cd ..