14f6ad66aSAchin Gupta# 254035fc4SSandrine Bailleux# Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. 34f6ad66aSAchin Gupta# 44f6ad66aSAchin Gupta# Redistribution and use in source and binary forms, with or without 54f6ad66aSAchin Gupta# modification, are permitted provided that the following conditions are met: 64f6ad66aSAchin Gupta# 74f6ad66aSAchin Gupta# Redistributions of source code must retain the above copyright notice, this 84f6ad66aSAchin Gupta# list of conditions and the following disclaimer. 94f6ad66aSAchin Gupta# 104f6ad66aSAchin Gupta# Redistributions in binary form must reproduce the above copyright notice, 114f6ad66aSAchin Gupta# this list of conditions and the following disclaimer in the documentation 124f6ad66aSAchin Gupta# and/or other materials provided with the distribution. 134f6ad66aSAchin Gupta# 144f6ad66aSAchin Gupta# Neither the name of ARM nor the names of its contributors may be used 154f6ad66aSAchin Gupta# to endorse or promote products derived from this software without specific 164f6ad66aSAchin Gupta# prior written permission. 174f6ad66aSAchin Gupta# 184f6ad66aSAchin Gupta# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 194f6ad66aSAchin Gupta# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 204f6ad66aSAchin Gupta# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 214f6ad66aSAchin Gupta# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 224f6ad66aSAchin Gupta# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 234f6ad66aSAchin Gupta# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 244f6ad66aSAchin Gupta# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 254f6ad66aSAchin Gupta# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 264f6ad66aSAchin Gupta# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 274f6ad66aSAchin Gupta# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 284f6ad66aSAchin Gupta# POSSIBILITY OF SUCH DAMAGE. 294f6ad66aSAchin Gupta# 304f6ad66aSAchin Gupta 31e35c4045SJeenu Viswambharan# 32aaa3e722SJuan Castillo# Trusted Firmware Version 33aaa3e722SJuan Castillo# 34c6249aaaSDan HandleyVERSION_MAJOR := 1 356791f52eSDan HandleyVERSION_MINOR := 2 36aaa3e722SJuan Castillo 3788154678SJuan Castillo# Default goal is build all images 3888154678SJuan Castillo.DEFAULT_GOAL := all 3988154678SJuan Castillo 40231c1470SEvan LloydMAKE_HELPERS_DIRECTORY := make_helpers/ 41231c1470SEvan Lloydinclude ${MAKE_HELPERS_DIRECTORY}build_macros.mk 42e7f54dbdSEvan Lloydinclude ${MAKE_HELPERS_DIRECTORY}build_env.mk 4373c99d4eSJuan Castillo 4473c99d4eSJuan Castillo################################################################################ 45e35c4045SJeenu Viswambharan# Default values for build configurations 4673c99d4eSJuan Castillo################################################################################ 47e35c4045SJeenu Viswambharan 48e35c4045SJeenu Viswambharan# Build verbosity 49e35c4045SJeenu ViswambharanV := 0 50e35c4045SJeenu Viswambharan# Debug build 51e35c4045SJeenu ViswambharanDEBUG := 0 52e35c4045SJeenu Viswambharan# Build platform 53e35c4045SJeenu ViswambharanDEFAULT_PLAT := fvp 54e35c4045SJeenu ViswambharanPLAT := ${DEFAULT_PLAT} 55e35c4045SJeenu Viswambharan# SPD choice 56e35c4045SJeenu ViswambharanSPD := none 57e35c4045SJeenu Viswambharan# Base commit to perform code check on 58e35c4045SJeenu ViswambharanBASE_COMMIT := origin/master 592da8d8bfSJeenu Viswambharan# NS timer register save and restore 602da8d8bfSJeenu ViswambharanNS_TIMER_SWITCH := 0 611645d3eeSSandrine Bailleux# By default, BL1 acts as the reset handler, not BL31 62dbad1bacSVikram KanigiriRESET_TO_BL31 := 0 630f21c547SJuan Castillo# Include FP registers in cpu context 640f21c547SJuan CastilloCTX_INCLUDE_FPREGS := 0 658cd16e6bSSoby Mathew# Build flag to include AArch32 registers in cpu context save and restore 668cd16e6bSSoby Mathew# during world switch. This flag must be set to 0 for AArch64-only platforms. 678cd16e6bSSoby MathewCTX_INCLUDE_AARCH32_REGS := 1 682b98e789SSandrine Bailleux# Determine the version of ARM GIC architecture to use for interrupt management 692b98e789SSandrine Bailleux# in EL3. The platform port can change this value if needed. 702b98e789SSandrine BailleuxARM_GIC_ARCH := 2 7123e47edeSVikram Kanigiri# Determine the version of ARM CCI product used in the platform. The platform 7223e47edeSVikram Kanigiri# port can change this value if needed. 7323e47edeSVikram KanigiriARM_CCI_PRODUCT_ID := 400 74bc920128SSoby Mathew# Flag used to indicate if ASM_ASSERTION should be enabled for the build. 75bc920128SSoby Mathew# This defaults to being present in DEBUG builds only. 76bc920128SSoby MathewASM_ASSERTION := ${DEBUG} 778c5fe0b5SSoby Mathew# Build option to choose whether Trusted firmware uses Coherent memory or not. 788c5fe0b5SSoby MathewUSE_COHERENT_MEM := 1 798ee24980SSoby Mathew# Flag used to choose the power state format viz Extended State-ID or the Original 808ee24980SSoby Mathew# format. 818ee24980SSoby MathewPSCI_EXTENDED_STATE_ID := 0 827f48fab9SJuan Castillo# Default FIP file name 837f48fab9SJuan CastilloFIP_NAME := fip.bin 840191262dSYatharth Kochar# Default FWU_FIP file name 850191262dSYatharth KocharFWU_FIP_NAME := fwu_fip.bin 86db6071c9SJuan Castillo# By default, use the -pedantic option in the gcc command line 87db6071c9SJuan CastilloDISABLE_PEDANTIC := 0 886f971622SJuan Castillo# Flags to generate the Chain of Trust 896f971622SJuan CastilloGENERATE_COT := 0 906f971622SJuan CastilloCREATE_KEYS := 1 91fd34e7baSJuan CastilloSAVE_KEYS := 0 926eadf762SJuan Castillo# Flags to build TF with Trusted Boot support 936eadf762SJuan CastilloTRUSTED_BOARD_BOOT := 0 94bf031bbaSSandrine Bailleux# By default, consider that the platform's reset address is not programmable. 95bf031bbaSSandrine Bailleux# The platform Makefile is free to override this value. 96bf031bbaSSandrine BailleuxPROGRAMMABLE_RESET_ADDRESS := 0 977a24cba5SSoby Mathew# Build flag to treat usage of deprecated platform and framework APIs as error. 987a24cba5SSoby MathewERROR_DEPRECATED := 0 99a9bec67dSSandrine Bailleux# By default, consider that the platform may release several CPUs out of reset. 100a9bec67dSSandrine Bailleux# The platform Makefile is free to override this value. 101a9bec67dSSandrine BailleuxCOLD_BOOT_SINGLE_CPU := 0 10235e8c766SSandrine Bailleux# Flag to introduce an infinite loop in BL1 just before it exits into the next 10335e8c766SSandrine Bailleux# image. This is meant to help debugging the post-BL2 phase. 10435e8c766SSandrine BailleuxSPIN_ON_BL1_EXIT := 0 10512f654b6SJuan Castillo# Build PL011 UART driver in minimal generic UART mode 10612f654b6SJuan CastilloPL011_GENERIC_UART := 0 107a31d8983SYatharth Kochar# Flag to enable Performance Measurement Framework 108a31d8983SYatharth KocharENABLE_PMF := 0 109170fb93dSYatharth Kochar# Flag to enable PSCI STATs functionality 110170fb93dSYatharth KocharENABLE_PSCI_STAT := 0 1115d1c104fSSandrine Bailleux# Whether code and read-only data should be put on separate memory pages. 1125d1c104fSSandrine Bailleux# The platform Makefile is free to override this value. 1135d1c104fSSandrine BailleuxSEPARATE_CODE_AND_RODATA := 0 1145d1c104fSSandrine Bailleux 11573c99d4eSJuan Castillo 11673c99d4eSJuan Castillo################################################################################ 11773c99d4eSJuan Castillo# Checkpatch script options 11873c99d4eSJuan Castillo################################################################################ 11973c99d4eSJuan Castillo 120f607739cSSandrine BailleuxCHECKCODE_ARGS := --no-patch 121f0b489c1SDan Handley# Do not check the coding style on imported library files or documentation files 122f0b489c1SDan HandleyINC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \ 1231a41e8c1SDan Handley include/lib/libfdt \ 124f0b489c1SDan Handley include/lib/stdlib, \ 125f0b489c1SDan Handley $(wildcard include/lib/*))) 126f0b489c1SDan HandleyINC_DIRS_TO_CHECK := $(sort $(filter-out \ 127f0b489c1SDan Handley include/lib, \ 128f0b489c1SDan Handley $(wildcard include/*))) 129f0b489c1SDan HandleyLIB_DIRS_TO_CHECK := $(sort $(filter-out \ 1301a41e8c1SDan Handley lib/libfdt \ 131f0b489c1SDan Handley lib/stdlib, \ 132f0b489c1SDan Handley $(wildcard lib/*))) 133f0b489c1SDan HandleyROOT_DIRS_TO_CHECK := $(sort $(filter-out \ 134f0b489c1SDan Handley lib \ 135f0b489c1SDan Handley include \ 136f0b489c1SDan Handley docs \ 137f0b489c1SDan Handley %.md, \ 138f0b489c1SDan Handley $(wildcard *))) 139f0b489c1SDan HandleyCHECK_PATHS := ${ROOT_DIRS_TO_CHECK} \ 140f0b489c1SDan Handley ${INC_DIRS_TO_CHECK} \ 141f0b489c1SDan Handley ${INC_LIB_DIRS_TO_CHECK} \ 142f0b489c1SDan Handley ${LIB_DIRS_TO_CHECK} 14336eaaf37SIan Spray 14473c99d4eSJuan Castillo 14573c99d4eSJuan Castillo################################################################################ 14673c99d4eSJuan Castillo# Process build options 14773c99d4eSJuan Castillo################################################################################ 14873c99d4eSJuan Castillo 14973c99d4eSJuan Castillo# Verbose flag 150e35c4045SJeenu Viswambharanifeq (${V},0) 151b169f6a9SEvan Lloyd Q:=@ 15236eaaf37SIan Spray CHECKCODE_ARGS += --no-summary --terse 1534f6ad66aSAchin Guptaelse 154b169f6a9SEvan Lloyd Q:= 1554f6ad66aSAchin Guptaendif 1562f2cef46SJeenu Viswambharanexport Q 1572f2cef46SJeenu Viswambharan 15873c99d4eSJuan Castillo# Process Debug flag 15973c99d4eSJuan Castillo$(eval $(call add_define,DEBUG)) 160eaaeece2SJames Morrisseyifneq (${DEBUG}, 0) 161eaaeece2SJames Morrissey BUILD_TYPE := debug 162403973c9SSandrine Bailleux TF_CFLAGS += -g 16373c99d4eSJuan Castillo ASFLAGS += -g -Wa,--gdwarf-2 164289c28a8SDan Handley # Use LOG_LEVEL_INFO by default for debug builds 165289c28a8SDan Handley LOG_LEVEL := 40 166eaaeece2SJames Morrisseyelse 167eaaeece2SJames Morrissey BUILD_TYPE := release 16873c99d4eSJuan Castillo $(eval $(call add_define,NDEBUG)) 169289c28a8SDan Handley # Use LOG_LEVEL_NOTICE by default for release builds 170289c28a8SDan Handley LOG_LEVEL := 20 171eaaeece2SJames Morrisseyendif 172eaaeece2SJames Morrissey 173aaa3e722SJuan Castillo# Default build string (git branch and commit) 174aaa3e722SJuan Castilloifeq (${BUILD_STRING},) 175aaa3e722SJuan Castillo BUILD_STRING := $(shell git log -n 1 --pretty=format:"%h") 176aaa3e722SJuan Castilloendif 177aaa3e722SJuan CastilloVERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING} 178aaa3e722SJuan Castillo 17973c99d4eSJuan Castillo# The cert_create tool cannot generate certificates individually, so we use the 18073c99d4eSJuan Castillo# target 'certificates' to create them all 18173c99d4eSJuan Castilloifneq (${GENERATE_COT},0) 18273c99d4eSJuan Castillo FIP_DEPS += certificates 1830191262dSYatharth Kochar FWU_FIP_DEPS += fwu_certificates 18473c99d4eSJuan Castilloendif 18573c99d4eSJuan Castillo 18673c99d4eSJuan Castillo 18773c99d4eSJuan Castillo################################################################################ 18873c99d4eSJuan Castillo# Toolchain 18973c99d4eSJuan Castillo################################################################################ 19073c99d4eSJuan Castillo 19173c99d4eSJuan CastilloCC := ${CROSS_COMPILE}gcc 19273c99d4eSJuan CastilloCPP := ${CROSS_COMPILE}cpp 19373c99d4eSJuan CastilloAS := ${CROSS_COMPILE}gcc 19473c99d4eSJuan CastilloAR := ${CROSS_COMPILE}ar 19573c99d4eSJuan CastilloLD := ${CROSS_COMPILE}ld 19673c99d4eSJuan CastilloOC := ${CROSS_COMPILE}objcopy 19773c99d4eSJuan CastilloOD := ${CROSS_COMPILE}objdump 19873c99d4eSJuan CastilloNM := ${CROSS_COMPILE}nm 19973c99d4eSJuan CastilloPP := ${CROSS_COMPILE}gcc -E 20073c99d4eSJuan Castillo 20173c99d4eSJuan CastilloASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \ 20273c99d4eSJuan Castillo -Werror -Wmissing-include-dirs \ 20373c99d4eSJuan Castillo -mgeneral-regs-only -D__ASSEMBLY__ \ 20473c99d4eSJuan Castillo ${DEFINES} ${INCLUDES} 205403973c9SSandrine BailleuxTF_CFLAGS += -nostdinc -ffreestanding -Wall \ 20673c99d4eSJuan Castillo -Werror -Wmissing-include-dirs \ 207fa1d3712SJuan Castillo -mgeneral-regs-only -mstrict-align \ 208fa1d3712SJuan Castillo -std=c99 -c -Os \ 20973c99d4eSJuan Castillo ${DEFINES} ${INCLUDES} 210403973c9SSandrine BailleuxTF_CFLAGS += -ffunction-sections -fdata-sections 21173c99d4eSJuan Castillo 21273c99d4eSJuan CastilloLDFLAGS += --fatal-warnings -O1 21373c99d4eSJuan CastilloLDFLAGS += --gc-sections 21473c99d4eSJuan Castillo 21573c99d4eSJuan Castillo 21673c99d4eSJuan Castillo################################################################################ 21773c99d4eSJuan Castillo# Common sources and include directories 21873c99d4eSJuan Castillo################################################################################ 219f0b489c1SDan Handleyinclude lib/stdlib/stdlib.mk 22073c99d4eSJuan Castillo 22173c99d4eSJuan CastilloBL_COMMON_SOURCES += common/bl_common.c \ 222b79af934SSoby Mathew common/tf_printf.c \ 223626ed510SSoby Mathew common/aarch64/debug.S \ 224bee82417SDan Handley lib/aarch64/cache_helpers.S \ 225bee82417SDan Handley lib/aarch64/misc_helpers.S \ 226f0b489c1SDan Handley plat/common/aarch64/platform_helpers.S \ 227f0b489c1SDan Handley ${STDLIB_SRCS} 228d7a6b0f8SRyan Harkin 22948bfb88eSYatharth KocharINCLUDES += -Iinclude/bl1 \ 23048bfb88eSYatharth Kochar -Iinclude/bl31 \ 2314ecca339SDan Handley -Iinclude/common \ 232*532ed618SSoby Mathew -Iinclude/common/aarch64 \ 2334ecca339SDan Handley -Iinclude/drivers \ 2344ecca339SDan Handley -Iinclude/drivers/arm \ 2351779ba6bSJuan Castillo -Iinclude/drivers/auth \ 236935db693SDan Handley -Iinclude/drivers/io \ 237c13b2e32SVarun Wadekar -Iinclude/drivers/ti/uart \ 2384ecca339SDan Handley -Iinclude/lib \ 2394ecca339SDan Handley -Iinclude/lib/aarch64 \ 240add40351SSoby Mathew -Iinclude/lib/cpus/aarch64 \ 241*532ed618SSoby Mathew -Iinclude/lib/el3_runtime \ 242*532ed618SSoby Mathew -Iinclude/lib/el3_runtime/aarch64 \ 243*532ed618SSoby Mathew -Iinclude/lib/psci \ 2445f0cdb05SDan Handley -Iinclude/plat/common \ 245*532ed618SSoby Mathew -Iinclude/services \ 246375f538aSAchin Gupta ${PLAT_INCLUDES} \ 247375f538aSAchin Gupta ${SPD_INCLUDES} 2484f6ad66aSAchin Gupta 24973c99d4eSJuan Castillo 25073c99d4eSJuan Castillo################################################################################ 25173c99d4eSJuan Castillo# Generic definitions 25273c99d4eSJuan Castillo################################################################################ 25373c99d4eSJuan Castillo 254231c1470SEvan Lloydinclude ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk 255231c1470SEvan Lloyd 25673c99d4eSJuan CastilloBUILD_BASE := ./build 25773c99d4eSJuan CastilloBUILD_PLAT := ${BUILD_BASE}/${PLAT}/${BUILD_TYPE} 25873c99d4eSJuan Castillo 259231c1470SEvan LloydSPDS := $(sort $(filter-out none, $(patsubst services/spd/%,%,$(wildcard services/spd/*)))) 26073c99d4eSJuan Castillo 26173c99d4eSJuan Castillo# Platforms providing their own TBB makefile may override this value 26273c99d4eSJuan CastilloINCLUDE_TBBR_MK := 1 26373c99d4eSJuan Castillo 26473c99d4eSJuan Castillo 26573c99d4eSJuan Castillo################################################################################ 26673c99d4eSJuan Castillo# Include SPD Makefile if one has been specified 26773c99d4eSJuan Castillo################################################################################ 26873c99d4eSJuan Castillo 26973c99d4eSJuan Castilloifneq (${SPD},none) 2704c117f6cSSandrine Bailleuxifdef EL3_PAYLOAD_BASE 2714c117f6cSSandrine Bailleux $(warning "SPD and EL3_PAYLOAD_BASE are incompatible build options.") 2724c117f6cSSandrine Bailleux $(warning "The SPD and its BL32 companion will be present but ignored.") 2734c117f6cSSandrine Bailleuxendif 27473c99d4eSJuan Castillo # We expect to locate an spd.mk under the specified SPD directory 275231c1470SEvan Lloyd SPD_MAKE := $(wildcard services/spd/${SPD}/${SPD}.mk) 27673c99d4eSJuan Castillo 27773c99d4eSJuan Castillo ifeq (${SPD_MAKE},) 27873c99d4eSJuan Castillo $(error Error: No services/spd/${SPD}/${SPD}.mk located) 27973c99d4eSJuan Castillo endif 28073c99d4eSJuan Castillo $(info Including ${SPD_MAKE}) 28173c99d4eSJuan Castillo include ${SPD_MAKE} 28273c99d4eSJuan Castillo 28370d1fc53SJuan Castillo # If there's BL32 companion for the chosen SPD, we expect that the SPD's 28470d1fc53SJuan Castillo # Makefile would set NEED_BL32 to "yes". In this case, the build system 28570d1fc53SJuan Castillo # supports two mutually exclusive options: 28670d1fc53SJuan Castillo # * BL32 is built from source: then BL32_SOURCES must contain the list 28770d1fc53SJuan Castillo # of source files to build BL32 28870d1fc53SJuan Castillo # * BL32 is a prebuilt binary: then BL32 must point to the image file 28970d1fc53SJuan Castillo # that will be included in the FIP 29070d1fc53SJuan Castillo # If both BL32_SOURCES and BL32 are defined, the binary takes precedence 29170d1fc53SJuan Castillo # over the sources. 292e35c4045SJeenu Viswambharanendif 293e35c4045SJeenu Viswambharan 294c04d2606SDan Handley 29573c99d4eSJuan Castillo################################################################################ 29673c99d4eSJuan Castillo# Include the platform specific Makefile after the SPD Makefile (the platform 29773c99d4eSJuan Castillo# makefile may use all previous definitions in this file) 29873c99d4eSJuan Castillo################################################################################ 2992da8d8bfSJeenu Viswambharan 30073c99d4eSJuan Castilloinclude ${PLAT_MAKEFILE_FULL} 3010f21c547SJuan Castillo 30293271a1eSAchin Gupta# If the platform has not defined ENABLE_PLAT_COMPAT, then enable it by default 30393271a1eSAchin Guptaifndef ENABLE_PLAT_COMPAT 30493271a1eSAchin GuptaENABLE_PLAT_COMPAT := 1 30593271a1eSAchin Guptaendif 30693271a1eSAchin Gupta 30793271a1eSAchin Gupta# Include the platform compatibility helpers for PSCI 30893271a1eSAchin Guptaifneq (${ENABLE_PLAT_COMPAT}, 0) 30993271a1eSAchin Guptainclude plat/compat/plat_compat.mk 31093271a1eSAchin Guptaendif 31193271a1eSAchin Gupta 31254035fc4SSandrine Bailleux# Include the CPU specific operations makefile, which provides default 31354035fc4SSandrine Bailleux# values for all CPU errata workarounds and CPU specific optimisations. 31454035fc4SSandrine Bailleux# This can be overridden by the platform. 31573c99d4eSJuan Castilloinclude lib/cpus/cpu-ops.mk 3164f6ad66aSAchin Gupta 3174f6ad66aSAchin Gupta 31873c99d4eSJuan Castillo################################################################################ 319cf2c8a33SAntonio Nino Diaz# Check incompatible options 320cf2c8a33SAntonio Nino Diaz################################################################################ 321cf2c8a33SAntonio Nino Diaz 322cf2c8a33SAntonio Nino Diazifdef EL3_PAYLOAD_BASE 32368450a6dSAntonio Nino Diaz ifdef PRELOADED_BL33_BASE 32468450a6dSAntonio Nino Diaz $(warning "PRELOADED_BL33_BASE and EL3_PAYLOAD_BASE are \ 32568450a6dSAntonio Nino Diaz incompatible build options. EL3_PAYLOAD_BASE has priority.") 326cf2c8a33SAntonio Nino Diaz endif 327cf2c8a33SAntonio Nino Diazendif 328cf2c8a33SAntonio Nino Diaz 329cf2c8a33SAntonio Nino Diazifeq (${NEED_BL33},yes) 330cf2c8a33SAntonio Nino Diaz ifdef EL3_PAYLOAD_BASE 331cf2c8a33SAntonio Nino Diaz $(warning "BL33 image is not needed when option \ 332cf2c8a33SAntonio Nino Diaz BL33_PAYLOAD_BASE is used and won't be added to the FIP file.") 333cf2c8a33SAntonio Nino Diaz endif 33468450a6dSAntonio Nino Diaz ifdef PRELOADED_BL33_BASE 33568450a6dSAntonio Nino Diaz $(warning "BL33 image is not needed when option \ 33668450a6dSAntonio Nino Diaz PRELOADED_BL33_BASE is used and won't be added to the FIP \ 33768450a6dSAntonio Nino Diaz file.") 338cf2c8a33SAntonio Nino Diaz endif 339cf2c8a33SAntonio Nino Diazendif 340cf2c8a33SAntonio Nino Diaz 341cf2c8a33SAntonio Nino Diaz 342cf2c8a33SAntonio Nino Diaz################################################################################ 34373c99d4eSJuan Castillo# Process platform overrideable behaviour 34473c99d4eSJuan Castillo################################################################################ 3454f6ad66aSAchin Gupta 34673c99d4eSJuan Castillo# Check if -pedantic option should be used 34773c99d4eSJuan Castilloifeq (${DISABLE_PEDANTIC},0) 348403973c9SSandrine Bailleux TF_CFLAGS += -pedantic 34973c99d4eSJuan Castilloendif 350f58ad36fSHarry Liebel 3511645d3eeSSandrine Bailleux# Using the ARM Trusted Firmware BL2 implies that a BL33 image also needs to be 35273c99d4eSJuan Castillo# supplied for the FIP and Certificate generation tools. This flag can be 35373c99d4eSJuan Castillo# overridden by the platform. 35473c99d4eSJuan Castilloifdef BL2_SOURCES 355cf2c8a33SAntonio Nino Diaz ifdef EL3_PAYLOAD_BASE 356cf2c8a33SAntonio Nino Diaz # If booting an EL3 payload there is no need for a BL33 image 357cf2c8a33SAntonio Nino Diaz # in the FIP file. 3584c117f6cSSandrine Bailleux NEED_BL33 := no 359cf2c8a33SAntonio Nino Diaz else 36068450a6dSAntonio Nino Diaz ifdef PRELOADED_BL33_BASE 361cf2c8a33SAntonio Nino Diaz # If booting a BL33 preloaded image there is no need of 362cf2c8a33SAntonio Nino Diaz # another one in the FIP file. 363cf2c8a33SAntonio Nino Diaz NEED_BL33 := no 364cf2c8a33SAntonio Nino Diaz else 365cf2c8a33SAntonio Nino Diaz NEED_BL33 ?= yes 366cf2c8a33SAntonio Nino Diaz endif 3674c117f6cSSandrine Bailleux endif 36873c99d4eSJuan Castilloendif 3696f971622SJuan Castillo 37073c99d4eSJuan Castillo# Process TBB related flags 3716f971622SJuan Castilloifneq (${GENERATE_COT},0) 37273c99d4eSJuan Castillo # Common cert_create options 3736f971622SJuan Castillo ifneq (${CREATE_KEYS},0) 3746f971622SJuan Castillo $(eval CRT_ARGS += -n) 3750191262dSYatharth Kochar $(eval FWU_CRT_ARGS += -n) 376fd34e7baSJuan Castillo ifneq (${SAVE_KEYS},0) 377fd34e7baSJuan Castillo $(eval CRT_ARGS += -k) 3780191262dSYatharth Kochar $(eval FWU_CRT_ARGS += -k) 379fd34e7baSJuan Castillo endif 3806f971622SJuan Castillo endif 38173c99d4eSJuan Castillo # Include TBBR makefile (unless the platform indicates otherwise) 38273c99d4eSJuan Castillo ifeq (${INCLUDE_TBBR_MK},1) 38373c99d4eSJuan Castillo include make_helpers/tbbr/tbbr_tools.mk 38473c99d4eSJuan Castillo endif 3856f971622SJuan Castilloendif 3866f971622SJuan Castillo 387170fb93dSYatharth Kochar# Make sure PMF is enabled if PSCI STAT is enabled. 388170fb93dSYatharth Kocharifeq (${ENABLE_PSCI_STAT},1) 389170fb93dSYatharth KocharENABLE_PMF := 1 390170fb93dSYatharth Kocharendif 39173c99d4eSJuan Castillo 39273c99d4eSJuan Castillo################################################################################ 39373c99d4eSJuan Castillo# Auxiliary tools (fip_create, cert_create, etc) 39473c99d4eSJuan Castillo################################################################################ 39573c99d4eSJuan Castillo 39673c99d4eSJuan Castillo# Variables for use with Certificate Generation Tool 39773c99d4eSJuan CastilloCRTTOOLPATH ?= tools/cert_create 39842a45b51SEvan LloydCRTTOOL ?= ${CRTTOOLPATH}/cert_create${BIN_EXT} 39973c99d4eSJuan Castillo 40073c99d4eSJuan Castillo# Variables for use with Firmware Image Package 40173c99d4eSJuan CastilloFIPTOOLPATH ?= tools/fip_create 40242a45b51SEvan LloydFIPTOOL ?= ${FIPTOOLPATH}/fip_create${BIN_EXT} 40373c99d4eSJuan Castillo 40473c99d4eSJuan Castillo 40573c99d4eSJuan Castillo################################################################################ 40673c99d4eSJuan Castillo# Build options checks 40773c99d4eSJuan Castillo################################################################################ 40873c99d4eSJuan Castillo 40973c99d4eSJuan Castillo$(eval $(call assert_boolean,DEBUG)) 41073c99d4eSJuan Castillo$(eval $(call assert_boolean,NS_TIMER_SWITCH)) 41173c99d4eSJuan Castillo$(eval $(call assert_boolean,RESET_TO_BL31)) 41273c99d4eSJuan Castillo$(eval $(call assert_boolean,CTX_INCLUDE_FPREGS)) 4138cd16e6bSSoby Mathew$(eval $(call assert_boolean,CTX_INCLUDE_AARCH32_REGS)) 41473c99d4eSJuan Castillo$(eval $(call assert_boolean,ASM_ASSERTION)) 41573c99d4eSJuan Castillo$(eval $(call assert_boolean,USE_COHERENT_MEM)) 41673c99d4eSJuan Castillo$(eval $(call assert_boolean,DISABLE_PEDANTIC)) 41773c99d4eSJuan Castillo$(eval $(call assert_boolean,GENERATE_COT)) 41873c99d4eSJuan Castillo$(eval $(call assert_boolean,CREATE_KEYS)) 41973c99d4eSJuan Castillo$(eval $(call assert_boolean,SAVE_KEYS)) 42073c99d4eSJuan Castillo$(eval $(call assert_boolean,TRUSTED_BOARD_BOOT)) 42173c99d4eSJuan Castillo$(eval $(call assert_boolean,PROGRAMMABLE_RESET_ADDRESS)) 422a9bec67dSSandrine Bailleux$(eval $(call assert_boolean,COLD_BOOT_SINGLE_CPU)) 42373c99d4eSJuan Castillo$(eval $(call assert_boolean,PSCI_EXTENDED_STATE_ID)) 4247a24cba5SSoby Mathew$(eval $(call assert_boolean,ERROR_DEPRECATED)) 42593271a1eSAchin Gupta$(eval $(call assert_boolean,ENABLE_PLAT_COMPAT)) 42635e8c766SSandrine Bailleux$(eval $(call assert_boolean,SPIN_ON_BL1_EXIT)) 42712f654b6SJuan Castillo$(eval $(call assert_boolean,PL011_GENERIC_UART)) 428a31d8983SYatharth Kochar$(eval $(call assert_boolean,ENABLE_PMF)) 429170fb93dSYatharth Kochar$(eval $(call assert_boolean,ENABLE_PSCI_STAT)) 4305d1c104fSSandrine Bailleux$(eval $(call assert_boolean,SEPARATE_CODE_AND_RODATA)) 43173c99d4eSJuan Castillo 43273c99d4eSJuan Castillo 43373c99d4eSJuan Castillo################################################################################ 43473c99d4eSJuan Castillo# Add definitions to the cpp preprocessor based on the current build options. 43573c99d4eSJuan Castillo# This is done after including the platform specific makefile to allow the 43673c99d4eSJuan Castillo# platform to overwrite the default options 43773c99d4eSJuan Castillo################################################################################ 43873c99d4eSJuan Castillo 43973c99d4eSJuan Castillo$(eval $(call add_define,PLAT_${PLAT})) 44081d139d5SAntonio Nino Diaz$(eval $(call add_define,SPD_${SPD})) 44173c99d4eSJuan Castillo$(eval $(call add_define,NS_TIMER_SWITCH)) 44273c99d4eSJuan Castillo$(eval $(call add_define,RESET_TO_BL31)) 44373c99d4eSJuan Castillo$(eval $(call add_define,CTX_INCLUDE_FPREGS)) 4448cd16e6bSSoby Mathew$(eval $(call add_define,CTX_INCLUDE_AARCH32_REGS)) 44573c99d4eSJuan Castillo$(eval $(call add_define,ARM_GIC_ARCH)) 44673c99d4eSJuan Castillo$(eval $(call add_define,ARM_CCI_PRODUCT_ID)) 44773c99d4eSJuan Castillo$(eval $(call add_define,ASM_ASSERTION)) 44873c99d4eSJuan Castillo$(eval $(call add_define,LOG_LEVEL)) 44973c99d4eSJuan Castillo$(eval $(call add_define,USE_COHERENT_MEM)) 45073c99d4eSJuan Castillo$(eval $(call add_define,TRUSTED_BOARD_BOOT)) 45173c99d4eSJuan Castillo$(eval $(call add_define,PROGRAMMABLE_RESET_ADDRESS)) 452a9bec67dSSandrine Bailleux$(eval $(call add_define,COLD_BOOT_SINGLE_CPU)) 45373c99d4eSJuan Castillo$(eval $(call add_define,PSCI_EXTENDED_STATE_ID)) 4547a24cba5SSoby Mathew$(eval $(call add_define,ERROR_DEPRECATED)) 45593271a1eSAchin Gupta$(eval $(call add_define,ENABLE_PLAT_COMPAT)) 45635e8c766SSandrine Bailleux$(eval $(call add_define,SPIN_ON_BL1_EXIT)) 457cf2c8a33SAntonio Nino Diaz$(eval $(call add_define,PL011_GENERIC_UART)) 458a31d8983SYatharth Kochar$(eval $(call add_define,ENABLE_PMF)) 459170fb93dSYatharth Kochar$(eval $(call add_define,ENABLE_PSCI_STAT)) 4605d1c104fSSandrine Bailleux$(eval $(call add_define,SEPARATE_CODE_AND_RODATA)) 4614c117f6cSSandrine Bailleux# Define the EL3_PAYLOAD_BASE flag only if it is provided. 4624c117f6cSSandrine Bailleuxifdef EL3_PAYLOAD_BASE 4634c117f6cSSandrine Bailleux $(eval $(call add_define,EL3_PAYLOAD_BASE)) 464cf2c8a33SAntonio Nino Diazelse 46568450a6dSAntonio Nino Diaz # Define the PRELOADED_BL33_BASE flag only if it is provided and 46668450a6dSAntonio Nino Diaz # EL3_PAYLOAD_BASE is not defined, as it has priority. 46768450a6dSAntonio Nino Diaz ifdef PRELOADED_BL33_BASE 46868450a6dSAntonio Nino Diaz $(eval $(call add_define,PRELOADED_BL33_BASE)) 4694c117f6cSSandrine Bailleux endif 470cf2c8a33SAntonio Nino Diazendif 47173c99d4eSJuan Castillo 47273c99d4eSJuan Castillo################################################################################ 47373c99d4eSJuan Castillo# Include BL specific makefiles 47473c99d4eSJuan Castillo################################################################################ 47573c99d4eSJuan Castillo 47673c99d4eSJuan Castilloifdef BL1_SOURCES 47773c99d4eSJuan CastilloNEED_BL1 := yes 47873c99d4eSJuan Castilloinclude bl1/bl1.mk 47973c99d4eSJuan Castilloendif 48073c99d4eSJuan Castillo 48173c99d4eSJuan Castilloifdef BL2_SOURCES 48273c99d4eSJuan CastilloNEED_BL2 := yes 48373c99d4eSJuan Castilloinclude bl2/bl2.mk 48473c99d4eSJuan Castilloendif 48573c99d4eSJuan Castillo 4869003fa0bSYatharth Kocharifdef BL2U_SOURCES 4879003fa0bSYatharth KocharNEED_BL2U := yes 4889003fa0bSYatharth Kocharinclude bl2u/bl2u.mk 4899003fa0bSYatharth Kocharendif 4909003fa0bSYatharth Kochar 49173c99d4eSJuan Castilloifdef BL31_SOURCES 4924c117f6cSSandrine Bailleux# When booting an EL3 payload, there is no need to compile the BL31 image nor 4934c117f6cSSandrine Bailleux# put it in the FIP. 4944c117f6cSSandrine Bailleuxifndef EL3_PAYLOAD_BASE 49573c99d4eSJuan CastilloNEED_BL31 := yes 49673c99d4eSJuan Castilloinclude bl31/bl31.mk 49773c99d4eSJuan Castilloendif 4984c117f6cSSandrine Bailleuxendif 49973c99d4eSJuan Castillo 50073c99d4eSJuan Castillo 50173c99d4eSJuan Castillo################################################################################ 50273c99d4eSJuan Castillo# Build targets 50373c99d4eSJuan Castillo################################################################################ 50473c99d4eSJuan Castillo 5050191262dSYatharth Kochar.PHONY: all msg_start clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip fwu_fip certtool 50673c99d4eSJuan Castillo.SUFFIXES: 50773c99d4eSJuan Castillo 50873c99d4eSJuan Castilloall: msg_start 50973c99d4eSJuan Castillo 51073c99d4eSJuan Castillomsg_start: 51173c99d4eSJuan Castillo @echo "Building ${PLAT}" 51273c99d4eSJuan Castillo 5137a24cba5SSoby Mathew# Check if deprecated declarations should be treated as error or not. 5147a24cba5SSoby Mathewifeq (${ERROR_DEPRECATED},0) 515403973c9SSandrine Bailleux TF_CFLAGS += -Wno-error=deprecated-declarations 5167a24cba5SSoby Mathewendif 5177a24cba5SSoby Mathew 51873c99d4eSJuan Castillo# Expand build macros for the different images 51973c99d4eSJuan Castilloifeq (${NEED_BL1},yes) 52073c99d4eSJuan Castillo$(eval $(call MAKE_BL,1)) 52173c99d4eSJuan Castilloendif 52273c99d4eSJuan Castillo 52373c99d4eSJuan Castilloifeq (${NEED_BL2},yes) 5248f0617efSJuan Castillo$(if ${BL2}, $(eval $(call MAKE_TOOL_ARGS,2,${BL2},tb-fw)),\ 5258f0617efSJuan Castillo $(eval $(call MAKE_BL,2,tb-fw))) 52673c99d4eSJuan Castilloendif 52773c99d4eSJuan Castillo 52873c99d4eSJuan Castilloifeq (${NEED_BL31},yes) 52973c99d4eSJuan CastilloBL31_SOURCES += ${SPD_SOURCES} 5308f0617efSJuan Castillo$(if ${BL31}, $(eval $(call MAKE_TOOL_ARGS,31,${BL31},soc-fw)),\ 5318f0617efSJuan Castillo $(eval $(call MAKE_BL,31,soc-fw))) 53273c99d4eSJuan Castilloendif 53373c99d4eSJuan Castillo 53470d1fc53SJuan Castillo# If a BL32 image is needed but neither BL32 nor BL32_SOURCES is defined, the 53570d1fc53SJuan Castillo# build system will call FIP_ADD_IMG to print a warning message and abort the 53670d1fc53SJuan Castillo# process. Note that the dependency on BL32 applies to the FIP only. 53773c99d4eSJuan Castilloifeq (${NEED_BL32},yes) 5388f0617efSJuan Castillo$(if ${BL32}, $(eval $(call MAKE_TOOL_ARGS,32,${BL32},tos-fw)),\ 5398f0617efSJuan Castillo $(if ${BL32_SOURCES}, $(eval $(call MAKE_BL,32,tos-fw)),\ 5408f0617efSJuan Castillo $(eval $(call FIP_ADD_IMG,BL32,--tos-fw)))) 54173c99d4eSJuan Castilloendif 54273c99d4eSJuan Castillo 54373c99d4eSJuan Castillo# Add the BL33 image if required by the platform 54473c99d4eSJuan Castilloifeq (${NEED_BL33},yes) 5458f0617efSJuan Castillo$(eval $(call FIP_ADD_IMG,BL33,--nt-fw)) 546db6071c9SJuan Castilloendif 547db6071c9SJuan Castillo 5489003fa0bSYatharth Kocharifeq (${NEED_BL2U},yes) 5499003fa0bSYatharth KocharBL2U_PATH := $(if ${BL2U},${BL2U},$(call IMG_BIN,2u)) 5509003fa0bSYatharth Kochar$(if ${BL2U}, ,$(eval $(call MAKE_BL,2u))) 5518f0617efSJuan Castillo$(eval $(call FWU_FIP_ADD_PAYLOAD,${BL2U_PATH},--ap-fwu-cfg)) 5529003fa0bSYatharth Kocharendif 5539003fa0bSYatharth Kochar 55436eaaf37SIan Spraylocate-checkpatch: 55536eaaf37SIan Sprayifndef CHECKPATCH 55636eaaf37SIan Spray $(error "Please set CHECKPATCH to point to the Linux checkpatch.pl file, eg: CHECKPATCH=../linux/script/checkpatch.pl") 55736eaaf37SIan Sprayelse 55836eaaf37SIan Sprayifeq (,$(wildcard ${CHECKPATCH})) 55936eaaf37SIan Spray $(error "The file CHECKPATCH points to cannot be found, use eg: CHECKPATCH=../linux/script/checkpatch.pl") 56036eaaf37SIan Sprayendif 56136eaaf37SIan Sprayendif 56236eaaf37SIan Spray 5634f6ad66aSAchin Guptaclean: 5644f6ad66aSAchin Gupta @echo " CLEAN" 565f1477d4aSEvan Lloyd $(call SHELL_REMOVE_DIR,${BUILD_PLAT}) 5662f2cef46SJeenu Viswambharan ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean 5676f971622SJuan Castillo ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean 5684f6ad66aSAchin Gupta 569eaaeece2SJames Morrisseyrealclean distclean: 570eaaeece2SJames Morrissey @echo " REALCLEAN" 571f1477d4aSEvan Lloyd $(call SHELL_REMOVE_DIR,${BUILD_BASE}) 572f1477d4aSEvan Lloyd $(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*) 5732f2cef46SJeenu Viswambharan ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean 5746f971622SJuan Castillo ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean 5754f6ad66aSAchin Gupta 57636eaaf37SIan Spraycheckcodebase: locate-checkpatch 57736eaaf37SIan Spray @echo " CHECKING STYLE" 57836eaaf37SIan Spray @if test -d .git ; then \ 5791a41e8c1SDan Handley git ls-files | grep -E -v libfdt\|stdlib\|docs\|\.md | \ 5801a41e8c1SDan Handley while read GIT_FILE ; \ 5811a41e8c1SDan Handley do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; \ 5821a41e8c1SDan Handley done ; \ 58336eaaf37SIan Spray else \ 5841a41e8c1SDan Handley find . -type f -not -iwholename "*.git*" \ 5851a41e8c1SDan Handley -not -iwholename "*build*" \ 5861a41e8c1SDan Handley -not -iwholename "*libfdt*" \ 5871a41e8c1SDan Handley -not -iwholename "*stdlib*" \ 5881a41e8c1SDan Handley -not -iwholename "*docs*" \ 5891a41e8c1SDan Handley -not -iwholename "*.md" \ 5901a41e8c1SDan Handley -exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \ 59136eaaf37SIan Spray fi 59236eaaf37SIan Spray 59336eaaf37SIan Spraycheckpatch: locate-checkpatch 59436eaaf37SIan Spray @echo " CHECKING STYLE" 595f607739cSSandrine Bailleux ${Q}git log -p ${BASE_COMMIT}..HEAD -- ${CHECK_PATHS} | ${CHECKPATCH} - || true 59636eaaf37SIan Spray 59773c99d4eSJuan Castillocerttool: ${CRTTOOL} 59873c99d4eSJuan Castillo 5996f971622SJuan Castillo.PHONY: ${CRTTOOL} 6006f971622SJuan Castillo${CRTTOOL}: 6016f971622SJuan Castillo ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} 602f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 6036f971622SJuan Castillo @echo "Built $@ successfully" 604f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 6056f971622SJuan Castillo 6066f971622SJuan Castilloifneq (${GENERATE_COT},0) 60773c99d4eSJuan Castillocertificates: ${CRT_DEPS} ${CRTTOOL} 6086f971622SJuan Castillo ${Q}${CRTTOOL} ${CRT_ARGS} 609f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 6106f971622SJuan Castillo @echo "Built $@ successfully" 6116f971622SJuan Castillo @echo "Certificates can be found in ${BUILD_PLAT}" 612f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 61373c99d4eSJuan Castilloendif 61427713fb4SSoby Mathew 61573c99d4eSJuan Castillo${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL} 61673c99d4eSJuan Castillo ${Q}${FIPTOOL} --dump ${FIP_ARGS} $@ 617f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 6182f2cef46SJeenu Viswambharan @echo "Built $@ successfully" 619f1477d4aSEvan Lloyd @${ECHO_BLANK_LINE} 620f58ad36fSHarry Liebel 6210191262dSYatharth Kocharifneq (${GENERATE_COT},0) 6220191262dSYatharth Kocharfwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL} 6230191262dSYatharth Kochar ${Q}${CRTTOOL} ${FWU_CRT_ARGS} 6240191262dSYatharth Kochar @echo 6250191262dSYatharth Kochar @echo "Built $@ successfully" 6260191262dSYatharth Kochar @echo "FWU certificates can be found in ${BUILD_PLAT}" 6270191262dSYatharth Kochar @echo 6280191262dSYatharth Kocharendif 6290191262dSYatharth Kochar 6300191262dSYatharth Kochar${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL} 6310191262dSYatharth Kochar ${Q}${FIPTOOL} --dump ${FWU_FIP_ARGS} $@ 6320191262dSYatharth Kochar @echo 6330191262dSYatharth Kochar @echo "Built $@ successfully" 6340191262dSYatharth Kochar @echo 6350191262dSYatharth Kochar 63673c99d4eSJuan Castillofiptool: ${FIPTOOL} 63773c99d4eSJuan Castillofip: ${BUILD_PLAT}/${FIP_NAME} 6380191262dSYatharth Kocharfwu_fip: ${BUILD_PLAT}/${FWU_FIP_NAME} 63973c99d4eSJuan Castillo 64073c99d4eSJuan Castillo.PHONY: ${FIPTOOL} 64173c99d4eSJuan Castillo${FIPTOOL}: 64273c99d4eSJuan Castillo ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} 643f58ad36fSHarry Liebel 64435fab8c9SJoakim Bechcscope: 64535fab8c9SJoakim Bech @echo " CSCOPE" 64635fab8c9SJoakim Bech ${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files 64735fab8c9SJoakim Bech ${Q}cscope -b -q -k 64835fab8c9SJoakim Bech 64972ee3314SRyan Harkinhelp: 650231c1470SEvan Lloyd @echo "usage: ${MAKE} PLAT=<${PLATFORM_LIST}> [OPTIONS] [TARGET]" 65172ee3314SRyan Harkin @echo "" 65272ee3314SRyan Harkin @echo "PLAT is used to specify which platform you wish to build." 65308c7ed0fSSandrine Bailleux @echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}" 65472ee3314SRyan Harkin @echo "" 6551b578596SSandrine Bailleux @echo "Please refer to the User Guide for a list of all supported options." 6561b578596SSandrine Bailleux @echo "Note that the build system doesn't track dependencies for build " 6571b578596SSandrine Bailleux @echo "options. Therefore, if any of the build options are changed " 6581b578596SSandrine Bailleux @echo "from a previous build, a clean build must be performed." 6591b578596SSandrine Bailleux @echo "" 66072ee3314SRyan Harkin @echo "Supported Targets:" 6611b578596SSandrine Bailleux @echo " all Build all individual bootloader binaries" 66236eaaf37SIan Spray @echo " bl1 Build the BL1 binary" 6638aa559c0SJeenu Viswambharan @echo " bl2 Build the BL2 binary" 6649003fa0bSYatharth Kochar @echo " bl2u Build the BL2U binary" 665d178637dSJuan Castillo @echo " bl31 Build the BL31 binary" 666d178637dSJuan Castillo @echo " bl32 Build the BL32 binary" 66773c99d4eSJuan Castillo @echo " certificates Build the certificates (requires 'GENERATE_COT=1')" 6681b578596SSandrine Bailleux @echo " fip Build the Firmware Image Package (FIP)" 6690191262dSYatharth Kochar @echo " fwu_fip Build the FWU Firmware Image Package (FIP)" 67036eaaf37SIan Spray @echo " checkcodebase Check the coding style of the entire source tree" 67136eaaf37SIan Spray @echo " checkpatch Check the coding style on changes in the current" 67236eaaf37SIan Spray @echo " branch against BASE_COMMIT (default origin/master)" 67372ee3314SRyan Harkin @echo " clean Clean the build for the selected platform" 67435fab8c9SJoakim Bech @echo " cscope Generate cscope index" 67572ee3314SRyan Harkin @echo " distclean Remove all build artifacts for all platforms" 6766f971622SJuan Castillo @echo " certtool Build the Certificate generation tool" 677f58ad36fSHarry Liebel @echo " fiptool Build the Firmware Image Package(FIP) creation tool" 67872ee3314SRyan Harkin @echo "" 6791b578596SSandrine Bailleux @echo "Note: most build targets require PLAT to be set to a specific platform." 68072ee3314SRyan Harkin @echo "" 68172ee3314SRyan Harkin @echo "example: build all targets for the FVP platform:" 68272ee3314SRyan Harkin @echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all" 683