Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. #
  2. # Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
  3. #
  4. # Redistribution and use in source and binary forms, with or without
  5. # modification, are permitted provided that the following conditions are met:
  6. #
  7. # Redistributions of source code must retain the above copyright notice, this
  8. # list of conditions and the following disclaimer.
  9. #
  10. # Redistributions in binary form must reproduce the above copyright notice,
  11. # this list of conditions and the following disclaimer in the documentation
  12. # and/or other materials provided with the distribution.
  13. #
  14. # Neither the name of ARM nor the names of its contributors may be used
  15. # to endorse or promote products derived from this software without specific
  16. # prior written permission.
  17. #
  18. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  22. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  23. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  24. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  26. # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  28. # POSSIBILITY OF SUCH DAMAGE.
  29. #
  30. #
  31. # Trusted Firmware Version
  32. #
  33. VERSION_MAJOR := 1
  34. VERSION_MINOR := 0
  35. #
  36. # Default values for build configurations
  37. #
  38. # Build verbosity
  39. V := 0
  40. # Debug build
  41. DEBUG := 0
  42. # Build architecture
  43. ARCH := aarch64
  44. # Build platform
  45. DEFAULT_PLAT := fvp
  46. PLAT := ${DEFAULT_PLAT}
  47. # SPD choice
  48. SPD := none
  49. # Base commit to perform code check on
  50. BASE_COMMIT := origin/master
  51. # NS timer register save and restore
  52. NS_TIMER_SWITCH := 0
  53. # By default, Bl1 acts as the reset handler, not BL31
  54. RESET_TO_BL31 := 0
  55. # Include FP registers in cpu context
  56. CTX_INCLUDE_FPREGS := 0
  57. # Determine the version of ARM GIC architecture to use for interrupt management
  58. # in EL3. The platform port can change this value if needed.
  59. ARM_GIC_ARCH := 2
  60. # Flag used to indicate if ASM_ASSERTION should be enabled for the build.
  61. # This defaults to being present in DEBUG builds only.
  62. ASM_ASSERTION := ${DEBUG}
  63. # Build option to choose whether Trusted firmware uses Coherent memory or not.
  64. USE_COHERENT_MEM := 1
  65. # Default FIP file name
  66. FIP_NAME := fip.bin
  67. # Checkpatch ignores
  68. CHECK_IGNORE = --ignore COMPLEX_MACRO
  69. CHECKPATCH_ARGS = --no-tree --no-signoff ${CHECK_IGNORE}
  70. CHECKCODE_ARGS = --no-patch --no-tree --no-signoff ${CHECK_IGNORE}
  71. ifeq (${V},0)
  72. Q=@
  73. CHECKCODE_ARGS += --no-summary --terse
  74. else
  75. Q=
  76. endif
  77. export Q
  78. ifneq (${DEBUG}, 0)
  79. BUILD_TYPE := debug
  80. # Use LOG_LEVEL_INFO by default for debug builds
  81. LOG_LEVEL := 40
  82. else
  83. BUILD_TYPE := release
  84. # Use LOG_LEVEL_NOTICE by default for release builds
  85. LOG_LEVEL := 20
  86. endif
  87. # Default build string (git branch and commit)
  88. ifeq (${BUILD_STRING},)
  89. BUILD_STRING := $(shell git log -n 1 --pretty=format:"%h")
  90. endif
  91. VERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
  92. BL_COMMON_SOURCES := common/bl_common.c \
  93. common/tf_printf.c \
  94. common/aarch64/debug.S \
  95. lib/aarch64/cache_helpers.S \
  96. lib/aarch64/misc_helpers.S \
  97. lib/aarch64/xlat_helpers.c \
  98. lib/stdlib/std.c \
  99. plat/common/aarch64/platform_helpers.S
  100. BUILD_BASE := ./build
  101. BUILD_PLAT := ${BUILD_BASE}/${PLAT}/${BUILD_TYPE}
  102. PLATFORMS := $(shell ls -I common plat/)
  103. SPDS := $(shell ls -I none services/spd)
  104. HELP_PLATFORMS := $(shell echo ${PLATFORMS} | sed 's/ /|/g')
  105. # Convenience function for adding build definitions
  106. # $(eval $(call add_define,FOO)) will have:
  107. # -DFOO if $(FOO) is empty; -DFOO=$(FOO) otherwise
  108. define add_define
  109. DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),)
  110. endef
  111. # Convenience function for verifying option has a boolean value
  112. # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1
  113. define assert_boolean
  114. $(and $(patsubst 0,,$(value $(1))),$(patsubst 1,,$(value $(1))),$(error $(1) must be boolean))
  115. endef
  116. ifeq (${PLAT},)
  117. $(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform.")
  118. endif
  119. ifeq ($(findstring ${PLAT},${PLATFORMS}),)
  120. $(error "Error: Invalid platform. The following platforms are available: ${PLATFORMS}")
  121. endif
  122. all: msg_start
  123. msg_start:
  124. @echo "Building ${PLAT}"
  125. include plat/${PLAT}/platform.mk
  126. # Include the CPU specific operations makefile. By default all CPU errata
  127. # workarounds and CPU specifc optimisations are disabled. This can be
  128. # overridden by the platform.
  129. include lib/cpus/cpu-ops.mk
  130. ifdef BL1_SOURCES
  131. NEED_BL1 := yes
  132. include bl1/bl1.mk
  133. endif
  134. ifdef BL2_SOURCES
  135. NEED_BL2 := yes
  136. include bl2/bl2.mk
  137. # Using the ARM Trusted Firmware BL2 implies that a BL3-3 image also need to be supplied for the FIP.
  138. # This flag can be overridden by the platform.
  139. NEED_BL33 ?= yes
  140. endif
  141. ifdef BL31_SOURCES
  142. NEED_BL31 := yes
  143. include bl31/bl31.mk
  144. endif
  145. # Include SPD Makefile if one has been specified
  146. ifneq (${SPD},none)
  147. # We expect to locate an spd.mk under the specified SPD directory
  148. SPD_MAKE := $(shell m="services/spd/${SPD}/${SPD}.mk"; [ -f "$$m" ] && echo "$$m")
  149. ifeq (${SPD_MAKE},)
  150. $(error Error: No services/spd/${SPD}/${SPD}.mk located)
  151. endif
  152. $(info Including ${SPD_MAKE})
  153. include ${SPD_MAKE}
  154. # If there's BL3-2 companion for the chosen SPD, and the SPD wants to build the
  155. # BL3-2 from source, we expect that the SPD's Makefile would set NEED_BL32
  156. # variable to "yes". In case the BL3-2 is a binary which needs to be included in
  157. # fip, then the NEED_BL32 needs to be set and BL3-2 would need to point to the bin.
  158. endif
  159. .PHONY: all msg_start clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip
  160. .SUFFIXES:
  161. INCLUDES += -Iinclude/bl31 \
  162. -Iinclude/bl31/services \
  163. -Iinclude/common \
  164. -Iinclude/drivers \
  165. -Iinclude/drivers/arm \
  166. -Iinclude/drivers/io \
  167. -Iinclude/lib \
  168. -Iinclude/lib/aarch64 \
  169. -Iinclude/lib/cpus/aarch64 \
  170. -Iinclude/plat/common \
  171. -Iinclude/stdlib \
  172. -Iinclude/stdlib/sys \
  173. ${PLAT_INCLUDES} \
  174. ${SPD_INCLUDES}
  175. # Process DEBUG flag
  176. $(eval $(call assert_boolean,DEBUG))
  177. $(eval $(call add_define,DEBUG))
  178. ifeq (${DEBUG},0)
  179. $(eval $(call add_define,NDEBUG))
  180. else
  181. CFLAGS += -g
  182. ASFLAGS += -g -Wa,--gdwarf-2
  183. endif
  184. # Process NS_TIMER_SWITCH flag
  185. $(eval $(call assert_boolean,NS_TIMER_SWITCH))
  186. $(eval $(call add_define,NS_TIMER_SWITCH))
  187. # Process RESET_TO_BL31 flag
  188. $(eval $(call assert_boolean,RESET_TO_BL31))
  189. $(eval $(call add_define,RESET_TO_BL31))
  190. # Process CTX_INCLUDE_FPREGS flag
  191. $(eval $(call assert_boolean,CTX_INCLUDE_FPREGS))
  192. $(eval $(call add_define,CTX_INCLUDE_FPREGS))
  193. # Process ARM_GIC_ARCH flag
  194. $(eval $(call add_define,ARM_GIC_ARCH))
  195. # Process ASM_ASSERTION flag
  196. $(eval $(call assert_boolean,ASM_ASSERTION))
  197. $(eval $(call add_define,ASM_ASSERTION))
  198. # Process LOG_LEVEL flag
  199. $(eval $(call add_define,LOG_LEVEL))
  200. # Process USE_COHERENT_MEM flag
  201. $(eval $(call assert_boolean,USE_COHERENT_MEM))
  202. $(eval $(call add_define,USE_COHERENT_MEM))
  203. ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \
  204. -Werror -Wmissing-include-dirs \
  205. -mgeneral-regs-only -D__ASSEMBLY__ \
  206. ${DEFINES} ${INCLUDES}
  207. CFLAGS += -nostdinc -pedantic -ffreestanding -Wall \
  208. -Werror -Wmissing-include-dirs \
  209. -mgeneral-regs-only -std=c99 -c -Os \
  210. ${DEFINES} ${INCLUDES}
  211. CFLAGS += -ffunction-sections -fdata-sections
  212. LDFLAGS += --fatal-warnings -O1
  213. LDFLAGS += --gc-sections
  214. CC := ${CROSS_COMPILE}gcc
  215. CPP := ${CROSS_COMPILE}cpp
  216. AS := ${CROSS_COMPILE}gcc
  217. AR := ${CROSS_COMPILE}ar
  218. LD := ${CROSS_COMPILE}ld
  219. OC := ${CROSS_COMPILE}objcopy
  220. OD := ${CROSS_COMPILE}objdump
  221. NM := ${CROSS_COMPILE}nm
  222. PP := ${CROSS_COMPILE}gcc -E ${CFLAGS}
  223. # Variables for use with Firmware Image Package
  224. FIPTOOLPATH ?= tools/fip_create
  225. FIPTOOL ?= ${FIPTOOLPATH}/fip_create
  226. fiptool: ${FIPTOOL}
  227. fip: ${BUILD_PLAT}/${FIP_NAME}
  228. locate-checkpatch:
  229. ifndef CHECKPATCH
  230. $(error "Please set CHECKPATCH to point to the Linux checkpatch.pl file, eg: CHECKPATCH=../linux/script/checkpatch.pl")
  231. else
  232. ifeq (,$(wildcard ${CHECKPATCH}))
  233. $(error "The file CHECKPATCH points to cannot be found, use eg: CHECKPATCH=../linux/script/checkpatch.pl")
  234. endif
  235. endif
  236. clean:
  237. @echo " CLEAN"
  238. ${Q}rm -rf ${BUILD_PLAT}
  239. ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
  240. realclean distclean:
  241. @echo " REALCLEAN"
  242. ${Q}rm -rf ${BUILD_BASE}
  243. ${Q}rm -f ${CURDIR}/cscope.*
  244. ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
  245. checkcodebase: locate-checkpatch
  246. @echo " CHECKING STYLE"
  247. @if test -d .git ; then \
  248. git ls-files | grep -v stdlib | while read GIT_FILE ; do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; done ; \
  249. else \
  250. find . -type f -not -iwholename "*.git*" -not -iwholename "*build*" -not -iwholename "*stdlib*" -exec ${CHECKPATCH} ${CHECKCODE_ARGS} -f {} \; ; \
  251. fi
  252. checkpatch: locate-checkpatch
  253. @echo " CHECKING STYLE"
  254. @git format-patch --stdout ${BASE_COMMIT} | ${CHECKPATCH} ${CHECKPATCH_ARGS} - || true
  255. .PHONY: ${FIPTOOL}
  256. ${FIPTOOL}:
  257. ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH}
  258. define match_goals
  259. $(strip $(foreach goal,$(1),$(filter $(goal),$(MAKECMDGOALS))))
  260. endef
  261. # List of rules that involve building things
  262. BUILD_TARGETS := all bl1 bl2 bl31 bl32 fip
  263. # Does the list of goals specified on the command line include a build target?
  264. ifneq ($(call match_goals,${BUILD_TARGETS}),)
  265. IS_ANYTHING_TO_BUILD := 1
  266. endif
  267. define MAKE_C
  268. $(eval OBJ := $(1)/$(patsubst %.c,%.o,$(notdir $(2))))
  269. $(eval PREREQUISITES := $(patsubst %.o,%.d,$(OBJ)))
  270. $(OBJ) : $(2)
  271. @echo " CC $$<"
  272. $$(Q)$$(CC) $$(CFLAGS) -DIMAGE_BL$(3) -c $$< -o $$@
  273. $(PREREQUISITES) : $(2)
  274. @echo " DEPS $$@"
  275. @mkdir -p $(1)
  276. $$(Q)$$(CC) $$(CFLAGS) -M -MT $(OBJ) -MF $$@ $$<
  277. ifdef IS_ANYTHING_TO_BUILD
  278. -include $(PREREQUISITES)
  279. endif
  280. endef
  281. define MAKE_S
  282. $(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2))))
  283. $(eval PREREQUISITES := $(patsubst %.o,%.d,$(OBJ)))
  284. $(OBJ) : $(2)
  285. @echo " AS $$<"
  286. $$(Q)$$(AS) $$(ASFLAGS) -DIMAGE_BL$(3) -c $$< -o $$@
  287. $(PREREQUISITES) : $(2)
  288. @echo " DEPS $$@"
  289. @mkdir -p $(1)
  290. $$(Q)$$(AS) $$(ASFLAGS) -M -MT $(OBJ) -MF $$@ $$<
  291. ifdef IS_ANYTHING_TO_BUILD
  292. -include $(PREREQUISITES)
  293. endif
  294. endef
  295. define MAKE_LD
  296. $(eval PREREQUISITES := $(1).d)
  297. $(1) : $(2)
  298. @echo " PP $$<"
  299. $$(Q)$$(AS) $$(ASFLAGS) -P -E -o $$@ $$<
  300. $(PREREQUISITES) : $(2)
  301. @echo " DEPS $$@"
  302. @mkdir -p $$(dir $$@)
  303. $$(Q)$$(AS) $$(ASFLAGS) -M -MT $(1) -MF $$@ $$<
  304. ifdef IS_ANYTHING_TO_BUILD
  305. -include $(PREREQUISITES)
  306. endif
  307. endef
  308. define MAKE_OBJS
  309. $(eval C_OBJS := $(filter %.c,$(2)))
  310. $(eval REMAIN := $(filter-out %.c,$(2)))
  311. $(eval $(foreach obj,$(C_OBJS),$(call MAKE_C,$(1),$(obj),$(3))))
  312. $(eval S_OBJS := $(filter %.S,$(REMAIN)))
  313. $(eval REMAIN := $(filter-out %.S,$(REMAIN)))
  314. $(eval $(foreach obj,$(S_OBJS),$(call MAKE_S,$(1),$(obj),$(3))))
  315. $(and $(REMAIN),$(error Unexpected source files present: $(REMAIN)))
  316. endef
  317. # NOTE: The line continuation '\' is required in the next define otherwise we
  318. # end up with a line-feed characer at the end of the last c filename.
  319. # Also bare this issue in mind if extending the list of supported filetypes.
  320. define SOURCES_TO_OBJS
  321. $(notdir $(patsubst %.c,%.o,$(filter %.c,$(1)))) \
  322. $(notdir $(patsubst %.S,%.o,$(filter %.S,$(1))))
  323. endef
  324. define MAKE_BL
  325. $(eval BUILD_DIR := ${BUILD_PLAT}/bl$(1))
  326. $(eval SOURCES := $(BL$(1)_SOURCES) $(BL_COMMON_SOURCES) $(PLAT_BL_COMMON_SOURCES))
  327. $(eval OBJS := $(addprefix $(BUILD_DIR)/,$(call SOURCES_TO_OBJS,$(SOURCES))))
  328. $(eval LINKERFILE := $(BUILD_DIR)/bl$(1).ld)
  329. $(eval MAPFILE := $(BUILD_DIR)/bl$(1).map)
  330. $(eval ELF := $(BUILD_DIR)/bl$(1).elf)
  331. $(eval DUMP := $(BUILD_DIR)/bl$(1).dump)
  332. $(eval BIN := $(BUILD_PLAT)/bl$(1).bin)
  333. $(eval $(call MAKE_OBJS,$(BUILD_DIR),$(SOURCES),$(1)))
  334. $(eval $(call MAKE_LD,$(LINKERFILE),$(BL$(1)_LINKERFILE)))
  335. $(BUILD_DIR) :
  336. $$(Q)mkdir -p "$$@"
  337. $(ELF) : $(OBJS) $(LINKERFILE)
  338. @echo " LD $$@"
  339. @echo 'const char build_message[] = "Built : "__TIME__", "__DATE__; \
  340. const char version_string[] = "${VERSION_STRING}";' | \
  341. $$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
  342. $$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
  343. $(BUILD_DIR)/build_message.o $(OBJS)
  344. $(DUMP) : $(ELF)
  345. @echo " OD $$@"
  346. $${Q}$${OD} -dx $$< > $$@
  347. $(BIN) : $(ELF)
  348. @echo " BIN $$@"
  349. $$(Q)$$(OC) -O binary $$< $$@
  350. @echo
  351. @echo "Built $$@ successfully"
  352. @echo
  353. .PHONY : bl$(1)
  354. bl$(1) : $(BUILD_DIR) $(BIN) $(DUMP)
  355. all : bl$(1)
  356. $(eval FIP_DEPS += $(if $2,$(BIN),))
  357. $(eval FIP_ARGS += $(if $2,--bl$(1) $(BIN),))
  358. endef
  359. ifeq (${NEED_BL1},yes)
  360. $(eval $(call MAKE_BL,1))
  361. endif
  362. ifeq (${NEED_BL2},yes)
  363. $(if ${BL2}, $(eval FIP_DEPS += ${BL2}) $(eval FIP_ARGS += --bl2 ${BL2}),\
  364. $(eval $(call MAKE_BL,2,in_fip)))
  365. endif
  366. ifeq (${NEED_BL31},yes)
  367. BL31_SOURCES += ${SPD_SOURCES}
  368. $(if ${BL31}, $(eval FIP_DEPS += ${BL31}) $(eval FIP_ARGS += --bl31 ${BL31}),\
  369. $(eval $(call MAKE_BL,31,in_fip)))
  370. endif
  371. ifeq (${NEED_BL32},yes)
  372. $(if ${BL32}, $(eval FIP_DEPS += ${BL32}) $(eval FIP_ARGS += --bl32 ${BL32}),\
  373. $(eval $(call MAKE_BL,32,in_fip)))
  374. endif
  375. ifeq (${NEED_BL30},yes)
  376. $(if ${BL30}, $(eval FIP_DEPS += ${BL30}) $(eval FIP_ARGS += --bl30 ${BL30}), )
  377. # If BL3-0 is needed by the platform then 'BL30' variable must be defined.
  378. check_bl30:
  379. $(if ${BL30},,$(error "To build a FIP for platform ${PLAT}, please set BL30 to point to the SCP firmware"))
  380. else
  381. # If BL3-0 is not needed by the platform but the user still specified the path
  382. # to a BL3-0 image then warn him that it will be ignored.
  383. check_bl30:
  384. $(if ${BL30},$(warning "BL3-0 is not supported on platform ${PLAT}, it will just be ignored"),)
  385. endif
  386. ifeq (${NEED_BL33},yes)
  387. $(if ${BL33}, $(eval FIP_DEPS += ${BL33}) $(eval FIP_ARGS += --bl33 ${BL33}), )
  388. # If BL3-3 is needed by the platform then 'BL33' variable must be defined.
  389. check_bl33:
  390. $(if ${BL33},,$(error "To build a FIP, please set BL33 to point to the Normal World binary, eg: BL33=../uefi/FVP_AARCH64_EFI.fd"))
  391. else
  392. # If BL3-3 is not needed by the platform but the user still specified the path
  393. # to a BL3-3 image then warn him that it will be ignored.
  394. check_bl33:
  395. $(if ${BL33},$(warning "BL3-3 is not supported on platform ${PLAT}, it will just be ignored"),)
  396. endif
  397. ${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL} check_bl30 check_bl33
  398. ${Q}${FIPTOOL} --dump \
  399. ${FIP_ARGS} \
  400. $@
  401. @echo
  402. @echo "Built $@ successfully"
  403. @echo
  404. cscope:
  405. @echo " CSCOPE"
  406. ${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files
  407. ${Q}cscope -b -q -k
  408. help:
  409. @echo "usage: ${MAKE} PLAT=<${HELP_PLATFORMS}> <all|bl1|bl2|bl31|distclean|clean|checkcodebase|checkpatch>"
  410. @echo ""
  411. @echo "PLAT is used to specify which platform you wish to build."
  412. @echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}"
  413. @echo ""
  414. @echo "Supported Targets:"
  415. @echo " all Build the BL1, BL2 and BL31 binaries"
  416. @echo " bl1 Build the BL1 binary"
  417. @echo " bl2 Build the BL2 binary"
  418. @echo " bl31 Build the BL31 binary"
  419. @echo " checkcodebase Check the coding style of the entire source tree"
  420. @echo " checkpatch Check the coding style on changes in the current"
  421. @echo " branch against BASE_COMMIT (default origin/master)"
  422. @echo " clean Clean the build for the selected platform"
  423. @echo " cscope Generate cscope index"
  424. @echo " distclean Remove all build artifacts for all platforms"
  425. @echo " fiptool Build the Firmware Image Package(FIP) creation tool"
  426. @echo ""
  427. @echo "note: most build targets require PLAT to be set to a specific platform."
  428. @echo ""
  429. @echo "example: build all targets for the FVP platform:"
  430. @echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"