blob: 36fec073db4d7ca8bda4901cc8aeb0aa7e8280f6 [file] [log] [blame]
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Govindraj Rajadff55c92025-02-04 16:24:21 -06003# Copyright (c) 2019-2025, Arm Limited and Contributors. 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
Harrison Mutaiee958c12023-09-06 12:16:21 +010017set -E
Harrison Mutai3f483132024-05-09 09:48:58 +000018error() {
19 rc=$?;
20 error_count=$((error_count+1));
21 echo "ERROR: signal $rc at ${1} ${2} (error_count = $error_count)"
22}
23trap 'error "${BASH_SOURCE}" "${LINENO}"' ERR INT
Fathi Boudra422bf772019-12-02 11:10:16 +020024
25TF_SOURCES=$1
26if [ ! -d "$TF_SOURCES" ]; then
27 echo "ERROR: '$TF_SOURCES' does not exist or is not a directory"
28 echo "Usage: $(basename "$0") <trusted-firmware-directory>"
29 exit 1
30fi
31
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050032containing_dir="$(readlink -f "$(dirname "$0")/")"
33. $containing_dir/common-def.sh
34
Fathi Boudra422bf772019-12-02 11:10:16 +020035# Get mbed TLS library code to build Trusted Firmware with Trusted Board Boot
36# support. The version of mbed TLS to use here must be the same as when
37# building TF in the usual context.
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050038if [ ! -d "$MBED_TLS_DIR" ]; then
39 git clone -q --depth 1 -b "$MBED_TLS_SOURCES_TAG" "$MBED_TLS_URL_REPO" "$MBED_TLS_DIR"
Fathi Boudra422bf772019-12-02 11:10:16 +020040fi
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -050041
David Vincze82db6932024-02-21 12:05:50 +010042if [ ! -d "$QCBOR_LIB_DIR" ]; then
43 git clone "$QCBOR_URL_REPO" "$QCBOR_LIB_DIR"
44 cd "$QCBOR_LIB_DIR"
45 git checkout v1.2
46fi
47
Fathi Boudra422bf772019-12-02 11:10:16 +020048cd "$TF_SOURCES"
49
50# Clean TF source dir to make sure we don't analyse temporary files.
51make distclean
52
53#
54# Build TF in different configurations to get as much coverage as possible
55#
56
Fathi Boudra422bf772019-12-02 11:10:16 +020057#
58# FVP platform
59# We'll use the following flags for all FVP builds.
60#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050061fvp_common_flags="$(common_flags) PLAT=fvp"
Fathi Boudra422bf772019-12-02 11:10:16 +020062
63# Try all possible SPDs.
Chris Kayab29d432023-08-10 13:06:18 +000064clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram \
65 SPD=tspd FVP_TRUSTED_SRAM_SIZE=384
Fathi Boudra422bf772019-12-02 11:10:16 +020066clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd TSP_INIT_ASYNC=1 \
Sona Mathew40e5be92023-08-10 16:31:45 -050067 TSP_NS_INTR_ASYNC_PREEMPT=1 FVP_TRUSTED_SRAM_SIZE=384
Manish V Badarkhe48ed0bf2023-06-28 09:33:16 +010068clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=opteed FVP_TRUSTED_SRAM_SIZE=384
Govindraj Rajad37da762025-04-10 10:04:11 -050069clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tlkd ENABLE_FEAT_D128=0 FVP_TRUSTED_SRAM_SIZE=384
Manish V Badarkhee7528ff2023-07-01 10:20:05 +010070clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=pncd SPD_PNCD_NS_IRQ=126 \
71 SPD_PNCD_S_IRQ=15 FVP_TRUSTED_SRAM_SIZE=384
Fathi Boudra422bf772019-12-02 11:10:16 +020072
Zelalemc9531f82020-08-04 15:37:08 -050073# Dualroot chain of trust.
Harrison Mutai0dd5f532024-03-15 13:42:40 +000074clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tspd COT=dualroot \
75 FVP_TRUSTED_SRAM_SIZE=384
Zelalemc9531f82020-08-04 15:37:08 -050076
laurenw-armf48e9d22022-04-22 11:30:13 -050077# FEAT_RME with CCA chain of trust.
Manish V Badarkhe5304aaf2023-08-18 14:38:20 +010078clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} USE_ROMLIB=1 \
Manish V Badarkhed5e9c752023-11-07 17:57:36 +000079 ENABLE_RME=1 MEASURED_BOOT=1
laurenw-armf48e9d22022-04-22 11:30:13 -050080
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050081clean_build $fvp_common_flags SPD=trusty
82clean_build $fvp_common_flags SPD=trusty TRUSTY_SPD_WITH_GENERIC_SERVICES=1
Fathi Boudra422bf772019-12-02 11:10:16 +020083
Sona Mathewff9c2a72023-05-10 21:18:01 -050084# ERRATA ABI
85clean_build $fvp_common_flags ERRATA_ABI_SUPPORT=1
86
Fathi Boudra422bf772019-12-02 11:10:16 +020087# SDEI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050088clean_build $fvp_common_flags SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Fathi Boudra422bf772019-12-02 11:10:16 +020089
Zelalemc9531f82020-08-04 15:37:08 -050090# SDEI with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050091clean_build $fvp_common_flags SDEI_IN_FCONF=1 SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Zelalemc9531f82020-08-04 15:37:08 -050092
Zelalem4f3633e2021-06-18 11:53:47 -050093# PCI Service
94clean_build $fvp_common_flags SMC_PCI_SUPPORT=1
95
Zelalemc9531f82020-08-04 15:37:08 -050096# Secure interrupt descriptors with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050097clean_build $fvp_common_flags SEC_INT_DESC_IN_FCONF=1
Zelalemc9531f82020-08-04 15:37:08 -050098
Fathi Boudra422bf772019-12-02 11:10:16 +020099# Without coherent memory
Sona Mathewa06f62d2023-08-24 16:34:13 -0500100clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd \
101 USE_COHERENT_MEM=0 FVP_TRUSTED_SRAM_SIZE=384
Fathi Boudra422bf772019-12-02 11:10:16 +0200102
103# Using PSCI extended State ID format rather than the original format
Sona Mathewa06f62d2023-08-24 16:34:13 -0500104clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd \
105 PSCI_EXTENDED_STATE_ID=1 ARM_RECOM_STATE_ID_ENC=1 FVP_TRUSTED_SRAM_SIZE=384
Fathi Boudra422bf772019-12-02 11:10:16 +0200106
107# Alternative boot flows (This changes some of the platform initialisation code)
Elizabeth Ho4cdb2f42023-07-11 12:27:14 +0100108clean_build $fvp_common_flags EL3_PAYLOAD_BASE=0x80000000
Fathi Boudra422bf772019-12-02 11:10:16 +0200109clean_build $fvp_common_flags PRELOADED_BL33_BASE=0x80000000
110
111# Using the SP804 timer instead of the Generic Timer
112clean_build $fvp_common_flags FVP_USE_SP804_TIMER=1
113
114# Using the CCN driver and multi cluster topology
115clean_build $fvp_common_flags FVP_CLUSTER_COUNT=4
116
Nandan J908020a2025-05-02 05:38:04 +0000117# PMF and ACS SMC handler support
118clean_build $fvp_common_flags ENABLE_PMF=1 ENABLE_ACS_SMC=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200119
120# stack protector
121clean_build $fvp_common_flags ENABLE_STACK_PROTECTOR=strong
122
123# AArch32 build
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500124clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200125 ARCH=aarch32 AARCH32_SP=sp_min \
126 RESET_TO_SP_MIN=1 PRELOADED_BL33_BASE=0x80000000
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500127clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200128 ARCH=aarch32 AARCH32_SP=sp_min
129
130# Xlat tables lib version 1 (AArch64 and AArch32)
131clean_build $fvp_common_flags ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500132clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200133 ARCH=aarch32 AARCH32_SP=sp_min ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
134
Zelalemc9531f82020-08-04 15:37:08 -0500135# SPM support based on Management Mode Interface Specification
Manish Pandeyaa9a03b2021-11-17 10:03:17 +0000136clean_build $fvp_common_flags SPM_MM=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0
Fathi Boudra422bf772019-12-02 11:10:16 +0200137
Zelalemc9531f82020-08-04 15:37:08 -0500138# SPM support with TOS(optee) as SPM sitting at S-EL1
139clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0
140
Shruti Gupta8cc89b92022-08-09 12:23:46 +0100141# SPM support with SPM at EL3 and TSP at S-EL1
142clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 CTX_INCLUDE_EL2_REGS=0 EL3_EXCEPTION_HANDLING=0 \
143 SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1 \
144 ARM_SPMC_MANIFEST_DTS=plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts
145
Zelalemc9531f82020-08-04 15:37:08 -0500146# SPM support with Secure hafnium as SPM sitting at S-EL2
147# SP_LAYOUT_FILE is used only during FIP creation but build won't progress
148# if we have NULL value to it, so passing a dummy string.
149clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=1 ARM_ARCH_MINOR=4 \
Max Shvetsov44d2a702021-02-18 16:41:45 +0000150 CTX_INCLUDE_EL2_REGS=1 SP_LAYOUT_FILE=dummy
Fathi Boudra422bf772019-12-02 11:10:16 +0200151
J-Alves85ba07b2023-07-12 14:37:45 +0100152# SPM support with logical partitions in the SPMD.
153clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=1 ARM_ARCH_MINOR=4 \
154 CTX_INCLUDE_EL2_REGS=1 SP_LAYOUT_FILE=dummy ENABLE_SPMD_LP=1
155
Marc Bonnici502fdaa2022-01-10 12:38:23 +0000156# SPM support with SPM sitting at EL3
157clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0 SPMC_AT_EL3=1
158
Harrison Mutaib352c0e2023-08-11 18:27:57 +0100159# Firmware Handoff framework support
160clean_build $fvp_common_flags TRANSFER_LIST=1
Harrison Mutai0e2a5292025-02-18 11:10:52 +0000161clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- TRANSFER_LIST=1 \
162 AARCH32_SP=sp_min ARCH=aarch32
Harrison Mutaifbadee42025-02-18 10:47:48 +0000163clean_build $fvp_common_flags TRANSFER_LIST=1 ${ARM_TBB_OPTIONS} \
Harrison Mutaia2186a52025-04-29 16:24:17 +0000164 MBOOT_EL_HASH_ALG=sha256 MEASURED_BOOT=1 FVP_TRUSTED_SRAM_SIZE=384
Harrison Mutaib352c0e2023-08-11 18:27:57 +0100165
Manish Pandeyd47c1cf2024-12-09 11:06:59 +0000166# HOB List support
167clean_build $fvp_common_flags HOB_LIST=1
168
Fathi Boudra422bf772019-12-02 11:10:16 +0200169#BL2 at EL3 support
Harrison Mutaic3c8cfc2023-09-05 12:03:03 +0100170clean_build $fvp_common_flags RESET_TO_BL2=1 FVP_TRUSTED_SRAM_SIZE=384
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500171clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Maksims Svecovs7a0da522023-03-06 16:28:27 +0000172 ARCH=aarch32 AARCH32_SP=sp_min RESET_TO_BL2=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200173
Zelalemc9531f82020-08-04 15:37:08 -0500174# RAS Extension Support
Manish Pandeyc1fa25b2023-02-16 17:35:36 +0000175clean_build $fvp_common_flags EL3_EXCEPTION_HANDLING=1 ENABLE_FEAT_RAS=1 \
Manish Pandeyf3816802023-10-11 17:13:58 +0100176 FAULT_INJECTION_SUPPORT=1 HANDLE_EA_EL3_FIRST_NS=1 \
Manish Pandey010e9b42023-04-24 15:49:27 +0100177 SDEI_SUPPORT=1 PLATFORM_TEST_RAS_FFH=1
Zelalemc9531f82020-08-04 15:37:08 -0500178
Manish Pandeyfd4c6b72023-04-24 10:29:52 +0100179# EA handled in EL3 first
180clean_build $fvp_common_flags HANDLE_EA_EL3_FIRST_NS=1 PLATFORM_TEST_EA_FFH=1
181
Zelalemc9531f82020-08-04 15:37:08 -0500182# Hardware Assisted Coherency(DynamIQ)
183clean_build $fvp_common_flags FVP_CLUSTER_COUNT=1 FVP_MAX_CPUS_PER_CLUSTER=8 \
184 HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0
185
186# Pointer Authentication Support
187clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 \
Sona Mathewa06f62d2023-08-24 16:34:13 -0500188 ARM_ARCH_MINOR=5 EL3_EXCEPTION_HANDLING=1 BRANCH_PROTECTION=1 SDEI_SUPPORT=1 SPD=tspd \
Sona Mathew08c17962023-08-28 09:36:17 -0500189 TSP_NS_INTR_ASYNC_PREEMPT=1 FVP_TRUSTED_SRAM_SIZE=384
Zelalemc9531f82020-08-04 15:37:08 -0500190
191# Undefined Behaviour Sanitizer
192# Building with UBSAN SANITIZE_UB=on increases the executable size.
193# Hence it is only properly supported in bl31 with RESET_TO_BL31 enabled
194make $fvp_common_flags clean
Manish V Badarkhe4e79cab2023-09-07 10:07:58 +0100195make $fvp_common_flags SANITIZE_UB=on RESET_TO_BL31=1 FVP_TRUSTED_SRAM_SIZE=384 bl31
Zelalemc9531f82020-08-04 15:37:08 -0500196
197# debugfs feature
198clean_build $fvp_common_flags DEBUG=1 USE_DEBUGFS=1
199
200# MPAM feature
Arvind Ram Prakashbd4e43a2023-10-02 11:12:34 -0500201clean_build $fvp_common_flags ENABLE_FEAT_MPAM=1
Zelalemc9531f82020-08-04 15:37:08 -0500202
Arvind Ram Prakashd2e27e62024-06-17 14:28:12 -0500203# Debugv8p9 feature
204clean_build $fvp_common_flags ENABLE_FEAT_DEBUGV8P9=1
205
Arvind Ram Prakasha6b9b4c2024-06-17 13:49:31 -0500206# Feat_FGT2 (Fine-grained Traps 2) feature
207clean_build $fvp_common_flags ENABLE_FEAT_FGT2=1
208
Arvind Ram Prakash92c76212024-12-11 10:26:55 -0600209# Feat_FPMR (Floating Point Mode Register) feature
210clean_build $fvp_common_flags ENABLE_FEAT_FPMR=1
211
Jayanth Dodderi Chidanandfb69c8a2024-09-04 22:03:27 +0100212# FEAT_TCR2
213clean_build $fvp_common_flags ENABLE_FEAT_TCR2=1
214
Govindraj Raja87888b02024-09-13 11:48:44 -0500215# FEAT_THE, FEAT_SCTLR2
216clean_build $fvp_common_flags ENABLE_FEAT_THE=1 ENABLE_FEAT_SCTLR2=1
217
Zelalemc9531f82020-08-04 15:37:08 -0500218# Using GICv3.1 driver with extended PPI and SPI range
219clean_build $fvp_common_flags GIC_EXT_INTID=1
220
221# Using GICv4 features with extended PPI and SPI range
222clean_build $fvp_common_flags GIC_ENABLE_V4_EXTN=1 GIC_EXT_INTID=1
223
Boyan Karatotev7fa3a792025-04-25 09:52:24 +0100224# GICv5
225clean_build $fvp_common_flags FVP_USE_GIC_DRIVER=FVP_GICV5 FVP_DT_PREFIX=fvp-base-gicv3-psci
226
Alexei Fedorov20fdf502020-07-27 17:36:38 +0100227# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500228clean_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 +0100229
Manish V Badarkhef43e3f52022-06-21 20:37:25 +0100230# DRTM
231clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} TPM_HASH_ALG=sha256 DRTM_SUPPORT=1 USE_ROMLIB=1
232
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100233# CoT descriptors in device tree
laurenw-arm23b77592024-06-07 15:54:30 -0500234# TBBR chain of trust
Manish V Badarkhe81102d12020-10-05 08:02:30 +0100235clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 USE_ROMLIB=1
laurenw-arm23b77592024-06-07 15:54:30 -0500236# Dualroot chain of trust
237clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 COT=dualroot FVP_TRUSTED_SRAM_SIZE=384 SPD=tspd
238# CCA chain of trust
239clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 COT=cca FVP_TRUSTED_SRAM_SIZE=384
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100240
Chris Kayf4789fe2023-06-12 15:52:28 +0100241# PSA FWU support
242clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_GPT_SUPPORT=1 PSA_FWU_SUPPORT=1 USE_ROMLIB=1 FVP_TRUSTED_SRAM_SIZE=384
Manish V Badarkhe107c8e32021-08-02 19:49:32 +0100243
Manish V Badarkhe92616ae2023-09-18 10:06:00 +0100244# PSA Crypto support
245clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} PSA_CRYPTO=1 FVP_TRUSTED_SRAM_SIZE=384
246
johpow01153c8b22021-11-03 14:38:36 -0500247# SME and HCX features
248clean_build $fvp_common_flags ENABLE_SME_FOR_NS=1 ENABLE_FEAT_HCX=1
249
Jayanth Dodderi Chidanand41edd012023-01-12 14:50:34 +0000250# SME2
251clean_build $fvp_common_flags ENABLE_SME2_FOR_NS=1 ENABLE_SME_FOR_NS=1 ENABLE_FEAT_HCX=1
252
Jayanth Dodderi Chidanand84da1962022-04-11 11:38:44 +0100253# Architectural Feature Detection mechanism
254clean_build $fvp_common_flags FEATURE_DETECTION=1
255
Manish Pandeye3561fd2023-01-05 10:46:25 +0000256# RNG trap feature
257clean_build $fvp_common_flags ENABLE_FEAT_RNG=1 ENABLE_FEAT_RNG_TRAP=1
258
Yi Choua765ae42023-05-26 15:51:02 +0800259# OPTEE_ALLOW_SMC_LOAD and CROS_WIDEVINE_SMC features
260clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=opteed OPTEE_ALLOW_SMC_LOAD=1 CROS_WIDEVINE_SMC=1 PLAT_XLAT_TABLES_DYNAMIC=1 FVP_TRUSTED_SRAM_SIZE=384
Jeffrey Kardatzke09e18e22023-01-25 12:24:13 -0800261
Jayanth Dodderi Chidanand508936d2023-12-22 14:33:38 +0000262# Report Context_Memory
263clean_build $fvp_common_flags PLATFORM_REPORT_CTX_MEM_USE=1
264
Govindraj Rajaef67db82024-05-02 09:57:13 -0500265# Build newer CPU's with no model available yet.
266clean_build $fvp_common_flags CTX_INCLUDE_AARCH32_REGS=0 HW_ASSISTED_COHERENCY=1 \
267 USE_COHERENT_MEM=0 BUILD_CPUS_WITH_NO_FVP_MODEL=1 FVP_TRUSTED_SRAM_SIZE=384
268
Govindraj Rajadff55c92025-02-04 16:24:21 -0600269# Build all CPU's with all errata's with FVP platform.
270clean_build $fvp_common_flags CTX_INCLUDE_AARCH32_REGS=0 HW_ASSISTED_COHERENCY=1 \
271 USE_COHERENT_MEM=0 ENABLE_ERRATA_ALL=1 FVP_TRUSTED_SRAM_SIZE=384
272
Raghu Krishnamurthye27e25d2024-09-21 10:25:56 -0700273# Sign Realm tokens with EL3 signing service
274clean_build $fvp_common_flags ENABLE_RME=1 RMMD_ENABLE_EL3_TOKEN_SIGN=1
275
Manish V Badarkhe481a20a2025-04-14 23:12:52 +0100276# Build with Live Firmware Activation support
277clean_build $fvp_common_flags LFA_SUPPORT=1
278
279# Build with RMM Live Firmware Activation support
280clean_build $fvp_common_flags ENABLE_RME=1 LFA_SUPPORT=1
281
Fathi Boudra422bf772019-12-02 11:10:16 +0200282#
283# Juno platform
284# We'll use the following flags for all Juno builds.
285#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500286juno_common_flags="$(common_flags) PLAT=juno"
Fathi Boudra422bf772019-12-02 11:10:16 +0200287clean_build $juno_common_flags SPD=tspd ${ARM_TBB_OPTIONS}
Elizabeth Ho4cdb2f42023-07-11 12:27:14 +0100288clean_build $juno_common_flags EL3_PAYLOAD_BASE=0x80000000
Manish V Badarkhe05626442023-09-12 09:54:50 +0100289clean_build $juno_common_flags ENABLE_STACK_PROTECTOR=strong ETHOSN_NPU_DRIVER=1
Harrison Mutaid8aff2a2024-05-08 10:40:21 +0000290# FIXME: temporarily disable debug builds for this configuration until BL2 size
291# issues are resolved.
Harrison Mutaic70ba542024-05-09 13:17:12 +0000292clean_build "$(common_flags release) PLAT=juno" ${ARM_TBB_OPTIONS} \
Harrison Mutaid8aff2a2024-05-08 10:40:21 +0000293 ENABLE_STACK_PROTECTOR=strong ETHOSN_NPU_DRIVER=1 ETHOSN_NPU_TZMP1=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200294clean_build $juno_common_flags CSS_USE_SCMI_SDS_DRIVER=0
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500295
Jayanth Dodderi Chidanand055394a2022-10-19 09:20:20 +0100296# TRNG Service
297clean_build $juno_common_flags TRNG_SUPPORT=1
298
Fathi Boudra422bf772019-12-02 11:10:16 +0200299#
Vijayenthiran Subramaniama66de332020-11-23 14:20:14 +0530300# Reference Design Platform RD-N2
301#
302make $(common_flags) PLAT=rdn2 ${ARM_TBB_OPTIONS} all
Manish Pandeyf3816802023-10-11 17:13:58 +0100303
Nishant Sharmabd7092e2023-10-11 09:17:13 +0100304# SPMC At EL3 Support
305make $(common_flags) PLAT=rdn2 ${ARM_TBB_OPTIONS} SPMC_AT_EL3=1 SPD=spmd \
306 SPMD_SPM_AT_SEL2=0 BL32=1 SPMC_AT_EL3_SEL0_SP=1 EL3_EXCEPTION_HANDLING=1 \
307 PLAT_RO_XLAT_TABLES=1 all
Vijayenthiran Subramaniama66de332020-11-23 14:20:14 +0530308
309#
Jerry Wang700472b2024-07-12 11:36:42 +0100310# Reference Design Platform RD-V3
Nuno Lopesd791e272024-04-25 14:46:49 +0100311#
Jerry Wang700472b2024-07-12 11:36:42 +0100312make $(common_flags) PLAT=rdv3 ${ARM_TBB_OPTIONS} COT=cca DEBUG=1 \
Nuno Lopesd791e272024-04-25 14:46:49 +0100313 ENABLE_RME=1 MEASURED_BOOT=1 PLAT_MHU_VERSION=3 RMM=/dev/null \
314 RME_GPT_BITLOCK_BLOCK=0 all
315
316#
Zelalemc9531f82020-08-04 15:37:08 -0500317# Neoverse N1 SDP platform
318#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500319make $(common_flags) PLAT=n1sdp ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500320
321#
322# FVP VE platform
323#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500324make $(common_flags) PLAT=fvp_ve AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500325 CROSS_COMPILE=arm-none-eabi- ARM_ARCH_MAJOR=7 \
326 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
327 FVP_HW_CONFIG_DTS=fdts/fvp-ve-Cortex-A5x1.dts all
328
329#
330# A5 DesignStart Platform
331#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500332make $(common_flags) PLAT=a5ds AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500333 ARM_ARCH_MAJOR=7 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
334 CROSS_COMPILE=arm-none-eabi- FVP_HW_CONFIG_DTS=fdts/a5ds.dts
335
336#
337# Corstone700 Platform
338#
339
340corstone700_common_flags="CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500341 $(common_flags) \
Zelalemc9531f82020-08-04 15:37:08 -0500342 PLAT=corstone700 \
343 ARCH=aarch32 \
344 RESET_TO_SP_MIN=1 \
345 AARCH32_SP=sp_min \
346 ARM_LINUX_KERNEL_AS_BL33=0 \
347 ARM_PRELOADED_DTB_BASE=0x80400000 \
348 ENABLE_PIE=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500349 ENABLE_STACK_PROTECTOR=all \
350 all"
351
352echo "Info: Building Corstone700 FVP ..."
353
354make TARGET_PLATFORM=fvp ${corstone700_common_flags}
355
356echo "Info: Building Corstone700 FPGA ..."
357
358make TARGET_PLATFORM=fpga ${corstone700_common_flags}
359
360#
361# Arm internal FPGA port
362#
Andre Przywara13361b62022-04-26 11:16:55 +0100363make PLAT=arm_fpga $(common_flags release) \
364 FPGA_PRELOADED_DTB_BASE=0x88000000 PRELOADED_BL33_BASE=0x82080000 all
Zelalemc9531f82020-08-04 15:37:08 -0500365
366#
Usama Arifcba711d2021-08-04 15:53:42 +0100367# Total Compute platforms
Zelalemc9531f82020-08-04 15:37:08 -0500368#
David Vincze5d87f6a2024-10-30 15:17:45 +0000369clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} MEASURED_BOOT=1 \
Joel Goddard571a93c2024-02-29 15:31:48 +0000370 PLAT_MHU_VERSION=3
David Vincze5d87f6a2024-10-30 15:17:45 +0000371clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} MEASURED_BOOT=1 \
David Vincze82db6932024-02-21 12:05:50 +0100372 DICE_PROTECTION_ENVIRONMENT=1 QCBOR_DIR=$(pwd)/qcbor
Quoc Khanh Le2acaceb2024-06-20 15:07:43 +0100373clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} PLATFORM_TEST=rse-rotpk
374clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} PLATFORM_TEST=rse-nv-counters
375clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=3 ${ARM_TBB_OPTIONS} PLATFORM_TEST=tfm-testsuite \
David Vincze5d87f6a2024-10-30 15:17:45 +0000376 MEASURED_BOOT=1 QCBOR_DIR=$(pwd)/qcbor TF_M_TESTS_PATH=$(pwd)/../tf-m-tests TF_M_EXTRAS_PATH=$(pwd)/../tf-m-extras
Leo Yan45d51632024-08-27 16:02:28 +0100377clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
Icen.Zeyadaaaae3e72024-12-18 12:39:34 +0000378 ENABLE_STACK_PROTECTOR=strong PLAT_MHU_VERSION=3
379clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
380 ENABLE_STACK_PROTECTOR=strong PLATFORM_TEST=rse-rotpk
381clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
382 ENABLE_STACK_PROTECTOR=strong PLATFORM_TEST=rse-nv-counters
383clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
384 ENABLE_STACK_PROTECTOR=strong PLATFORM_TEST=tfm-testsuite \
Manish V Badarkhe75ff2132025-02-03 11:13:40 +0000385 MEASURED_BOOT=1 QCBOR_DIR=$(pwd)/qcbor TF_M_TESTS_PATH=$(pwd)/../tf-m-tests TF_M_EXTRAS_PATH=$(pwd)/../tf-m-extras
Icen.Zeyadaaaae3e72024-12-18 12:39:34 +0000386clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=4 ${ARM_TBB_OPTIONS} \
387 ENABLE_STACK_PROTECTOR=strong MEASURED_BOOT=1 \
Leo Yan1a9345f2024-10-03 11:00:16 +0100388 DICE_PROTECTION_ENVIRONMENT=1 QCBOR_DIR=$(pwd)/qcbor
Fathi Boudra422bf772019-12-02 11:10:16 +0200389
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530390#
391# Morello platform
392#
Chandni Cherukuricbd45962021-12-12 13:37:33 +0530393clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=fvp ${ARM_TBB_OPTIONS}
394clean_build $(common_flags) PLAT=morello TARGET_PLATFORM=soc ${ARM_TBB_OPTIONS}
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530395
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100396#
Vishnu Banavath2cb72b32022-01-20 14:27:55 +0000397# corstone1000 Platform
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100398#
399
Ziad Elhanafy9352d0c2024-10-03 17:13:25 +0100400clean_build $(common_flags) \
401 PLAT=corstone1000 \
402 SPD=spmd \
403 TARGET_PLATFORM=fpga \
404 ENABLE_STACK_PROTECTOR=strong \
405 ENABLE_PIE=1 \
406 RESET_TO_BL2=1 \
407 SPMD_SPM_AT_SEL2=0 \
408 ${ARM_TBB_OPTIONS} \
409 CREATE_KEYS=1 \
410 COT=tbbr \
411 ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
412 bl2 \
413 bl31
Abdellatif El Khlific16fe912021-08-03 12:35:16 +0100414
johpow01aac58582021-10-05 16:51:34 -0500415#
Divin Raj6aa589d2024-04-17 11:38:07 +0100416# RD-1 AE platform
417#
Ziad Elhanafy9352d0c2024-10-03 17:13:25 +0100418clean_build $(common_flags) \
419 PLAT=rd1ae \
420 ARCH=aarch64 \
421 ${ARM_TBB_OPTIONS} \
422 GENERATE_COT=1 \
423 COT=tbbr \
424 ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
425 bl2 \
426 bl31 \
427 SPD=spmd \
428 SPMD_SPM_AT_SEL2=0
Divin Raj6aa589d2024-04-17 11:38:07 +0100429
Fathi Boudra422bf772019-12-02 11:10:16 +0200430# Partners' platforms.
431# Enable as many features as possible.
432# We don't need to clean between each build here because we only do one build
433# per platform so we don't hit the build flags dependency problem.
Fathi Boudra422bf772019-12-02 11:10:16 +0200434
Manish Pandey9c0ee742021-07-08 09:55:59 +0100435# Platforms from Mediatek
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500436make PLAT=mt8173 $(common_flags) all
437make PLAT=mt8183 $(common_flags) all
Rex-BC Chen946cace2021-11-17 10:15:42 +0800438make PLAT=mt8186 $(common_flags) COREBOOT=1 all
Bo-Chen Chen4d63afd2022-08-30 16:34:57 +0800439make PLAT=mt8188 $(common_flags) COREBOOT=1 all
Gavin Liu1de29a32025-03-27 15:01:10 +0800440make PLAT=mt8189 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500441make PLAT=mt8192 $(common_flags) COREBOOT=1 all
Manish Pandey9c0ee742021-07-08 09:55:59 +0100442make PLAT=mt8195 $(common_flags) COREBOOT=1 all
Gavin Liu55eaafd2024-10-18 16:34:06 +0800443make PLAT=mt8196 $(common_flags) COREBOOT=1 all
Zelalemd86e8762020-08-21 18:24:28 -0500444
445# Platforms from Qualcomm
446make PLAT=sc7180 $(common_flags) COREBOOT=1 all
quic_assethif307a782024-12-10 17:32:18 +0530447make PLAT=qcs615 $(common_flags) COREBOOT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200448
Zelalemc9531f82020-08-04 15:37:08 -0500449make PLAT=rk3288 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500450 $(common_flags) ARCH=aarch32 AARCH32_SP=sp_min all
Madhukar Pappireddyd491ad02020-12-03 10:37:05 -0600451make PLAT=rk3368 $(common_flags) COREBOOT=1 \
452 ENABLE_STACK_PROTECTOR=strong all
453make PLAT=rk3399 $(common_flags) COREBOOT=1 PLAT_RK_DP_HDCP=1 \
454 ENABLE_STACK_PROTECTOR=strong all
455make PLAT=rk3328 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
456 ENABLE_STACK_PROTECTOR=strong all
XiaoDong Huang117f2f42025-02-15 11:05:58 +0800457make PLAT=rk3576 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
458 ENABLE_STACK_PROTECTOR=strong all
XiaoDong Huang9c7c0af2023-07-05 14:26:39 +0800459make PLAT=rk3588 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
460 ENABLE_STACK_PROTECTOR=strong all
Madhukar Pappireddyd491ad02020-12-03 10:37:05 -0600461make PLAT=px30 $(common_flags) PLAT_RK_SECURE_DDR_MINILOADER=1 \
462 ENABLE_STACK_PROTECTOR=strong all
shengfei Xu50ca4de2023-04-09 06:36:50 +0000463make PLAT=rk3568 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
464 ENABLE_STACK_PROTECTOR=strong all
Fathi Boudra422bf772019-12-02 11:10:16 +0200465
466# Although we do several consecutive builds for the Tegra platform below, we
467# don't need to clean between each one because the Tegra makefiles specify
468# a different build directory per SoC.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500469make PLAT=tegra TARGET_SOC=t210 $(common_flags) all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500470make PLAT=tegra TARGET_SOC=t186 $(common_flags) all
471make PLAT=tegra TARGET_SOC=t194 $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200472
473# For the Xilinx platform, artificially increase the extents of BL31 memory
474# (using the platform-specific build options ZYNQMP_ATF_MEM_{BASE,SIZE}).
475# If we keep the default values, BL31 doesn't fit when it is built with all
476# these build flags.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500477make PLAT=zynqmp $(common_flags) \
Fathi Boudra422bf772019-12-02 11:10:16 +0200478 RESET_TO_BL31=1 SPD=tspd \
Zelalem4f3633e2021-06-18 11:53:47 -0500479 SDEI_SUPPORT=1 \
Fathi Boudra422bf772019-12-02 11:10:16 +0200480 ZYNQMP_ATF_MEM_BASE=0xFFFC0000 ZYNQMP_ATF_MEM_SIZE=0x00040000 \
481 all
482
Zelalemc9531f82020-08-04 15:37:08 -0500483# Build both for silicon (default) and virtual QEMU platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500484clean_build PLAT=versal $(common_flags)
485clean_build PLAT=versal $(common_flags) VERSAL_PLATFORM=versal_virt
Zelalemc9531f82020-08-04 15:37:08 -0500486
Madhukar Pappireddy075709d2025-05-01 22:19:44 -0500487# Build Xilinx Versal NET platform with SDEI support
488clean_build PLAT=versal_net $(common_flags) SDEI_SUPPORT=1
Michal Simek0f135242022-09-20 15:24:56 +0200489
Jayanth Dodderi Chidanand0a2dd1e2022-10-27 11:17:37 +0100490# Build Xilinx Versal NET without Platform Management support
491clean_build PLAT=versal_net $(common_flags) TFA_NO_PM=1
492
Amit Nagalfb428442024-06-11 12:01:23 +0530493# Build Xilinx Versal Gen 2 platform
Madhukar Pappireddy5da8e202025-04-16 13:54:07 -0500494clean_build PLAT=versal2 $(common_flags) TFA_NO_PM=1
Harrison Mutai7ea23842025-04-08 09:23:58 +0000495clean_build PLAT=versal2 $(common_flags) TRANSFER_LIST=1
Amit Nagalfb428442024-06-11 12:01:23 +0530496
Zelalemc9531f82020-08-04 15:37:08 -0500497# Platforms from Allwinner
Andre Przywara3a78c102022-04-26 11:08:54 +0100498clean_build PLAT=sun50i_a64 $(common_flags release) all
499clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_NATIVE=0 all
500clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_PSCI_USE_SCPI=0 all
501clean_build PLAT=sun50i_a64 $(common_flags release) SUNXI_AMEND_DTB=1 all
Andre Przywaracf78a512021-09-03 14:59:38 +0100502clean_build PLAT=sun50i_h6 $(common_flags) all
503clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_NATIVE=0 all
504clean_build PLAT=sun50i_h6 $(common_flags) SUNXI_PSCI_USE_SCPI=0 all
505clean_build PLAT=sun50i_h616 $(common_flags) all
506clean_build PLAT=sun50i_r329 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500507
508# Platforms from i.MX
509make AARCH32_SP=optee ARCH=aarch32 ARM_ARCH_MAJOR=7 ARM_CORTEX_A7=yes \
510 CROSS_COMPILE=arm-none-eabi- PLAT=warp7 ${TBB_OPTIONS} \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500511 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500512make AARCH32_SP=optee ARCH=aarch32 CROSS_COMPILE=arm-none-eabi- PLAT=picopi \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500513 $(common_flags) all
Ying-Chun Liu (PaulLiu)f6528982021-11-17 17:20:00 +0800514make PLAT=imx8mm $(common_flags) NEED_BL2=yes MEASURED_BOOT=1 \
laurenw-arm8531e702022-06-09 15:32:37 -0500515 MBOOT_EL_HASH_ALG=sha256 ${TBB_OPTIONS} all
Madhukar Pappireddyc3ec06b2022-05-18 11:15:16 -0500516make PLAT=imx8mn $(common_flags) SDEI_SUPPORT=1 all
Ying-Chun Liu (PaulLiu)413e6102021-09-14 00:22:08 +0800517make PLAT=imx8mp $(common_flags) NEED_BL2=yes ${TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500518
Jacky Baib6cecc82021-06-07 09:49:46 +0800519# Due to the limited OCRAM space that can be used for TF-A, build test
520# will report failure caused by too small RAM size, so comment out the
521# build test for imx8mq in CI. It can also resolve the following ticket:
Zelalemc9531f82020-08-04 15:37:08 -0500522# https://developer.trustedfirmware.org/T626
Jacky Baib6cecc82021-06-07 09:49:46 +0800523#make PLAT=imx8mq $(common_flags release) all
Zelalemc9531f82020-08-04 15:37:08 -0500524
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500525make PLAT=imx8qm $(common_flags) all
526make PLAT=imx8qx $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500527
Jacky Baif5e936c2023-12-27 11:11:09 +0800528make PLAT=imx8ulp $(common_flags) all
529
Jacky Bai87091a62023-06-21 16:25:12 +0800530make PLAT=imx93 $(common_flags) all
531
Olivier Deprezbac70192021-04-02 08:55:36 +0200532# Platforms for NXP Layerscape
Jiafei Pane48e56c2021-09-30 10:32:54 +0800533nxp_sb_flags="TRUSTED_BOARD_BOOT=1 CST_DIR=$(pwd) SPD=opteed"
534nxp_sb_fuse_flags="${nxp_sb_flags} FUSE_PROG=1"
535
536# Platform lx2
Olivier Deprezbac70192021-04-02 08:55:36 +0200537make PLAT=lx2160aqds $(common_flags) all
538make PLAT=lx2160ardb $(common_flags) all
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500539
540#CSF Based CoT:
Jiafei Pane48e56c2021-09-30 10:32:54 +0800541clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
542 $nxp_sb_fuse_flags DDR_PHY_BIN_PATH=$(pwd)
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500543
544#X509 Based CoT
Jiafei Pane48e56c2021-09-30 10:32:54 +0800545clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=flexspi_nor \
546 $nxp_sb_flags GENERATE_COT=1 \
Madhukar Pappireddyf93a4d42021-06-01 17:44:51 -0500547 MBEDTLS_DIR=$(pwd)/mbedtls
548
549#BOOT_MODE=emmc and Stack protector
Jiafei Pane48e56c2021-09-30 10:32:54 +0800550clean_build PLAT=lx2162aqds $(common_flags) BOOT_MODE=emmc \
551 $nxp_sb_fuse_flags ENABLE_STACK_PROTECTOR=strong
552
553# Platform ls1028ardb
554clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor
555clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc
556clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd
557
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800558# ls1028a Secure Boot
Jiafei Pane48e56c2021-09-30 10:32:54 +0800559clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=flexspi_nor $nxp_sb_fuse_flags
560clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
561clean_build PLAT=ls1028ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
Olivier Deprezbac70192021-04-02 08:55:36 +0200562
Jiafei Pan5aa8fc72021-11-17 22:12:12 +0800563# Platform ls1043ardb
564clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor
565clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand
566clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd
567
568# ls1043ardb Secure Boot
569clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
570clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
571clean_build PLAT=ls1043ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
572
Jiafei Panbd0c22a2022-01-29 00:04:44 +0800573# ls1046ardb Secure Boot
574clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
575clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
576clean_build PLAT=ls1046ardb $(common_flags) all BOOT_MODE=emmc $nxp_sb_fuse_flags
577
578# ls1046afrwy Secure Boot
579clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
580clean_build PLAT=ls1046afrwy $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
581
582# ls1046aqds Secure Boot
583clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
584clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
585clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
586clean_build PLAT=ls1046aqds $(common_flags) all BOOT_MODE=nand $nxp_sb_fuse_flags
587
Jiafei Pan332cd792022-02-24 16:44:48 +0800588# ls1088ardb Secure Boot
589clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
590clean_build PLAT=ls1088ardb $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
591
592# ls1088aqds Secure Boot
593clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=qspi $nxp_sb_fuse_flags
594clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=sd $nxp_sb_fuse_flags
595clean_build PLAT=ls1088aqds $(common_flags) all BOOT_MODE=nor $nxp_sb_fuse_flags
596
Ghennadi Procopciuc731b0042024-02-01 09:22:26 +0200597# s32g274ardb2
598clean_build PLAT=s32g274ardb2 $(common_flags) all
599
Zelalemc9531f82020-08-04 15:37:08 -0500600# Platforms from Intel
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500601make PLAT=stratix10 $(common_flags) all
602make PLAT=agilex $(common_flags) all
Sieu Mun Tang9081bac2023-05-29 18:08:24 +0800603make PLAT=agilex5 $(common_flags) all
Sieu Mun Tang03b57362022-03-05 01:54:59 +0800604make PLAT=n5x $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500605
606# Platforms from Broadcom
Madhukar Pappireddy97ad2582021-11-15 10:29:23 -0600607clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t \
608 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 DRIVER_I2C_ENABLE=1
609clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t-ns3 \
610 INCLUDE_EMMC_DRIVER_ERASE_CODE=1 USE_USB=yes
Zelalemc9531f82020-08-04 15:37:08 -0500611
612# Platforms from Marvell
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500613make PLAT=a3700 $(common_flags) SCP_BL2=/dev/null CM3_SYSTEM_RESET=1 \
Manish Pandey9ef33c52022-10-25 16:41:49 +0100614 A3720_DB_PM_WAKEUP_SRC=1 HANDLE_EA_EL3_FIRST_NS=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500615
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600616# Source files from mv-ddr-marvell repository are necessary
617# to build below four platforms
Saheer Babuebfc4a02025-02-10 10:43:51 +0000618wget ${DOWNLOAD_SERVER_URL}/tf-a/mv-ddr-marvell/mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
Manish Pandey7c1e7452021-11-05 12:54:15 +0000619tar -xzf mv-ddr-marvell-5d41a995637de1dbc93f193db6ef0c8954cab316.tar.gz 2> /dev/null
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600620mv mv-ddr-marvell drivers/marvell/mv_ddr
Zelalemc9531f82020-08-04 15:37:08 -0500621
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600622# These platforms from Marvell have dependency on GCC-6.2.1 toolchain
Pali Rohár8f890402021-07-19 13:48:05 +0200623make 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 +0200624 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200625make 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 +0200626 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200627make 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 +0200628 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200629make 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 +0200630 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Robert Markodf3319e2021-10-20 11:01:12 +0200631make PLAT=a70x0_mochabin DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
632 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200633make 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 +0200634 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Pali Rohár8f890402021-07-19 13:48:05 +0200635make 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 +0200636 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Madhukar Pappireddy4fce99e2021-09-15 14:33:35 -0500637make PLAT=t9130_cex7_eval DEBUG=1 SCP_BL2=/dev/null BL33=/dev/null MV_DDR_PATH=$PWD/drivers/marvell/mv_ddr \
638 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all mrvl_flash
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500639
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600640# Removing the source files
641rm -rf drivers/marvell/mv_ddr 2> /dev/null
Zelalemc9531f82020-08-04 15:37:08 -0500642
643# Platforms from Meson
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500644make PLAT=gxbb $(common_flags) all
645make PLAT=gxl $(common_flags) all
646make PLAT=g12a $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500647
648# Platforms from Renesas
649# Renesas R-Car D3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500650clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500651 BL33=Makefile LIFEC_DBSC_PROTECT_ENABLE=0 LSI=D3 \
652 MBEDTLS_DIR=$(pwd)/mbedtls PMIC_ROHM_BD9571=0 \
653 RCAR_AVS_SETTING_ENABLE=0 SPD=none RCAR_LOSSY_ENABLE=0 \
654 RCAR_SA0_SIZE=0 RCAR_SYSTEM_SUSPEND=0 TRUSTED_BOARD_BOOT=1
655
656# Renesas R-Car H3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500657clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500658 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3 \
659 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
660 RCAR_DRAM_SPLIT=1 RCAR_GEN3_ULCB=1 SPD=opteed \
661 TRUSTED_BOARD_BOOT=1
662
663# Renesas R-Car H3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500664clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500665 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3N \
666 SPD=opteed TRUSTED_BOARD_BOOT=1
667
668# Renesas R-Car M3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500669clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500670 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3 \
671 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
672 RCAR_DRAM_SPLIT=2 RCAR_GEN3_ULCB=1 SPD=opteed \
673 TRUSTED_BOARD_BOOT=1
674
675# Renesas R-Car M3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500676clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500677 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3N \
678 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
679 RCAR_GEN3_ULCB=1 SPD=opteed TRUSTED_BOARD_BOOT=1
680
681# Renesas R-Car E3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500682clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500683 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=E3 \
684 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 \
685 RCAR_SA0_SIZE=0 SPD=opteed TRUSTED_BOARD_BOOT=1
686
687# Renesas R-Car V3M Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500688clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500689 MBEDTLS_DIR=$(pwd)/mbedtls BL33=Makefile LSI=V3M MACHINE=eagle \
690 PMIC_ROHM_BD9571=0 RCAR_DRAM_SPLIT=0 RCAR_SYSTEM_SUSPEND=0 \
691 AVS_SETTING_ENABLE=0 SPD=none TRUSTED_BOARD_BOOT=1
692
Zelalemf4299672021-01-29 12:52:59 -0600693# Renesas HiHope RZ/G2M development kit
694clean_build PLAT=rzg $(common_flags) \
695 MBEDTLS_DIR=$(pwd)/mbedtls LSI=G2M \
696 RCAR_DRAM_SPLIT=2 RCAR_LOSSY_ENABLE=1 SPD=none
697
Zelalemc9531f82020-08-04 15:37:08 -0500698# Platforms from ST
Yann Gautier868044b2024-06-19 10:42:51 +0200699stm32mp1_common_flags="ARCH=aarch32 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100700 ARM_ARCH_MAJOR=7 \
701 CROSS_COMPILE=arm-none-eabi- \
702 ENABLE_STACK_PROTECTOR=strong \
703 PLAT=stm32mp1"
704
Yann Gautiera69cf792021-09-01 11:19:01 +0200705# STM32MP1 SDMMC boot
Yann Gautierb6821192024-06-19 10:45:56 +0200706clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200707 BUILD_PLAT=build/stm32mp1-sdmmc/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100708 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200709
Yann Gautier15c45392023-08-21 11:03:33 +0200710# STM32MP1 SDMMC boot BL2 without AARCH32_SP
Yann Gautierb6821192024-06-19 10:45:56 +0200711clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautier15c45392023-08-21 11:03:33 +0200712 BUILD_PLAT=build/stm32mp1-sdmmc/debug \
713 bl2
714
Yann Gautierbd871522024-01-05 15:13:58 +0100715# STM32MP1 SDMMC boot BL2 with OP-TEE & FWU
Yann Gautierb6821192024-06-19 10:45:56 +0200716clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautierbd871522024-01-05 15:13:58 +0100717 BUILD_PLAT=build/stm32mp1-sdmmc/debug \
718 PSA_FWU_SUPPORT=1 AARCH32_SP=optee \
719 bl2
720
Yann Gautiera69cf792021-09-01 11:19:01 +0200721# STM32MP1 eMMC boot
Yann Gautierb6821192024-06-19 10:45:56 +0200722clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_EMMC=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200723 BUILD_PLAT=build/stm32mp1-emmc/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100724 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200725
726# STM32MP1 Raw NAND boot
Yann Gautierb6821192024-06-19 10:45:56 +0200727clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_RAW_NAND=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200728 BUILD_PLAT=build/stm32mp1-nand/debug \
Yann Gautierbd871522024-01-05 15:13:58 +0100729 PSA_FWU_SUPPORT=1 AARCH32_SP=optee \
730 bl2
Yann Gautiera69cf792021-09-01 11:19:01 +0200731
732# STM32MP1 SPI NAND boot
Yann Gautierb6821192024-06-19 10:45:56 +0200733clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_SPI_NAND=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200734 BUILD_PLAT=build/stm32mp1-snand/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100735 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200736
737# STM32MP1 SPI NOR boot
Yann Gautierb6821192024-06-19 10:45:56 +0200738clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_SPI_NOR=1 \
Yann Gautiera69cf792021-09-01 11:19:01 +0200739 BUILD_PLAT=build/stm32mp1-snor/debug \
Govindraj Raja95f855c2023-03-01 13:11:42 +0000740 AARCH32_SP=sp_min bl2 bl32
Yann Gautiera69cf792021-09-01 11:19:01 +0200741
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100742# STM32MP1 UART boot
Yann Gautierb6821192024-06-19 10:45:56 +0200743clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_UART_PROGRAMMER=1 \
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100744 BUILD_PLAT=build/stm32mp1-uart/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100745 AARCH32_SP=sp_min bl2 bl32
Patrick Delaunayd2017a42021-11-02 14:57:50 +0100746
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200747# STM32MP1 USB boot
Yann Gautierb6821192024-06-19 10:45:56 +0200748clean_build $(common_flags) ${stm32mp1_common_flags} STM32MP_USB_PROGRAMMER=1 \
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200749 BUILD_PLAT=build/stm32mp1-usb/debug \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100750 AARCH32_SP=sp_min bl2 bl32
Patrick Delaunay7d65acf2021-09-10 15:58:26 +0200751
Lionel Debieve8f464c02022-10-13 09:25:45 +0200752# STM32MP1 TBBR
Yann Gautierb6821192024-06-19 10:45:56 +0200753clean_build $(common_flags release) ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
Yann Gautier741e8492022-11-14 19:04:27 +0100754 BUILD_PLAT=build/stm32mp1-sdmmc-tbbr/debug \
Lionel Debieve8f464c02022-10-13 09:25:45 +0200755 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100756 AARCH32_SP=sp_min bl2 bl32
Lionel Debieve8f464c02022-10-13 09:25:45 +0200757
Govindraj Raja95f855c2023-03-01 13:11:42 +0000758stm32mp13_common_flags="${stm32mp1_common_flags} \
759 AARCH32_SP=optee \
Yann Gautier937684e2024-06-20 11:41:19 +0200760 DTB_FILE_NAME=stm32mp135f-dk.dtb \
Yann Gautierbd871522024-01-05 15:13:58 +0100761 PSA_FWU_SUPPORT=1 \
Govindraj Raja95f855c2023-03-01 13:11:42 +0000762 STM32MP13=1"
763
Yann Gautier773c5502022-03-10 17:24:47 +0100764# STM32MP13 SDMMC boot
Yann Gautierb6821192024-06-19 10:45:56 +0200765clean_build $(common_flags) ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100766 BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug bl2
Yann Gautier773c5502022-03-10 17:24:47 +0100767
Yann Gautierbd871522024-01-05 15:13:58 +0100768# STM32MP13 SDMMC boot with FWU
Yann Gautierb6821192024-06-19 10:45:56 +0200769clean_build $(common_flags) ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Yann Gautierbd871522024-01-05 15:13:58 +0100770 PSA_FWU_SUPPORT=1 \
771 BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug bl2
772
Lionel Debieve8f464c02022-10-13 09:25:45 +0200773# STM32MP13 TBBR
Yann Gautierb6821192024-06-19 10:45:56 +0200774clean_build $(common_flags release) ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Lionel Debieve8f464c02022-10-13 09:25:45 +0200775 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
Yann Gautierdfd8aa82022-11-02 14:34:26 +0100776 BUILD_PLAT=build/stm32mp1-mp13-sdmmc-tbbr/debug bl2
Lionel Debieve8f464c02022-10-13 09:25:45 +0200777
Yann Gautiera66e5012022-12-13 13:52:35 +0100778# STM32MP13 TBBR DECRYPTION AES GCM
Yann Gautierb6821192024-06-19 10:45:56 +0200779clean_build $(common_flags release) ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
Yann Gautiera66e5012022-12-13 13:52:35 +0100780 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
781 DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL32=1 \
782 BUILD_PLAT=build/stm32mp1-mp13-sdmmc-tbbr-dec/debug bl2
783
Yann Gautier868044b2024-06-19 10:42:51 +0200784stm32mp2_common_flags="ARCH=aarch64 \
Yann Gautiere9da1e22023-08-11 14:50:04 +0200785 CROSS_COMPILE=aarch64-none-elf- \
786 PLAT=stm32mp2"
787
788# STM32MP25 SDMMC boot
Yann Gautierb6821192024-06-19 10:45:56 +0200789clean_build $(common_flags) ${stm32mp2_common_flags} STM32MP_SDMMC=1 \
Yann Gautiere9da1e22023-08-11 14:50:04 +0200790 SPD=opteed STM32MP_DDR4_TYPE=1 \
791 BUILD_PLAT=build/stm32mp2-mp25-sdmmc/debug
792
Yann Gautier83dc8702024-03-19 15:07:26 +0100793# STM32MP25 USB boot
Yann Gautierb6821192024-06-19 10:45:56 +0200794clean_build $(common_flags) ${stm32mp2_common_flags} STM32MP_USB_PROGRAMMER=1 \
Yann Gautier83dc8702024-03-19 15:07:26 +0100795 SPD=opteed STM32MP_DDR4_TYPE=1 \
Yann Gautier63ee8832024-03-20 13:49:15 +0100796 BUILD_PLAT=build/stm32mp2-mp25-usb/debug
Yann Gautier83dc8702024-03-19 15:07:26 +0100797
Zelalemc9531f82020-08-04 15:37:08 -0500798# Platforms from TI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500799make PLAT=k3 $(common_flags) all
Hari Nagalladadd89f2022-08-30 12:10:00 -0500800make PLAT=k3 TARGET_BOARD=j784s4 $(common_flags) all
Dhruva Gole2a8f9f42025-04-04 20:26:41 +0530801make PLAT=k3 TARGET_BOARD=lite $(common_flags) all
802make PLAT=k3 TARGET_BOARD=generic $(common_flags) all
Dhruva Gole9096fcd2025-02-12 17:47:43 +0530803make PLAT=k3low TARGET_BOARD=am62lx $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500804
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500805clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS}
Zelalemc9531f82020-08-04 15:37:08 -0500806# Use GICV3 driver
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500807clean_build PLAT=qemu $(common_flags) QEMU_USE_GIC_DRIVER=QEMU_GICV3 \
Zelalemc9531f82020-08-04 15:37:08 -0500808 ENABLE_STACK_PROTECTOR=strong
Dongjiu Geng72819ee2023-06-16 18:48:57 +0800809# Use GICV3 driver with SDEI support
810clean_build PLAT=qemu $(common_flags) QEMU_USE_GIC_DRIVER=QEMU_GICV3 \
811 ENABLE_STACK_PROTECTOR=strong SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Zelalemc9531f82020-08-04 15:37:08 -0500812# Use encrypted FIP feature.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500813clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500814 BL32_RAM_LOCATION=tdram DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL31=1 \
815 ENCRYPT_BL32=1 FW_ENC_STATUS=0 SPD=opteed
Jens Wiklander1a9c2be2021-11-26 09:56:55 +0100816# QEMU with SPMD support
817clean_build PLAT=qemu $(common_flags) BL32=Makefile \
818 BL32_RAM_LOCATION=tdram ARM_BL31_IN_DRAM=1 \
819 SPD=spmd CTX_INCLUDE_EL2_REGS=0 SPMD_SPM_AT_SEL2=0 SPMC_OPTEE=1
Ruchika Gupta86e7f682022-04-12 10:25:46 +0530820# Measured Boot
laurenw-arm8531e702022-06-09 15:32:37 -0500821clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} MBOOT_EL_HASH_ALG=sha256 MEASURED_BOOT=1
Raymond Mao7681ba02023-08-10 14:05:44 -0700822# Transfer List
823clean_build PLAT=qemu $(common_flags) TRANSFER_LIST=1
Zelalemc9531f82020-08-04 15:37:08 -0500824
Jean-Philippe Bruckerb586eee2023-11-02 18:13:30 +0000825# FEAT_RME
826clean_build PLAT=qemu $(common_flags) ENABLE_RME=1 \
827 QEMU_USE_GIC_DRIVER=QEMU_GICV3
828
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500829clean_build PLAT=qemu_sbsa $(common_flags)
Fathi Boudra422bf772019-12-02 11:10:16 +0200830
Mathieu Poirierc35aeac2024-11-28 16:26:13 -0700831# QEMU SBSA with RME support
832clean_build PLAT=qemu_sbsa $(common_flags) ENABLE_RME=1 \
833 RMM=/dev/null RME_GPT_BITLOCK_BLOCK=1
834
Zelalemd86e8762020-08-21 18:24:28 -0500835# QEMU with SPM support
836clean_build PLAT=qemu_sbsa $(common_flags) BL32=Makefile SPM_MM=1 \
Paul Sokolovskycf9fe862023-01-02 16:22:21 +0300837 EL3_EXCEPTION_HANDLING=1 ENABLE_SME_FOR_NS=0 ENABLE_SVE_FOR_NS=0
Zelalemd86e8762020-08-21 18:24:28 -0500838
Fathi Boudra422bf772019-12-02 11:10:16 +0200839# For hikey enable PMF to include all files in the platform port
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500840make PLAT=hikey $(common_flags) ${TBB_OPTIONS} ENABLE_PMF=1 all
841make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} all
Lukas Haneld0752392022-10-13 11:13:19 +0200842make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} SPD=spmd SPMC_AT_EL3=1 \
843 SPMD_SPM_AT_SEL2=0 BL32=optee PLAT_SP_MANIFEST_DTS=foo NEED_FDT=no all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500844make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200845
Zelalemc9531f82020-08-04 15:37:08 -0500846# Platforms from Socionext
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500847clean_build PLAT=uniphier $(common_flags) ${TBB_OPTIONS} SPD=tspd
848clean_build PLAT=uniphier $(common_flags) FIP_GZIP=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200849
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500850clean_build PLAT=synquacer $(common_flags) SPM_MM=1 \
Jassi Brar86080922022-06-27 14:16:34 -0500851 RESET_TO_BL31=1 EL3_EXCEPTION_HANDLING=1 ENABLE_SVE_FOR_NS=0 \
852 PRELOADED_BL33_BASE=0x0
Zelalemc9531f82020-08-04 15:37:08 -0500853
854# Support for SCP Message Interface protocol with platform specific drivers
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500855clean_build PLAT=synquacer $(common_flags) \
Jassi Brar86080922022-06-27 14:16:34 -0500856 RESET_TO_BL31=1 PRELOADED_BL33_BASE=0x0 SQ_USE_SCMI_DRIVER=1
Zelalemc9531f82020-08-04 15:37:08 -0500857
Jassi Brarb8c7ca02022-06-27 14:22:10 -0500858# Support for BL2 and TBBR
859clean_build PLAT=synquacer $(common_flags) \
860 MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
861 SQ_USE_SCMI_DRIVER=1 SPD=opteed all
862
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500863make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200864
Zelalemc9531f82020-08-04 15:37:08 -0500865# Raspberry Pi Platforms
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500866make PLAT=rpi3 $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500867 ENABLE_STACK_PROTECTOR=strong PRELOADED_BL33_BASE=0xDEADBEEF all
Andre Przywarae917ec82021-09-03 15:01:30 +0100868clean_build PLAT=rpi4 $(common_flags) SMC_PCI_SUPPORT=1 all
Mario Bălănicăea4da5e2024-03-08 20:09:24 +0200869clean_build PLAT=rpi5 $(common_flags) SMC_PCI_SUPPORT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200870
Abhi Singh1b27b1e2024-10-04 16:06:49 -0500871# Raspberry Pi Measured Boot Discrete TPM
Manish V Badarkhebfb05ea2025-03-21 17:28:37 +0000872make PLAT=rpi3 $(common_flags) PRELOADED_BL33_BASE=0x200000 \
873 MEASURED_BOOT=1 DISCRETE_TPM=1 TPM_INTERFACE=FIFO_SPI \
874 MBOOT_TPM_HASH_ALG=sha256 MBEDTLS_DIR=$(pwd)/mbedtls all
Abhi Singh1b27b1e2024-10-04 16:06:49 -0500875
Zelalemc9531f82020-08-04 15:37:08 -0500876# A113D (AXG) platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500877clean_build PLAT=axg $(common_flags) SPD=opteed
878clean_build PLAT=axg $(common_flags) AML_USE_ATOS=1
Zelalemc9531f82020-08-04 15:37:08 -0500879
Stephan Gerhold141a7662021-12-07 20:42:14 +0100880# QTI MSM8916 platform
Stephan Gerhold3b3976f2023-04-17 16:27:11 +0200881clean_build PLAT=mdm9607 CROSS_COMPILE=arm-none-eabi- $(common_flags) \
882 ARCH=aarch32 AARCH32_SP=sp_min
883clean_build PLAT=msm8909 CROSS_COMPILE=arm-none-eabi- $(common_flags) \
884 ARCH=aarch32 AARCH32_SP=sp_min
Stephan Gerhold141a7662021-12-07 20:42:14 +0100885clean_build PLAT=msm8916 $(common_flags)
Manish V Badarkhec540e622023-06-28 17:56:40 +0100886clean_build PLAT=msm8916 CROSS_COMPILE=arm-none-eabi- $(common_flags) \
887 ARCH=aarch32 AARCH32_SP=sp_min
Stephan Gerhold998f0d62023-04-17 16:22:52 +0200888clean_build PLAT=msm8916 $(common_flags) SPD=tspd
Stephan Gerhold3b3976f2023-04-17 16:27:11 +0200889clean_build PLAT=msm8939 $(common_flags)
890clean_build PLAT=msm8939 CROSS_COMPILE=arm-none-eabi- $(common_flags) \
891 ARCH=aarch32 AARCH32_SP=sp_min
892clean_build PLAT=msm8939 $(common_flags) SPD=tspd
Stephan Gerhold141a7662021-12-07 20:42:14 +0100893
Chia-Wei Wang7dcb0d02023-06-09 09:52:52 +0800894# Platforms from Aspeed
895clean_build PLAT=ast2700 $(common_flags) SPD=opteed
896
rutigl@gmail.com86cfcf92023-03-21 10:10:11 +0200897# Nuvoton npcm845x platform
898make PLAT=npcm845x $(common_flags) all SPD=opteed
899
Harrison Mutaiee958c12023-09-06 12:16:21 +0100900if [[ "$rc" -gt 0 ]]; then
Harrison Mutai3f483132024-05-09 09:48:58 +0000901 echo "ERROR: tf-cov-make failed with $error_count failures"
Harrison Mutaiee958c12023-09-06 12:16:21 +0100902 exit $rc
903fi
904
Fathi Boudra422bf772019-12-02 11:10:16 +0200905cd ..