xref: /rk3399_ARM-atf/Makefile (revision 403973c95daa62b8411f789a8a93ef9e18b7f980)
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
652b98e789SSandrine Bailleux# Determine the version of ARM GIC architecture to use for interrupt management
662b98e789SSandrine Bailleux# in EL3. The platform port can change this value if needed.
672b98e789SSandrine BailleuxARM_GIC_ARCH			:= 2
6823e47edeSVikram Kanigiri# Determine the version of ARM CCI product used in the platform. The platform
6923e47edeSVikram Kanigiri# port can change this value if needed.
7023e47edeSVikram KanigiriARM_CCI_PRODUCT_ID		:= 400
71bc920128SSoby Mathew# Flag used to indicate if ASM_ASSERTION should be enabled for the build.
72bc920128SSoby Mathew# This defaults to being present in DEBUG builds only.
73bc920128SSoby MathewASM_ASSERTION			:= ${DEBUG}
748c5fe0b5SSoby Mathew# Build option to choose whether Trusted firmware uses Coherent memory or not.
758c5fe0b5SSoby MathewUSE_COHERENT_MEM		:= 1
768ee24980SSoby Mathew# Flag used to choose the power state format viz Extended State-ID or the Original
778ee24980SSoby Mathew# format.
788ee24980SSoby MathewPSCI_EXTENDED_STATE_ID		:= 0
797f48fab9SJuan Castillo# Default FIP file name
807f48fab9SJuan CastilloFIP_NAME			:= fip.bin
810191262dSYatharth Kochar# Default FWU_FIP file name
820191262dSYatharth KocharFWU_FIP_NAME			:= fwu_fip.bin
83db6071c9SJuan Castillo# By default, use the -pedantic option in the gcc command line
84db6071c9SJuan CastilloDISABLE_PEDANTIC		:= 0
856f971622SJuan Castillo# Flags to generate the Chain of Trust
866f971622SJuan CastilloGENERATE_COT			:= 0
876f971622SJuan CastilloCREATE_KEYS			:= 1
88fd34e7baSJuan CastilloSAVE_KEYS			:= 0
896eadf762SJuan Castillo# Flags to build TF with Trusted Boot support
906eadf762SJuan CastilloTRUSTED_BOARD_BOOT		:= 0
91bf031bbaSSandrine Bailleux# By default, consider that the platform's reset address is not programmable.
92bf031bbaSSandrine Bailleux# The platform Makefile is free to override this value.
93bf031bbaSSandrine BailleuxPROGRAMMABLE_RESET_ADDRESS	:= 0
947a24cba5SSoby Mathew# Build flag to treat usage of deprecated platform and framework APIs as error.
957a24cba5SSoby MathewERROR_DEPRECATED		:= 0
96a9bec67dSSandrine Bailleux# By default, consider that the platform may release several CPUs out of reset.
97a9bec67dSSandrine Bailleux# The platform Makefile is free to override this value.
98a9bec67dSSandrine BailleuxCOLD_BOOT_SINGLE_CPU		:= 0
9935e8c766SSandrine Bailleux# Flag to introduce an infinite loop in BL1 just before it exits into the next
10035e8c766SSandrine Bailleux# image. This is meant to help debugging the post-BL2 phase.
10135e8c766SSandrine BailleuxSPIN_ON_BL1_EXIT		:= 0
10212f654b6SJuan Castillo# Build PL011 UART driver in minimal generic UART mode
10312f654b6SJuan CastilloPL011_GENERIC_UART		:= 0
1044f6ad66aSAchin Gupta
10573c99d4eSJuan Castillo
10673c99d4eSJuan Castillo################################################################################
10773c99d4eSJuan Castillo# Checkpatch script options
10873c99d4eSJuan Castillo################################################################################
10973c99d4eSJuan Castillo
11073c99d4eSJuan CastilloCHECK_IGNORE		:=	--ignore COMPLEX_MACRO \
1119b4ee6b3SJuan Castillo				--ignore GERRIT_CHANGE_ID \
1129b4ee6b3SJuan Castillo				--ignore GIT_COMMIT_ID
11373c99d4eSJuan CastilloCHECKPATCH_ARGS		:=	--no-tree --no-signoff ${CHECK_IGNORE}
11473c99d4eSJuan CastilloCHECKCODE_ARGS		:=	--no-patch --no-tree --no-signoff ${CHECK_IGNORE}
1158f524c22SAntonio Nino Diaz# Do not check the coding style on C library files or documentation files
116231c1470SEvan LloydINCLUDE_DIRS_TO_CHECK	:=	$(sort $(filter-out include/stdlib, $(wildcard include/*)))
117231c1470SEvan LloydLIB_DIRS_TO_CHECK	:=	$(sort $(filter-out lib/stdlib, $(wildcard lib/*)))
1188f524c22SAntonio Nino DiazROOT_DIRS_TO_CHECK	:=	$(sort $(filter-out lib include docs %.md, $(wildcard *)))
119231c1470SEvan LloydCHECK_PATHS		:=	${ROOT_DIRS_TO_CHECK} ${INCLUDE_DIRS_TO_CHECK} ${LIB_DIRS_TO_CHECK}
12036eaaf37SIan Spray
12173c99d4eSJuan Castillo
12273c99d4eSJuan Castillo################################################################################
12373c99d4eSJuan Castillo# Process build options
12473c99d4eSJuan Castillo################################################################################
12573c99d4eSJuan Castillo
12673c99d4eSJuan Castillo# Verbose flag
127e35c4045SJeenu Viswambharanifeq (${V},0)
128b169f6a9SEvan Lloyd        Q:=@
12936eaaf37SIan Spray        CHECKCODE_ARGS	+=	--no-summary --terse
1304f6ad66aSAchin Guptaelse
131b169f6a9SEvan Lloyd        Q:=
1324f6ad66aSAchin Guptaendif
1332f2cef46SJeenu Viswambharanexport Q
1342f2cef46SJeenu Viswambharan
13573c99d4eSJuan Castillo# Process Debug flag
13673c99d4eSJuan Castillo$(eval $(call add_define,DEBUG))
137eaaeece2SJames Morrisseyifneq (${DEBUG}, 0)
138eaaeece2SJames Morrissey        BUILD_TYPE	:=	debug
139*403973c9SSandrine Bailleux        TF_CFLAGS	+= 	-g
14073c99d4eSJuan Castillo        ASFLAGS		+= 	-g -Wa,--gdwarf-2
141289c28a8SDan Handley        # Use LOG_LEVEL_INFO by default for debug builds
142289c28a8SDan Handley        LOG_LEVEL	:=	40
143eaaeece2SJames Morrisseyelse
144eaaeece2SJames Morrissey        BUILD_TYPE	:=	release
14573c99d4eSJuan Castillo        $(eval $(call add_define,NDEBUG))
146289c28a8SDan Handley        # Use LOG_LEVEL_NOTICE by default for release builds
147289c28a8SDan Handley        LOG_LEVEL	:=	20
148eaaeece2SJames Morrisseyendif
149eaaeece2SJames Morrissey
150aaa3e722SJuan Castillo# Default build string (git branch and commit)
151aaa3e722SJuan Castilloifeq (${BUILD_STRING},)
152aaa3e722SJuan Castillo        BUILD_STRING	:=	$(shell git log -n 1 --pretty=format:"%h")
153aaa3e722SJuan Castilloendif
154aaa3e722SJuan CastilloVERSION_STRING		:=	v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
155aaa3e722SJuan Castillo
15673c99d4eSJuan Castillo# The cert_create tool cannot generate certificates individually, so we use the
15773c99d4eSJuan Castillo# target 'certificates' to create them all
15873c99d4eSJuan Castilloifneq (${GENERATE_COT},0)
15973c99d4eSJuan Castillo        FIP_DEPS += certificates
1600191262dSYatharth Kochar        FWU_FIP_DEPS += fwu_certificates
16173c99d4eSJuan Castilloendif
16273c99d4eSJuan Castillo
16373c99d4eSJuan Castillo
16473c99d4eSJuan Castillo################################################################################
16573c99d4eSJuan Castillo# Toolchain
16673c99d4eSJuan Castillo################################################################################
16773c99d4eSJuan Castillo
16873c99d4eSJuan CastilloCC			:=	${CROSS_COMPILE}gcc
16973c99d4eSJuan CastilloCPP			:=	${CROSS_COMPILE}cpp
17073c99d4eSJuan CastilloAS			:=	${CROSS_COMPILE}gcc
17173c99d4eSJuan CastilloAR			:=	${CROSS_COMPILE}ar
17273c99d4eSJuan CastilloLD			:=	${CROSS_COMPILE}ld
17373c99d4eSJuan CastilloOC			:=	${CROSS_COMPILE}objcopy
17473c99d4eSJuan CastilloOD			:=	${CROSS_COMPILE}objdump
17573c99d4eSJuan CastilloNM			:=	${CROSS_COMPILE}nm
17673c99d4eSJuan CastilloPP			:=	${CROSS_COMPILE}gcc -E
17773c99d4eSJuan Castillo
17873c99d4eSJuan CastilloASFLAGS			+= 	-nostdinc -ffreestanding -Wa,--fatal-warnings	\
17973c99d4eSJuan Castillo				-Werror -Wmissing-include-dirs			\
18073c99d4eSJuan Castillo				-mgeneral-regs-only -D__ASSEMBLY__		\
18173c99d4eSJuan Castillo				${DEFINES} ${INCLUDES}
182*403973c9SSandrine BailleuxTF_CFLAGS		+= 	-nostdinc -ffreestanding -Wall			\
18373c99d4eSJuan Castillo				-Werror -Wmissing-include-dirs			\
184fa1d3712SJuan Castillo				-mgeneral-regs-only -mstrict-align		\
185fa1d3712SJuan Castillo				-std=c99 -c -Os					\
18673c99d4eSJuan Castillo				${DEFINES} ${INCLUDES}
187*403973c9SSandrine BailleuxTF_CFLAGS		+=	-ffunction-sections -fdata-sections
18873c99d4eSJuan Castillo
18973c99d4eSJuan CastilloLDFLAGS			+=	--fatal-warnings -O1
19073c99d4eSJuan CastilloLDFLAGS			+=	--gc-sections
19173c99d4eSJuan Castillo
19273c99d4eSJuan Castillo
19373c99d4eSJuan Castillo################################################################################
19473c99d4eSJuan Castillo# Common sources and include directories
19573c99d4eSJuan Castillo################################################################################
19673c99d4eSJuan Castillo
19773c99d4eSJuan CastilloBL_COMMON_SOURCES	+=	common/bl_common.c			\
198b79af934SSoby Mathew				common/tf_printf.c			\
199626ed510SSoby Mathew				common/aarch64/debug.S			\
200bee82417SDan Handley				lib/aarch64/cache_helpers.S		\
201bee82417SDan Handley				lib/aarch64/misc_helpers.S		\
202191a0088SAntonio Nino Diaz				lib/stdlib/abort.c			\
203191a0088SAntonio Nino Diaz				lib/stdlib/assert.c			\
204191a0088SAntonio Nino Diaz				lib/stdlib/exit.c			\
205191a0088SAntonio Nino Diaz				lib/stdlib/mem.c			\
206191a0088SAntonio Nino Diaz				lib/stdlib/printf.c			\
207191a0088SAntonio Nino Diaz				lib/stdlib/putchar.c			\
208191a0088SAntonio Nino Diaz				lib/stdlib/puts.c			\
209191a0088SAntonio Nino Diaz				lib/stdlib/sscanf.c			\
210191a0088SAntonio Nino Diaz				lib/stdlib/strchr.c			\
211191a0088SAntonio Nino Diaz				lib/stdlib/strcmp.c			\
212191a0088SAntonio Nino Diaz				lib/stdlib/strlen.c			\
213191a0088SAntonio Nino Diaz				lib/stdlib/strncmp.c			\
214191a0088SAntonio Nino Diaz				lib/stdlib/subr_prf.c			\
215bee82417SDan Handley				plat/common/aarch64/platform_helpers.S
216d7a6b0f8SRyan Harkin
21748bfb88eSYatharth KocharINCLUDES		+=	-Iinclude/bl1			\
21848bfb88eSYatharth Kochar				-Iinclude/bl31			\
2194ecca339SDan Handley				-Iinclude/bl31/services		\
2204ecca339SDan Handley				-Iinclude/common		\
2214ecca339SDan Handley				-Iinclude/drivers		\
2224ecca339SDan Handley				-Iinclude/drivers/arm		\
2231779ba6bSJuan Castillo				-Iinclude/drivers/auth		\
224935db693SDan Handley				-Iinclude/drivers/io		\
225c13b2e32SVarun Wadekar				-Iinclude/drivers/ti/uart	\
2264ecca339SDan Handley				-Iinclude/lib			\
2274ecca339SDan Handley				-Iinclude/lib/aarch64		\
228add40351SSoby Mathew				-Iinclude/lib/cpus/aarch64	\
2295f0cdb05SDan Handley				-Iinclude/plat/common		\
230d7a6b0f8SRyan Harkin				-Iinclude/stdlib		\
231d7a6b0f8SRyan Harkin				-Iinclude/stdlib/sys		\
232375f538aSAchin Gupta				${PLAT_INCLUDES}		\
233375f538aSAchin Gupta				${SPD_INCLUDES}
2344f6ad66aSAchin Gupta
23573c99d4eSJuan Castillo
23673c99d4eSJuan Castillo################################################################################
23773c99d4eSJuan Castillo# Generic definitions
23873c99d4eSJuan Castillo################################################################################
23973c99d4eSJuan Castillo
240231c1470SEvan Lloydinclude ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk
241231c1470SEvan Lloyd
24273c99d4eSJuan CastilloBUILD_BASE		:=	./build
24373c99d4eSJuan CastilloBUILD_PLAT		:=	${BUILD_BASE}/${PLAT}/${BUILD_TYPE}
24473c99d4eSJuan Castillo
245231c1470SEvan LloydSPDS			:=	$(sort $(filter-out none, $(patsubst services/spd/%,%,$(wildcard services/spd/*))))
24673c99d4eSJuan Castillo
24773c99d4eSJuan Castillo# Platforms providing their own TBB makefile may override this value
24873c99d4eSJuan CastilloINCLUDE_TBBR_MK		:=	1
24973c99d4eSJuan Castillo
25073c99d4eSJuan Castillo
25173c99d4eSJuan Castillo################################################################################
25273c99d4eSJuan Castillo# Include SPD Makefile if one has been specified
25373c99d4eSJuan Castillo################################################################################
25473c99d4eSJuan Castillo
25573c99d4eSJuan Castilloifneq (${SPD},none)
2564c117f6cSSandrine Bailleuxifdef EL3_PAYLOAD_BASE
2574c117f6cSSandrine Bailleux        $(warning "SPD and EL3_PAYLOAD_BASE are incompatible build options.")
2584c117f6cSSandrine Bailleux        $(warning "The SPD and its BL32 companion will be present but ignored.")
2594c117f6cSSandrine Bailleuxendif
26073c99d4eSJuan Castillo        # We expect to locate an spd.mk under the specified SPD directory
261231c1470SEvan Lloyd        SPD_MAKE	:=	$(wildcard services/spd/${SPD}/${SPD}.mk)
26273c99d4eSJuan Castillo
26373c99d4eSJuan Castillo        ifeq (${SPD_MAKE},)
26473c99d4eSJuan Castillo                $(error Error: No services/spd/${SPD}/${SPD}.mk located)
26573c99d4eSJuan Castillo        endif
26673c99d4eSJuan Castillo        $(info Including ${SPD_MAKE})
26773c99d4eSJuan Castillo        include ${SPD_MAKE}
26873c99d4eSJuan Castillo
26970d1fc53SJuan Castillo        # If there's BL32 companion for the chosen SPD, we expect that the SPD's
27070d1fc53SJuan Castillo        # Makefile would set NEED_BL32 to "yes". In this case, the build system
27170d1fc53SJuan Castillo        # supports two mutually exclusive options:
27270d1fc53SJuan Castillo        # * BL32 is built from source: then BL32_SOURCES must contain the list
27370d1fc53SJuan Castillo        #   of source files to build BL32
27470d1fc53SJuan Castillo        # * BL32 is a prebuilt binary: then BL32 must point to the image file
27570d1fc53SJuan Castillo        #   that will be included in the FIP
27670d1fc53SJuan Castillo        # If both BL32_SOURCES and BL32 are defined, the binary takes precedence
27770d1fc53SJuan Castillo        # over the sources.
278e35c4045SJeenu Viswambharanendif
279e35c4045SJeenu Viswambharan
280c04d2606SDan Handley
28173c99d4eSJuan Castillo################################################################################
28273c99d4eSJuan Castillo# Include the platform specific Makefile after the SPD Makefile (the platform
28373c99d4eSJuan Castillo# makefile may use all previous definitions in this file)
28473c99d4eSJuan Castillo################################################################################
2852da8d8bfSJeenu Viswambharan
28673c99d4eSJuan Castilloinclude ${PLAT_MAKEFILE_FULL}
2870f21c547SJuan Castillo
28893271a1eSAchin Gupta# If the platform has not defined ENABLE_PLAT_COMPAT, then enable it by default
28993271a1eSAchin Guptaifndef ENABLE_PLAT_COMPAT
29093271a1eSAchin GuptaENABLE_PLAT_COMPAT := 1
29193271a1eSAchin Guptaendif
29293271a1eSAchin Gupta
29393271a1eSAchin Gupta# Include the platform compatibility helpers for PSCI
29493271a1eSAchin Guptaifneq (${ENABLE_PLAT_COMPAT}, 0)
29593271a1eSAchin Guptainclude plat/compat/plat_compat.mk
29693271a1eSAchin Guptaendif
29793271a1eSAchin Gupta
29854035fc4SSandrine Bailleux# Include the CPU specific operations makefile, which provides default
29954035fc4SSandrine Bailleux# values for all CPU errata workarounds and CPU specific optimisations.
30054035fc4SSandrine Bailleux# This can be overridden by the platform.
30173c99d4eSJuan Castilloinclude lib/cpus/cpu-ops.mk
3024f6ad66aSAchin Gupta
3034f6ad66aSAchin Gupta
30473c99d4eSJuan Castillo################################################################################
305cf2c8a33SAntonio Nino Diaz# Check incompatible options
306cf2c8a33SAntonio Nino Diaz################################################################################
307cf2c8a33SAntonio Nino Diaz
308cf2c8a33SAntonio Nino Diazifdef EL3_PAYLOAD_BASE
30968450a6dSAntonio Nino Diaz        ifdef PRELOADED_BL33_BASE
31068450a6dSAntonio Nino Diaz                $(warning "PRELOADED_BL33_BASE and EL3_PAYLOAD_BASE are \
31168450a6dSAntonio Nino Diaz                incompatible build options. EL3_PAYLOAD_BASE has priority.")
312cf2c8a33SAntonio Nino Diaz        endif
313cf2c8a33SAntonio Nino Diazendif
314cf2c8a33SAntonio Nino Diaz
315cf2c8a33SAntonio Nino Diazifeq (${NEED_BL33},yes)
316cf2c8a33SAntonio Nino Diaz        ifdef EL3_PAYLOAD_BASE
317cf2c8a33SAntonio Nino Diaz                $(warning "BL33 image is not needed when option \
318cf2c8a33SAntonio Nino Diaz                BL33_PAYLOAD_BASE is used and won't be added to the FIP file.")
319cf2c8a33SAntonio Nino Diaz        endif
32068450a6dSAntonio Nino Diaz        ifdef PRELOADED_BL33_BASE
32168450a6dSAntonio Nino Diaz                $(warning "BL33 image is not needed when option \
32268450a6dSAntonio Nino Diaz                PRELOADED_BL33_BASE is used and won't be added to the FIP \
32368450a6dSAntonio Nino Diaz                file.")
324cf2c8a33SAntonio Nino Diaz        endif
325cf2c8a33SAntonio Nino Diazendif
326cf2c8a33SAntonio Nino Diaz
327cf2c8a33SAntonio Nino Diaz
328cf2c8a33SAntonio Nino Diaz################################################################################
32973c99d4eSJuan Castillo# Process platform overrideable behaviour
33073c99d4eSJuan Castillo################################################################################
3314f6ad66aSAchin Gupta
33273c99d4eSJuan Castillo# Check if -pedantic option should be used
33373c99d4eSJuan Castilloifeq (${DISABLE_PEDANTIC},0)
334*403973c9SSandrine Bailleux        TF_CFLAGS	+= 	-pedantic
33573c99d4eSJuan Castilloendif
336f58ad36fSHarry Liebel
3371645d3eeSSandrine Bailleux# Using the ARM Trusted Firmware BL2 implies that a BL33 image also needs to be
33873c99d4eSJuan Castillo# supplied for the FIP and Certificate generation tools. This flag can be
33973c99d4eSJuan Castillo# overridden by the platform.
34073c99d4eSJuan Castilloifdef BL2_SOURCES
341cf2c8a33SAntonio Nino Diaz        ifdef EL3_PAYLOAD_BASE
342cf2c8a33SAntonio Nino Diaz                # If booting an EL3 payload there is no need for a BL33 image
343cf2c8a33SAntonio Nino Diaz                # in the FIP file.
3444c117f6cSSandrine Bailleux                NEED_BL33		:=	no
345cf2c8a33SAntonio Nino Diaz        else
34668450a6dSAntonio Nino Diaz                ifdef PRELOADED_BL33_BASE
347cf2c8a33SAntonio Nino Diaz                        # If booting a BL33 preloaded image there is no need of
348cf2c8a33SAntonio Nino Diaz                        # another one in the FIP file.
349cf2c8a33SAntonio Nino Diaz                        NEED_BL33		:=	no
350cf2c8a33SAntonio Nino Diaz                else
351cf2c8a33SAntonio Nino Diaz                        NEED_BL33		?=	yes
352cf2c8a33SAntonio Nino Diaz                endif
3534c117f6cSSandrine Bailleux        endif
35473c99d4eSJuan Castilloendif
3556f971622SJuan Castillo
35673c99d4eSJuan Castillo# Process TBB related flags
3576f971622SJuan Castilloifneq (${GENERATE_COT},0)
35873c99d4eSJuan Castillo        # Common cert_create options
3596f971622SJuan Castillo        ifneq (${CREATE_KEYS},0)
3606f971622SJuan Castillo                $(eval CRT_ARGS += -n)
3610191262dSYatharth Kochar                $(eval FWU_CRT_ARGS += -n)
362fd34e7baSJuan Castillo                ifneq (${SAVE_KEYS},0)
363fd34e7baSJuan Castillo                        $(eval CRT_ARGS += -k)
3640191262dSYatharth Kochar                        $(eval FWU_CRT_ARGS += -k)
365fd34e7baSJuan Castillo                endif
3666f971622SJuan Castillo        endif
36773c99d4eSJuan Castillo        # Include TBBR makefile (unless the platform indicates otherwise)
36873c99d4eSJuan Castillo        ifeq (${INCLUDE_TBBR_MK},1)
36973c99d4eSJuan Castillo                include make_helpers/tbbr/tbbr_tools.mk
37073c99d4eSJuan Castillo        endif
3716f971622SJuan Castilloendif
3726f971622SJuan Castillo
37373c99d4eSJuan Castillo
37473c99d4eSJuan Castillo################################################################################
37573c99d4eSJuan Castillo# Auxiliary tools (fip_create, cert_create, etc)
37673c99d4eSJuan Castillo################################################################################
37773c99d4eSJuan Castillo
37873c99d4eSJuan Castillo# Variables for use with Certificate Generation Tool
37973c99d4eSJuan CastilloCRTTOOLPATH		?=	tools/cert_create
38042a45b51SEvan LloydCRTTOOL			?=	${CRTTOOLPATH}/cert_create${BIN_EXT}
38173c99d4eSJuan Castillo
38273c99d4eSJuan Castillo# Variables for use with Firmware Image Package
38373c99d4eSJuan CastilloFIPTOOLPATH		?=	tools/fip_create
38442a45b51SEvan LloydFIPTOOL			?=	${FIPTOOLPATH}/fip_create${BIN_EXT}
38573c99d4eSJuan Castillo
38673c99d4eSJuan Castillo
38773c99d4eSJuan Castillo################################################################################
38873c99d4eSJuan Castillo# Build options checks
38973c99d4eSJuan Castillo################################################################################
39073c99d4eSJuan Castillo
39173c99d4eSJuan Castillo$(eval $(call assert_boolean,DEBUG))
39273c99d4eSJuan Castillo$(eval $(call assert_boolean,NS_TIMER_SWITCH))
39373c99d4eSJuan Castillo$(eval $(call assert_boolean,RESET_TO_BL31))
39473c99d4eSJuan Castillo$(eval $(call assert_boolean,CTX_INCLUDE_FPREGS))
39573c99d4eSJuan Castillo$(eval $(call assert_boolean,ASM_ASSERTION))
39673c99d4eSJuan Castillo$(eval $(call assert_boolean,USE_COHERENT_MEM))
39773c99d4eSJuan Castillo$(eval $(call assert_boolean,DISABLE_PEDANTIC))
39873c99d4eSJuan Castillo$(eval $(call assert_boolean,GENERATE_COT))
39973c99d4eSJuan Castillo$(eval $(call assert_boolean,CREATE_KEYS))
40073c99d4eSJuan Castillo$(eval $(call assert_boolean,SAVE_KEYS))
40173c99d4eSJuan Castillo$(eval $(call assert_boolean,TRUSTED_BOARD_BOOT))
40273c99d4eSJuan Castillo$(eval $(call assert_boolean,PROGRAMMABLE_RESET_ADDRESS))
403a9bec67dSSandrine Bailleux$(eval $(call assert_boolean,COLD_BOOT_SINGLE_CPU))
40473c99d4eSJuan Castillo$(eval $(call assert_boolean,PSCI_EXTENDED_STATE_ID))
4057a24cba5SSoby Mathew$(eval $(call assert_boolean,ERROR_DEPRECATED))
40693271a1eSAchin Gupta$(eval $(call assert_boolean,ENABLE_PLAT_COMPAT))
40735e8c766SSandrine Bailleux$(eval $(call assert_boolean,SPIN_ON_BL1_EXIT))
40812f654b6SJuan Castillo$(eval $(call assert_boolean,PL011_GENERIC_UART))
40973c99d4eSJuan Castillo
41073c99d4eSJuan Castillo
41173c99d4eSJuan Castillo################################################################################
41273c99d4eSJuan Castillo# Add definitions to the cpp preprocessor based on the current build options.
41373c99d4eSJuan Castillo# This is done after including the platform specific makefile to allow the
41473c99d4eSJuan Castillo# platform to overwrite the default options
41573c99d4eSJuan Castillo################################################################################
41673c99d4eSJuan Castillo
41773c99d4eSJuan Castillo$(eval $(call add_define,PLAT_${PLAT}))
41881d139d5SAntonio Nino Diaz$(eval $(call add_define,SPD_${SPD}))
41973c99d4eSJuan Castillo$(eval $(call add_define,NS_TIMER_SWITCH))
42073c99d4eSJuan Castillo$(eval $(call add_define,RESET_TO_BL31))
42173c99d4eSJuan Castillo$(eval $(call add_define,CTX_INCLUDE_FPREGS))
42273c99d4eSJuan Castillo$(eval $(call add_define,ARM_GIC_ARCH))
42373c99d4eSJuan Castillo$(eval $(call add_define,ARM_CCI_PRODUCT_ID))
42473c99d4eSJuan Castillo$(eval $(call add_define,ASM_ASSERTION))
42573c99d4eSJuan Castillo$(eval $(call add_define,LOG_LEVEL))
42673c99d4eSJuan Castillo$(eval $(call add_define,USE_COHERENT_MEM))
42773c99d4eSJuan Castillo$(eval $(call add_define,TRUSTED_BOARD_BOOT))
42873c99d4eSJuan Castillo$(eval $(call add_define,PROGRAMMABLE_RESET_ADDRESS))
429a9bec67dSSandrine Bailleux$(eval $(call add_define,COLD_BOOT_SINGLE_CPU))
43073c99d4eSJuan Castillo$(eval $(call add_define,PSCI_EXTENDED_STATE_ID))
4317a24cba5SSoby Mathew$(eval $(call add_define,ERROR_DEPRECATED))
43293271a1eSAchin Gupta$(eval $(call add_define,ENABLE_PLAT_COMPAT))
43335e8c766SSandrine Bailleux$(eval $(call add_define,SPIN_ON_BL1_EXIT))
434cf2c8a33SAntonio Nino Diaz$(eval $(call add_define,PL011_GENERIC_UART))
4354c117f6cSSandrine Bailleux# Define the EL3_PAYLOAD_BASE flag only if it is provided.
4364c117f6cSSandrine Bailleuxifdef EL3_PAYLOAD_BASE
4374c117f6cSSandrine Bailleux        $(eval $(call add_define,EL3_PAYLOAD_BASE))
438cf2c8a33SAntonio Nino Diazelse
43968450a6dSAntonio Nino Diaz        # Define the PRELOADED_BL33_BASE flag only if it is provided and
44068450a6dSAntonio Nino Diaz        # EL3_PAYLOAD_BASE is not defined, as it has priority.
44168450a6dSAntonio Nino Diaz        ifdef PRELOADED_BL33_BASE
44268450a6dSAntonio Nino Diaz                $(eval $(call add_define,PRELOADED_BL33_BASE))
4434c117f6cSSandrine Bailleux        endif
444cf2c8a33SAntonio Nino Diazendif
44573c99d4eSJuan Castillo
44673c99d4eSJuan Castillo
44773c99d4eSJuan Castillo################################################################################
44873c99d4eSJuan Castillo# Include BL specific makefiles
44973c99d4eSJuan Castillo################################################################################
45073c99d4eSJuan Castillo
45173c99d4eSJuan Castilloifdef BL1_SOURCES
45273c99d4eSJuan CastilloNEED_BL1 := yes
45373c99d4eSJuan Castilloinclude bl1/bl1.mk
45473c99d4eSJuan Castilloendif
45573c99d4eSJuan Castillo
45673c99d4eSJuan Castilloifdef BL2_SOURCES
45773c99d4eSJuan CastilloNEED_BL2 := yes
45873c99d4eSJuan Castilloinclude bl2/bl2.mk
45973c99d4eSJuan Castilloendif
46073c99d4eSJuan Castillo
4619003fa0bSYatharth Kocharifdef BL2U_SOURCES
4629003fa0bSYatharth KocharNEED_BL2U := yes
4639003fa0bSYatharth Kocharinclude bl2u/bl2u.mk
4649003fa0bSYatharth Kocharendif
4659003fa0bSYatharth Kochar
46673c99d4eSJuan Castilloifdef BL31_SOURCES
4674c117f6cSSandrine Bailleux# When booting an EL3 payload, there is no need to compile the BL31 image nor
4684c117f6cSSandrine Bailleux# put it in the FIP.
4694c117f6cSSandrine Bailleuxifndef EL3_PAYLOAD_BASE
47073c99d4eSJuan CastilloNEED_BL31 := yes
47173c99d4eSJuan Castilloinclude bl31/bl31.mk
47273c99d4eSJuan Castilloendif
4734c117f6cSSandrine Bailleuxendif
47473c99d4eSJuan Castillo
47573c99d4eSJuan Castillo
47673c99d4eSJuan Castillo################################################################################
47773c99d4eSJuan Castillo# Build targets
47873c99d4eSJuan Castillo################################################################################
47973c99d4eSJuan Castillo
4800191262dSYatharth Kochar.PHONY:	all msg_start clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip fwu_fip certtool
48173c99d4eSJuan Castillo.SUFFIXES:
48273c99d4eSJuan Castillo
48373c99d4eSJuan Castilloall: msg_start
48473c99d4eSJuan Castillo
48573c99d4eSJuan Castillomsg_start:
48673c99d4eSJuan Castillo	@echo "Building ${PLAT}"
48773c99d4eSJuan Castillo
4887a24cba5SSoby Mathew# Check if deprecated declarations should be treated as error or not.
4897a24cba5SSoby Mathewifeq (${ERROR_DEPRECATED},0)
490*403973c9SSandrine Bailleux    TF_CFLAGS		+= 	-Wno-error=deprecated-declarations
4917a24cba5SSoby Mathewendif
4927a24cba5SSoby Mathew
49373c99d4eSJuan Castillo# Expand build macros for the different images
49473c99d4eSJuan Castilloifeq (${NEED_BL1},yes)
49573c99d4eSJuan Castillo$(eval $(call MAKE_BL,1))
49673c99d4eSJuan Castilloendif
49773c99d4eSJuan Castillo
49873c99d4eSJuan Castilloifeq (${NEED_BL2},yes)
4998f0617efSJuan Castillo$(if ${BL2}, $(eval $(call MAKE_TOOL_ARGS,2,${BL2},tb-fw)),\
5008f0617efSJuan Castillo	$(eval $(call MAKE_BL,2,tb-fw)))
50173c99d4eSJuan Castilloendif
50273c99d4eSJuan Castillo
50373c99d4eSJuan Castilloifeq (${NEED_BL31},yes)
50473c99d4eSJuan CastilloBL31_SOURCES += ${SPD_SOURCES}
5058f0617efSJuan Castillo$(if ${BL31}, $(eval $(call MAKE_TOOL_ARGS,31,${BL31},soc-fw)),\
5068f0617efSJuan Castillo	$(eval $(call MAKE_BL,31,soc-fw)))
50773c99d4eSJuan Castilloendif
50873c99d4eSJuan Castillo
50970d1fc53SJuan Castillo# If a BL32 image is needed but neither BL32 nor BL32_SOURCES is defined, the
51070d1fc53SJuan Castillo# build system will call FIP_ADD_IMG to print a warning message and abort the
51170d1fc53SJuan Castillo# process. Note that the dependency on BL32 applies to the FIP only.
51273c99d4eSJuan Castilloifeq (${NEED_BL32},yes)
5138f0617efSJuan Castillo$(if ${BL32}, $(eval $(call MAKE_TOOL_ARGS,32,${BL32},tos-fw)),\
5148f0617efSJuan Castillo	$(if ${BL32_SOURCES}, $(eval $(call MAKE_BL,32,tos-fw)),\
5158f0617efSJuan Castillo		$(eval $(call FIP_ADD_IMG,BL32,--tos-fw))))
51673c99d4eSJuan Castilloendif
51773c99d4eSJuan Castillo
51873c99d4eSJuan Castillo# Add the BL33 image if required by the platform
51973c99d4eSJuan Castilloifeq (${NEED_BL33},yes)
5208f0617efSJuan Castillo$(eval $(call FIP_ADD_IMG,BL33,--nt-fw))
521db6071c9SJuan Castilloendif
522db6071c9SJuan Castillo
5239003fa0bSYatharth Kocharifeq (${NEED_BL2U},yes)
5249003fa0bSYatharth KocharBL2U_PATH	:= $(if ${BL2U},${BL2U},$(call IMG_BIN,2u))
5259003fa0bSYatharth Kochar$(if ${BL2U}, ,$(eval $(call MAKE_BL,2u)))
5268f0617efSJuan Castillo$(eval $(call FWU_FIP_ADD_PAYLOAD,${BL2U_PATH},--ap-fwu-cfg))
5279003fa0bSYatharth Kocharendif
5289003fa0bSYatharth Kochar
52936eaaf37SIan Spraylocate-checkpatch:
53036eaaf37SIan Sprayifndef CHECKPATCH
53136eaaf37SIan Spray	$(error "Please set CHECKPATCH to point to the Linux checkpatch.pl file, eg: CHECKPATCH=../linux/script/checkpatch.pl")
53236eaaf37SIan Sprayelse
53336eaaf37SIan Sprayifeq (,$(wildcard ${CHECKPATCH}))
53436eaaf37SIan Spray	$(error "The file CHECKPATCH points to cannot be found, use eg: CHECKPATCH=../linux/script/checkpatch.pl")
53536eaaf37SIan Sprayendif
53636eaaf37SIan Sprayendif
53736eaaf37SIan Spray
5384f6ad66aSAchin Guptaclean:
5394f6ad66aSAchin Gupta	@echo "  CLEAN"
540f1477d4aSEvan Lloyd	$(call SHELL_REMOVE_DIR,${BUILD_PLAT})
5412f2cef46SJeenu Viswambharan	${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
5426f971622SJuan Castillo	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
5434f6ad66aSAchin Gupta
544eaaeece2SJames Morrisseyrealclean distclean:
545eaaeece2SJames Morrissey	@echo "  REALCLEAN"
546f1477d4aSEvan Lloyd	$(call SHELL_REMOVE_DIR,${BUILD_BASE})
547f1477d4aSEvan Lloyd	$(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*)
5482f2cef46SJeenu Viswambharan	${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
5496f971622SJuan Castillo	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
5504f6ad66aSAchin Gupta
55136eaaf37SIan Spraycheckcodebase:		locate-checkpatch
55236eaaf37SIan Spray	@echo "  CHECKING STYLE"
55336eaaf37SIan Spray	@if test -d .git ; then	\
5544f2104ffSJuan Castillo		git ls-files | grep -v stdlib | while read GIT_FILE ; do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; done ;	\
55536eaaf37SIan Spray	 else			\
5564f2104ffSJuan Castillo		 find . -type f -not -iwholename "*.git*" -not -iwholename "*build*" -not -iwholename "*stdlib*" -exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ;	\
55736eaaf37SIan Spray	 fi
55836eaaf37SIan Spray
55936eaaf37SIan Spraycheckpatch:		locate-checkpatch
56036eaaf37SIan Spray	@echo "  CHECKING STYLE"
561662109a5SSandrine Bailleux	${Q}git log -p ${BASE_COMMIT}..HEAD -- ${CHECK_PATHS} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
56236eaaf37SIan Spray
56373c99d4eSJuan Castillocerttool: ${CRTTOOL}
56473c99d4eSJuan Castillo
5656f971622SJuan Castillo.PHONY: ${CRTTOOL}
5666f971622SJuan Castillo${CRTTOOL}:
5676f971622SJuan Castillo	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH}
568f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
5696f971622SJuan Castillo	@echo "Built $@ successfully"
570f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
5716f971622SJuan Castillo
5726f971622SJuan Castilloifneq (${GENERATE_COT},0)
57373c99d4eSJuan Castillocertificates: ${CRT_DEPS} ${CRTTOOL}
5746f971622SJuan Castillo	${Q}${CRTTOOL} ${CRT_ARGS}
575f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
5766f971622SJuan Castillo	@echo "Built $@ successfully"
5776f971622SJuan Castillo	@echo "Certificates can be found in ${BUILD_PLAT}"
578f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
57973c99d4eSJuan Castilloendif
58027713fb4SSoby Mathew
58173c99d4eSJuan Castillo${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL}
58273c99d4eSJuan Castillo	${Q}${FIPTOOL} --dump ${FIP_ARGS} $@
583f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
5842f2cef46SJeenu Viswambharan	@echo "Built $@ successfully"
585f1477d4aSEvan Lloyd	@${ECHO_BLANK_LINE}
586f58ad36fSHarry Liebel
5870191262dSYatharth Kocharifneq (${GENERATE_COT},0)
5880191262dSYatharth Kocharfwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL}
5890191262dSYatharth Kochar	${Q}${CRTTOOL} ${FWU_CRT_ARGS}
5900191262dSYatharth Kochar	@echo
5910191262dSYatharth Kochar	@echo "Built $@ successfully"
5920191262dSYatharth Kochar	@echo "FWU certificates can be found in ${BUILD_PLAT}"
5930191262dSYatharth Kochar	@echo
5940191262dSYatharth Kocharendif
5950191262dSYatharth Kochar
5960191262dSYatharth Kochar${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL}
5970191262dSYatharth Kochar	${Q}${FIPTOOL} --dump ${FWU_FIP_ARGS} $@
5980191262dSYatharth Kochar	@echo
5990191262dSYatharth Kochar	@echo "Built $@ successfully"
6000191262dSYatharth Kochar	@echo
6010191262dSYatharth Kochar
60273c99d4eSJuan Castillofiptool: ${FIPTOOL}
60373c99d4eSJuan Castillofip: ${BUILD_PLAT}/${FIP_NAME}
6040191262dSYatharth Kocharfwu_fip: ${BUILD_PLAT}/${FWU_FIP_NAME}
60573c99d4eSJuan Castillo
60673c99d4eSJuan Castillo.PHONY: ${FIPTOOL}
60773c99d4eSJuan Castillo${FIPTOOL}:
60873c99d4eSJuan Castillo	${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH}
609f58ad36fSHarry Liebel
61035fab8c9SJoakim Bechcscope:
61135fab8c9SJoakim Bech	@echo "  CSCOPE"
61235fab8c9SJoakim Bech	${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files
61335fab8c9SJoakim Bech	${Q}cscope -b -q -k
61435fab8c9SJoakim Bech
61572ee3314SRyan Harkinhelp:
616231c1470SEvan Lloyd	@echo "usage: ${MAKE} PLAT=<${PLATFORM_LIST}> [OPTIONS] [TARGET]"
61772ee3314SRyan Harkin	@echo ""
61872ee3314SRyan Harkin	@echo "PLAT is used to specify which platform you wish to build."
61908c7ed0fSSandrine Bailleux	@echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}"
62072ee3314SRyan Harkin	@echo ""
6211b578596SSandrine Bailleux	@echo "Please refer to the User Guide for a list of all supported options."
6221b578596SSandrine Bailleux	@echo "Note that the build system doesn't track dependencies for build "
6231b578596SSandrine Bailleux	@echo "options. Therefore, if any of the build options are changed "
6241b578596SSandrine Bailleux	@echo "from a previous build, a clean build must be performed."
6251b578596SSandrine Bailleux	@echo ""
62672ee3314SRyan Harkin	@echo "Supported Targets:"
6271b578596SSandrine Bailleux	@echo "  all            Build all individual bootloader binaries"
62836eaaf37SIan Spray	@echo "  bl1            Build the BL1 binary"
6298aa559c0SJeenu Viswambharan	@echo "  bl2            Build the BL2 binary"
6309003fa0bSYatharth Kochar	@echo "  bl2u           Build the BL2U binary"
631d178637dSJuan Castillo	@echo "  bl31           Build the BL31 binary"
632d178637dSJuan Castillo	@echo "  bl32           Build the BL32 binary"
63373c99d4eSJuan Castillo	@echo "  certificates   Build the certificates (requires 'GENERATE_COT=1')"
6341b578596SSandrine Bailleux	@echo "  fip            Build the Firmware Image Package (FIP)"
6350191262dSYatharth Kochar	@echo "  fwu_fip        Build the FWU Firmware Image Package (FIP)"
63636eaaf37SIan Spray	@echo "  checkcodebase  Check the coding style of the entire source tree"
63736eaaf37SIan Spray	@echo "  checkpatch     Check the coding style on changes in the current"
63836eaaf37SIan Spray	@echo "                 branch against BASE_COMMIT (default origin/master)"
63972ee3314SRyan Harkin	@echo "  clean          Clean the build for the selected platform"
64035fab8c9SJoakim Bech	@echo "  cscope         Generate cscope index"
64172ee3314SRyan Harkin	@echo "  distclean      Remove all build artifacts for all platforms"
6426f971622SJuan Castillo	@echo "  certtool       Build the Certificate generation tool"
643f58ad36fSHarry Liebel	@echo "  fiptool        Build the Firmware Image Package(FIP) creation tool"
64472ee3314SRyan Harkin	@echo ""
6451b578596SSandrine Bailleux	@echo "Note: most build targets require PLAT to be set to a specific platform."
64672ee3314SRyan Harkin	@echo ""
64772ee3314SRyan Harkin	@echo "example: build all targets for the FVP platform:"
64872ee3314SRyan Harkin	@echo "  CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"
649