blob: 2f85f952f589bed5ae977fd0d2af621eefb696ae [file] [log] [blame]
Leonardo Sandovalc4dfbb02020-08-17 10:21:44 -05001#!/usr/bin/env bash
Fathi Boudra422bf772019-12-02 11:10:16 +02002#
Alexei Fedorov20fdf502020-07-27 17:36:38 +01003# Copyright (c) 2019-2020, 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
58
Zelalemc9531f82020-08-04 15:37:08 -050059# Dualroot chain of trust.
60clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} SPD=tspd COT=dualroot
61
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050062clean_build $fvp_common_flags SPD=trusty
63clean_build $fvp_common_flags SPD=trusty TRUSTY_SPD_WITH_GENERIC_SERVICES=1
Fathi Boudra422bf772019-12-02 11:10:16 +020064
65# SDEI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050066clean_build $fvp_common_flags SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Fathi Boudra422bf772019-12-02 11:10:16 +020067
Zelalemc9531f82020-08-04 15:37:08 -050068# SDEI with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050069clean_build $fvp_common_flags SDEI_IN_FCONF=1 SDEI_SUPPORT=1 EL3_EXCEPTION_HANDLING=1
Zelalemc9531f82020-08-04 15:37:08 -050070
71# Secure interrupt descriptors with fconf
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -050072clean_build $fvp_common_flags SEC_INT_DESC_IN_FCONF=1
Zelalemc9531f82020-08-04 15:37:08 -050073
Fathi Boudra422bf772019-12-02 11:10:16 +020074# Without coherent memory
75clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd USE_COHERENT_MEM=0
76
77# Using PSCI extended State ID format rather than the original format
78clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} ARM_TSP_RAM_LOCATION=dram SPD=tspd PSCI_EXTENDED_STATE_ID=1 \
79 ARM_RECOM_STATE_ID_ENC=1
80
81# Alternative boot flows (This changes some of the platform initialisation code)
82clean_build $fvp_common_flags EL3_PAYLOAD=0x80000000
83clean_build $fvp_common_flags PRELOADED_BL33_BASE=0x80000000
84
85# Using the SP804 timer instead of the Generic Timer
86clean_build $fvp_common_flags FVP_USE_SP804_TIMER=1
87
88# Using the CCN driver and multi cluster topology
89clean_build $fvp_common_flags FVP_CLUSTER_COUNT=4
90
91# PMF
92clean_build $fvp_common_flags ENABLE_PMF=1
93
94# stack protector
95clean_build $fvp_common_flags ENABLE_STACK_PROTECTOR=strong
96
97# AArch32 build
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -050098clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +020099 ARCH=aarch32 AARCH32_SP=sp_min \
100 RESET_TO_SP_MIN=1 PRELOADED_BL33_BASE=0x80000000
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500101clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200102 ARCH=aarch32 AARCH32_SP=sp_min
103
104# Xlat tables lib version 1 (AArch64 and AArch32)
105clean_build $fvp_common_flags ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
Leonardo Sandoval1c24ae52020-07-08 11:47:23 -0500106clean_build $fvp_common_flags CROSS_COMPILE=arm-none-eabi- \
Fathi Boudra422bf772019-12-02 11:10:16 +0200107 ARCH=aarch32 AARCH32_SP=sp_min ARM_XLAT_TABLES_LIB_V1=1 RECLAIM_INIT_CODE=0
108
Zelalemc9531f82020-08-04 15:37:08 -0500109# SPM support based on Management Mode Interface Specification
110clean_build $fvp_common_flags SPM_MM=1 EL3_EXCEPTION_HANDLING=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200111
Zelalemc9531f82020-08-04 15:37:08 -0500112# SPM support with TOS(optee) as SPM sitting at S-EL1
113clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=0
114
115# SPM support with Secure hafnium as SPM sitting at S-EL2
116# SP_LAYOUT_FILE is used only during FIP creation but build won't progress
117# if we have NULL value to it, so passing a dummy string.
118clean_build $fvp_common_flags SPD=spmd SPMD_SPM_AT_SEL2=1 ARM_ARCH_MINOR=4 \
Max Shvetsov44d2a702021-02-18 16:41:45 +0000119 CTX_INCLUDE_EL2_REGS=1 SP_LAYOUT_FILE=dummy
Fathi Boudra422bf772019-12-02 11:10:16 +0200120
121#BL2 at EL3 support
122clean_build $fvp_common_flags BL2_AT_EL3=1
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 BL2_AT_EL3=1
125
Zelalemc9531f82020-08-04 15:37:08 -0500126# RAS Extension Support
127clean_build $fvp_common_flags EL3_EXCEPTION_HANDLING=1 \
128 FAULT_INJECTION_SUPPORT=1 HANDLE_EA_EL3_FIRST=1 RAS_EXTENSION=1 \
129 SDEI_SUPPORT=1
130
131# Hardware Assisted Coherency(DynamIQ)
132clean_build $fvp_common_flags FVP_CLUSTER_COUNT=1 FVP_MAX_CPUS_PER_CLUSTER=8 \
133 HW_ASSISTED_COHERENCY=1 USE_COHERENT_MEM=0
134
135# Pointer Authentication Support
136clean_build $fvp_common_flags CTX_INCLUDE_PAUTH_REGS=1 \
137 ARM_ARCH_MINOR=5 EL3_EXCEPTION_HANDLING=1 BRANCH_PROTECTION=1 SDEI_SUPPORT=1 SPD=tspd TSP_NS_INTR_ASYNC_PREEMPT=1
138
139# Undefined Behaviour Sanitizer
140# Building with UBSAN SANITIZE_UB=on increases the executable size.
141# Hence it is only properly supported in bl31 with RESET_TO_BL31 enabled
142make $fvp_common_flags clean
143make $fvp_common_flags SANITIZE_UB=on RESET_TO_BL31=1 bl31
144
145# debugfs feature
146clean_build $fvp_common_flags DEBUG=1 USE_DEBUGFS=1
147
148# MPAM feature
149clean_build $fvp_common_flags ENABLE_MPAM_FOR_LOWER_ELS=1
150
151# Using GICv3.1 driver with extended PPI and SPI range
152clean_build $fvp_common_flags GIC_EXT_INTID=1
153
154# Using GICv4 features with extended PPI and SPI range
155clean_build $fvp_common_flags GIC_ENABLE_V4_EXTN=1 GIC_EXT_INTID=1
156
Alexei Fedorov20fdf502020-07-27 17:36:38 +0100157# Measured Boot
158clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} MEASURED_BOOT=1
159
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100160# CoT descriptors in device tree
Manish V Badarkhe81102d12020-10-05 08:02:30 +0100161clean_build $fvp_common_flags ${ARM_TBB_OPTIONS} COT_DESC_IN_DTB=1 USE_ROMLIB=1
Manish V Badarkhe447e31a2020-09-03 07:57:17 +0100162
Fathi Boudra422bf772019-12-02 11:10:16 +0200163#
164# Juno platform
165# We'll use the following flags for all Juno builds.
166#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500167juno_common_flags="$(common_flags) PLAT=juno"
Fathi Boudra422bf772019-12-02 11:10:16 +0200168clean_build $juno_common_flags SPD=tspd ${ARM_TBB_OPTIONS}
169clean_build $juno_common_flags EL3_PAYLOAD=0x80000000
170clean_build $juno_common_flags ENABLE_STACK_PROTECTOR=strong
171clean_build $juno_common_flags CSS_USE_SCMI_SDS_DRIVER=0
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500172
Leonardo Sandoval5163b562020-11-20 17:17:59 -0600173clean_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 +0200174
175#
176# System Guidance for Infrastructure platform SGI575
Zelalemc9531f82020-08-04 15:37:08 -0500177# Enable build config with RAS_EXTENSION to cover more files
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500178make $(common_flags) PLAT=sgi575 ${ARM_TBB_OPTIONS} EL3_EXCEPTION_HANDLING=1 FAULT_INJECTION_SUPPORT=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500179 HANDLE_EA_EL3_FIRST=1 RAS_EXTENSION=1 SDEI_SUPPORT=1 SPM_MM=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200180#
Zelalemc9531f82020-08-04 15:37:08 -0500181# System Guidance for Mobile platform SGM775
182#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500183make $(common_flags) PLAT=sgm775 ${ARM_TBB_OPTIONS} SPD=tspd \
Zelalemc9531f82020-08-04 15:37:08 -0500184 CSS_USE_SCMI_SDS_DRIVER=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200185
186#
Vijayenthiran Subramaniam2a47a6d2020-07-22 14:16:58 +0530187# System Guidance for Infrastructure platform RD-N1-Edge-Dual
Fathi Boudra422bf772019-12-02 11:10:16 +0200188#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500189make $(common_flags) PLAT=rdn1edge CSS_SGI_CHIP_COUNT=2 ${ARM_TBB_OPTIONS} all
Fathi Boudra422bf772019-12-02 11:10:16 +0200190
191#
192# System Guidance for Infrastructure platform RD-E1Edge
193#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500194make $(common_flags) PLAT=rde1edge ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500195
196#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530197# Reference Design platform RD-V1
Zelalemc9531f82020-08-04 15:37:08 -0500198#
Aditya Angadi634d61f2021-01-04 09:30:20 +0530199make $(common_flags) PLAT=rdv1 ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500200
201#
Aditya Angadi61c54762021-01-04 09:30:52 +0530202# Reference Design platform RD-V1-MC
Zelalemc9531f82020-08-04 15:37:08 -0500203#
Aditya Angadi61c54762021-01-04 09:30:52 +0530204make $(common_flags) PLAT=rdv1mc ${ARM_TBB_OPTIONS} CSS_SGI_CHIP_COUNT=4 all
Zelalemc9531f82020-08-04 15:37:08 -0500205
206#
Vijayenthiran Subramaniama66de332020-11-23 14:20:14 +0530207# Reference Design Platform RD-N2
208#
209make $(common_flags) PLAT=rdn2 ${ARM_TBB_OPTIONS} all
210
211#
Zelalemc9531f82020-08-04 15:37:08 -0500212# Neoverse N1 SDP platform
213#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500214make $(common_flags) PLAT=n1sdp ${ARM_TBB_OPTIONS} all
Zelalemc9531f82020-08-04 15:37:08 -0500215
216#
217# FVP VE platform
218#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500219make $(common_flags) PLAT=fvp_ve AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500220 CROSS_COMPILE=arm-none-eabi- ARM_ARCH_MAJOR=7 \
221 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
222 FVP_HW_CONFIG_DTS=fdts/fvp-ve-Cortex-A5x1.dts all
223
224#
225# A5 DesignStart Platform
226#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500227make $(common_flags) PLAT=a5ds AARCH32_SP=sp_min ARCH=aarch32 \
Zelalemc9531f82020-08-04 15:37:08 -0500228 ARM_ARCH_MAJOR=7 ARM_CORTEX_A5=yes ARM_XLAT_TABLES_LIB_V1=1 \
229 CROSS_COMPILE=arm-none-eabi- FVP_HW_CONFIG_DTS=fdts/a5ds.dts
230
231#
232# Corstone700 Platform
233#
234
235corstone700_common_flags="CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500236 $(common_flags) \
Zelalemc9531f82020-08-04 15:37:08 -0500237 PLAT=corstone700 \
238 ARCH=aarch32 \
239 RESET_TO_SP_MIN=1 \
240 AARCH32_SP=sp_min \
241 ARM_LINUX_KERNEL_AS_BL33=0 \
242 ARM_PRELOADED_DTB_BASE=0x80400000 \
243 ENABLE_PIE=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500244 ENABLE_STACK_PROTECTOR=all \
245 all"
246
247echo "Info: Building Corstone700 FVP ..."
248
249make TARGET_PLATFORM=fvp ${corstone700_common_flags}
250
251echo "Info: Building Corstone700 FPGA ..."
252
253make TARGET_PLATFORM=fpga ${corstone700_common_flags}
254
255#
256# Arm internal FPGA port
257#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500258make PLAT=arm_fpga $(common_flags) CROSS_COMPILE=aarch64-none-elf- \
Zelalemc9531f82020-08-04 15:37:08 -0500259 FPGA_PRELOADED_DTB_BASE=0x88000000 PRELOADED_BL33_BASE=0x82080000 all
260
261#
262# Total Compute platform
263#
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500264make $(common_flags) PLAT=tc0 ${ARM_TBB_OPTIONS} all
Fathi Boudra422bf772019-12-02 11:10:16 +0200265
Chandni Cherukurifb803e12020-10-01 17:49:08 +0530266#
267# Morello platform
268#
269make $(common_flags) PLAT=morello all
270
Fathi Boudra422bf772019-12-02 11:10:16 +0200271# Partners' platforms.
272# Enable as many features as possible.
273# We don't need to clean between each build here because we only do one build
274# per platform so we don't hit the build flags dependency problem.
Fathi Boudra422bf772019-12-02 11:10:16 +0200275
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500276make PLAT=mt8173 $(common_flags) all
277make PLAT=mt8183 $(common_flags) all
Zelalemd86e8762020-08-21 18:24:28 -0500278make PLAT=mt8192 $(common_flags) COREBOOT=1 all
279
280# Platforms from Qualcomm
281make PLAT=sc7180 $(common_flags) COREBOOT=1 all
Fathi Boudra422bf772019-12-02 11:10:16 +0200282
Zelalemc9531f82020-08-04 15:37:08 -0500283make PLAT=rk3288 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500284 $(common_flags) ARCH=aarch32 AARCH32_SP=sp_min all
Madhukar Pappireddyd491ad02020-12-03 10:37:05 -0600285make PLAT=rk3368 $(common_flags) COREBOOT=1 \
286 ENABLE_STACK_PROTECTOR=strong all
287make PLAT=rk3399 $(common_flags) COREBOOT=1 PLAT_RK_DP_HDCP=1 \
288 ENABLE_STACK_PROTECTOR=strong all
289make PLAT=rk3328 $(common_flags) COREBOOT=1 PLAT_RK_SECURE_DDR_MINILOADER=1 \
290 ENABLE_STACK_PROTECTOR=strong all
291make PLAT=px30 $(common_flags) PLAT_RK_SECURE_DDR_MINILOADER=1 \
292 ENABLE_STACK_PROTECTOR=strong all
Fathi Boudra422bf772019-12-02 11:10:16 +0200293
294# Although we do several consecutive builds for the Tegra platform below, we
295# don't need to clean between each one because the Tegra makefiles specify
296# a different build directory per SoC.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500297make PLAT=tegra TARGET_SOC=t210 $(common_flags) all
298make PLAT=tegra TARGET_SOC=t132 $(common_flags) all
299make PLAT=tegra TARGET_SOC=t186 $(common_flags) all
300make PLAT=tegra TARGET_SOC=t194 $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200301
302# For the Xilinx platform, artificially increase the extents of BL31 memory
303# (using the platform-specific build options ZYNQMP_ATF_MEM_{BASE,SIZE}).
304# If we keep the default values, BL31 doesn't fit when it is built with all
305# these build flags.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500306make PLAT=zynqmp $(common_flags) \
Fathi Boudra422bf772019-12-02 11:10:16 +0200307 RESET_TO_BL31=1 SPD=tspd \
308 ZYNQMP_ATF_MEM_BASE=0xFFFC0000 ZYNQMP_ATF_MEM_SIZE=0x00040000 \
309 all
310
Zelalemc9531f82020-08-04 15:37:08 -0500311# Build both for silicon (default) and virtual QEMU platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500312clean_build PLAT=versal $(common_flags)
313clean_build PLAT=versal $(common_flags) VERSAL_PLATFORM=versal_virt
Zelalemc9531f82020-08-04 15:37:08 -0500314
315# Platforms from Allwinner
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500316make PLAT=sun50i_a64 $(common_flags) all
317make PLAT=sun50i_h6 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500318
319# Platforms from i.MX
320make AARCH32_SP=optee ARCH=aarch32 ARM_ARCH_MAJOR=7 ARM_CORTEX_A7=yes \
321 CROSS_COMPILE=arm-none-eabi- PLAT=warp7 ${TBB_OPTIONS} \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500322 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500323make AARCH32_SP=optee ARCH=aarch32 CROSS_COMPILE=arm-none-eabi- PLAT=picopi \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500324 $(common_flags) all
325make PLAT=imx8mm $(common_flags) all
326make PLAT=imx8mn $(common_flags) all
327make PLAT=imx8mp $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500328
329# Temporarily building in release mode until the following ticket is resolved:
330# https://developer.trustedfirmware.org/T626
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500331# make PLAT=imx8mq $(common_flags) all
332make PLAT=imx8mq $(common_flags release) all
Zelalemc9531f82020-08-04 15:37:08 -0500333
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500334make PLAT=imx8qm $(common_flags) all
335make PLAT=imx8qx $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500336
Olivier Deprezbac70192021-04-02 08:55:36 +0200337# Platforms for NXP Layerscape
338make PLAT=lx2160aqds $(common_flags) all
339make PLAT=lx2160ardb $(common_flags) all
340make PLAT=lx2162aqds $(common_flags) all
341
Zelalemc9531f82020-08-04 15:37:08 -0500342# Platforms from Intel
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500343make PLAT=stratix10 $(common_flags) all
344make PLAT=agilex $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500345
346# Platforms from Broadcom
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500347clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t INCLUDE_EMMC_DRIVER_ERASE_CODE=1
348clean_build PLAT=stingray $(common_flags) BOARD_CFG=bcm958742t-ns3 INCLUDE_EMMC_DRIVER_ERASE_CODE=1
Zelalemc9531f82020-08-04 15:37:08 -0500349
350# Platforms from Marvell
Madhukar Pappireddy778684b2021-01-12 11:53:02 -0600351make PLAT=a3700 $(common_flags) SCP_BL2=/dev/null CM3_SYSTEM_RESET=1 all
Zelalemc9531f82020-08-04 15:37:08 -0500352
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600353# Source files from mv-ddr-marvell repository are necessary
354# to build below four platforms
355wget https://downloads.trustedfirmware.org/tf-a/mv-ddr-marvell/mv-ddr-marvell-fae3f6c98230ae51a78e248af5de96fac97a8fca.tar.gz 2> /dev/null
356tar -xzf mv-ddr-marvell-fae3f6c98230ae51a78e248af5de96fac97a8fca.tar.gz 2> /dev/null
357mv mv-ddr-marvell drivers/marvell/mv_ddr
Zelalemc9531f82020-08-04 15:37:08 -0500358
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600359# These platforms from Marvell have dependency on GCC-6.2.1 toolchain
360make PLAT=a80x0 DEBUG=1 SCP_BL2=/dev/null \
361 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
362make PLAT=a80x0_mcbin DEBUG=1 SCP_BL2=/dev/null \
363 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
364make PLAT=a70x0 DEBUG=1 SCP_BL2=/dev/null \
365 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
366make PLAT=a70x0_amc DEBUG=1 SCP_BL2=/dev/null \
367 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
368make PLAT=a80x0_puzzle DEBUG=1 SCP_BL2=/dev/null \
369 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
370make PLAT=t9130 DEBUG=1 SCP_BL2=/dev/null \
371 CROSS_COMPILE="$(set_cross_compile_gcc_linaro_toolchain)" all
Leonardo Sandovaleb1d3ce2020-08-06 16:04:29 -0500372
Leonardo Sandovalc0443772020-11-12 11:22:48 -0600373# Removing the source files
374rm -rf drivers/marvell/mv_ddr 2> /dev/null
Zelalemc9531f82020-08-04 15:37:08 -0500375
376# Platforms from Meson
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500377make PLAT=gxbb $(common_flags) all
378make PLAT=gxl $(common_flags) all
379make PLAT=g12a $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500380
381# Platforms from Renesas
382# Renesas R-Car D3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500383clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500384 BL33=Makefile LIFEC_DBSC_PROTECT_ENABLE=0 LSI=D3 \
385 MBEDTLS_DIR=$(pwd)/mbedtls PMIC_ROHM_BD9571=0 \
386 RCAR_AVS_SETTING_ENABLE=0 SPD=none RCAR_LOSSY_ENABLE=0 \
387 RCAR_SA0_SIZE=0 RCAR_SYSTEM_SUSPEND=0 TRUSTED_BOARD_BOOT=1
388
389# Renesas R-Car H3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500390clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500391 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3 \
392 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
393 RCAR_DRAM_SPLIT=1 RCAR_GEN3_ULCB=1 SPD=opteed \
394 TRUSTED_BOARD_BOOT=1
395
396# Renesas R-Car H3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500397clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500398 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=H3N \
399 SPD=opteed TRUSTED_BOARD_BOOT=1
400
401# Renesas R-Car M3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500402clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500403 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3 \
404 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
405 RCAR_DRAM_SPLIT=2 RCAR_GEN3_ULCB=1 SPD=opteed \
406 TRUSTED_BOARD_BOOT=1
407
408# Renesas R-Car M3N Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500409clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500410 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=M3N \
411 MACHINE=ulcb PMIC_LEVEL_MODE=0 RCAR_DRAM_LPDDR4_MEMCONF=0 \
412 RCAR_GEN3_ULCB=1 SPD=opteed TRUSTED_BOARD_BOOT=1
413
414# Renesas R-Car E3 Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500415clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500416 BL33=Makefile MBEDTLS_DIR=$(pwd)/mbedtls LSI=E3 \
417 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 \
418 RCAR_SA0_SIZE=0 SPD=opteed TRUSTED_BOARD_BOOT=1
419
420# Renesas R-Car V3M Automotive SoC
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500421clean_build PLAT=rcar $(common_flags) BL32=Makefile \
Zelalemc9531f82020-08-04 15:37:08 -0500422 MBEDTLS_DIR=$(pwd)/mbedtls BL33=Makefile LSI=V3M MACHINE=eagle \
423 PMIC_ROHM_BD9571=0 RCAR_DRAM_SPLIT=0 RCAR_SYSTEM_SUSPEND=0 \
424 AVS_SETTING_ENABLE=0 SPD=none TRUSTED_BOARD_BOOT=1
425
Zelalemf4299672021-01-29 12:52:59 -0600426# Renesas HiHope RZ/G2M development kit
427clean_build PLAT=rzg $(common_flags) \
428 MBEDTLS_DIR=$(pwd)/mbedtls LSI=G2M \
429 RCAR_DRAM_SPLIT=2 RCAR_LOSSY_ENABLE=1 SPD=none
430
Zelalemc9531f82020-08-04 15:37:08 -0500431# Platforms from ST
432make PLAT=stm32mp1 CROSS_COMPILE=arm-none-eabi- \
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500433 $(common_flags) ARM_ARCH_MAJOR=7 STM32MP_EMMC=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500434 STM32MP_RAW_NAND=1 STM32MP_SDMMC=1 STM32MP_SPI_NAND=1 STM32MP_SPI_NOR=1 \
435 ARCH=aarch32 AARCH32_SP=sp_min ENABLE_STACK_PROTECTOR=strong bl1 bl2 bl32
436
437# Platforms from TI
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500438make PLAT=k3 $(common_flags) all
Zelalemc9531f82020-08-04 15:37:08 -0500439
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500440clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS}
Zelalemc9531f82020-08-04 15:37:08 -0500441# Use GICV3 driver
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500442clean_build PLAT=qemu $(common_flags) QEMU_USE_GIC_DRIVER=QEMU_GICV3 \
Zelalemc9531f82020-08-04 15:37:08 -0500443 ENABLE_STACK_PROTECTOR=strong
444# Use encrypted FIP feature.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500445clean_build PLAT=qemu $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500446 BL32_RAM_LOCATION=tdram DECRYPTION_SUPPORT=aes_gcm ENCRYPT_BL31=1 \
447 ENCRYPT_BL32=1 FW_ENC_STATUS=0 SPD=opteed
448
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500449clean_build PLAT=qemu_sbsa $(common_flags)
Fathi Boudra422bf772019-12-02 11:10:16 +0200450
Zelalemd86e8762020-08-21 18:24:28 -0500451# QEMU with SPM support
452clean_build PLAT=qemu_sbsa $(common_flags) BL32=Makefile SPM_MM=1 \
453 EL3_EXCEPTION_HANDLING=1
454
Fathi Boudra422bf772019-12-02 11:10:16 +0200455# For hikey enable PMF to include all files in the platform port
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500456make PLAT=hikey $(common_flags) ${TBB_OPTIONS} ENABLE_PMF=1 all
457make PLAT=hikey960 $(common_flags) ${TBB_OPTIONS} all
458make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200459
Zelalemc9531f82020-08-04 15:37:08 -0500460# Platforms from Socionext
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500461clean_build PLAT=uniphier $(common_flags) ${TBB_OPTIONS} SPD=tspd
462clean_build PLAT=uniphier $(common_flags) FIP_GZIP=1
Fathi Boudra422bf772019-12-02 11:10:16 +0200463
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500464clean_build PLAT=synquacer $(common_flags) SPM_MM=1 \
Zelalemc9531f82020-08-04 15:37:08 -0500465 EL3_EXCEPTION_HANDLING=1 PRELOADED_BL33_BASE=0x0
466
467# Support for SCP Message Interface protocol with platform specific drivers
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500468clean_build PLAT=synquacer $(common_flags) \
Zelalemc9531f82020-08-04 15:37:08 -0500469 PRELOADED_BL33_BASE=0x0 SQ_USE_SCMI_DRIVER=1
470
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500471make PLAT=poplar $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200472
Zelalemc9531f82020-08-04 15:37:08 -0500473# Raspberry Pi Platforms
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500474make PLAT=rpi3 $(common_flags) ${TBB_OPTIONS} \
Zelalemc9531f82020-08-04 15:37:08 -0500475 ENABLE_STACK_PROTECTOR=strong PRELOADED_BL33_BASE=0xDEADBEEF all
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500476make PLAT=rpi4 $(common_flags) all
Fathi Boudra422bf772019-12-02 11:10:16 +0200477
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500478# Cannot use $(common_flags) for LS1043 platform, as then
Fathi Boudra422bf772019-12-02 11:10:16 +0200479# the binaries do not fit in memory.
480clean_build PLAT=ls1043 SPD=opteed ENABLE_STACK_PROTECTOR=strong
481clean_build PLAT=ls1043 SPD=tspd
482
Zelalemc9531f82020-08-04 15:37:08 -0500483# A113D (AXG) platform.
Leonardo Sandoval97e2ef02020-08-06 13:29:08 -0500484clean_build PLAT=axg $(common_flags) SPD=opteed
485clean_build PLAT=axg $(common_flags) AML_USE_ATOS=1
Zelalemc9531f82020-08-04 15:37:08 -0500486
Fathi Boudra422bf772019-12-02 11:10:16 +0200487cd ..