diff options
author | Jon Medhurst <tixy@linaro.org> | 2014-02-13 15:19:28 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2014-02-27 15:51:23 +0000 |
commit | 05694cba3df770428a31d8d089d00935903d5933 (patch) | |
tree | d5b2ea732bef47e8f35c8ae7b140e662bb5bd839 | |
parent | a9380b72eae98bdda98dc0ce793dd1e7050195f4 (diff) | |
download | arm-trusted-firmware-tixy-issue-30.tar.gz |
Enable platforms to omit some bootloaderstixy-issue-30
If a platform doesn't specify a BLx_SOURCE variable, then building
of the corresponding bootloader isn't attempted. Also allowe BL33 to
be omitted from the FIP.
Note, this change also removes support for PLAT=all and the 'fip' target
from the 'all' recipe.
Fixes ARM-software/tf-issues#30
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | Makefile | 65 |
1 files changed, 32 insertions, 33 deletions
@@ -71,7 +71,7 @@ BL_COMMON_SOURCES := misc_helpers.S \ ARCH ?= aarch64 # By default, build all platforms available -PLAT ?= all +PLAT ?= fvp # By default, build no SPD component SPD ?= none @@ -85,31 +85,30 @@ HELP_PLATFORMS := $(shell echo ${PLATFORMS} | sed 's/ /|/g') ifeq (${PLAT},) $(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform.") endif -ifeq ($(findstring ${PLAT},${PLATFORMS} all),) +ifeq ($(findstring ${PLAT},${PLATFORMS}),) $(error "Error: Invalid platform. The following platforms are available: ${PLATFORMS}") endif -ifeq (${PLAT},all) -all: ${PLATFORMS} -else -all: msg_start fip -endif +all: msg_start msg_start: @echo "Building ${PLAT}" -${PLATFORMS}: - ${MAKE} PLAT=$@ all - -ifneq (${PLAT},all) - $(info Including ${PLAT}/platform.mk) - include plat/${PLAT}/platform.mk - $(info Including bl1.mk) - include bl1/bl1.mk - $(info Including bl2.mk) - include bl2/bl2.mk - $(info Including bl31.mk) - include bl31/bl31.mk +include plat/${PLAT}/platform.mk + +ifdef BL1_SOURCES +NEED_BL1 := yes +include bl1/bl1.mk +endif + +ifdef BL2_SOURCES +NEED_BL2 := yes +include bl2/bl2.mk +endif + +ifdef BL31_SOURCES +NEED_BL31 := yes +include bl31/bl31.mk endif # Include SPD Makefile if one has been specified @@ -128,7 +127,7 @@ ifneq (${SPD},none) # variable to "yes" endif -.PHONY: all msg_start ${PLATFORMS} clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip locate-bl33 +.PHONY: all msg_start ${PLATFORMS} clean realclean distclean cscope locate-checkpatch checkcodebase checkpatch fiptool fip .SUFFIXES: @@ -158,6 +157,7 @@ vpath %.ld.S bl1:bl2:bl31 vpath %.c bl1:bl2:bl31 vpath %.c bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH} vpath %.S bl1/${ARCH}:bl2/${ARCH}:bl31/${ARCH} +vpath %.c lib/arch/${ARCH} # One of the missing paths needed for BL_COMMON_SOURCES ifneq (${DEBUG}, 0) @@ -203,17 +203,6 @@ ifeq (,$(wildcard ${CHECKPATCH})) endif endif -locate-bl33: -ifndef BL33 - $(error "Please set BL33 to point to the Normal World binary, eg: BL33=../uefi/FVP_AARCH64_EFI.fd") -else -ifeq (,$(wildcard ${BL33})) - $(error "The file BL33 points to cannot be found (${BL33})") -endif -FIP_DEPS += ${BL33} -endif - - clean: @echo " CLEAN" ${Q}rm -rf ${BUILD_PLAT} @@ -378,21 +367,31 @@ $(eval FIP_ARGS += $(if $2,--bl$(1) $(BIN),)) endef +ifeq (${NEED_BL1},yes) $(eval $(call MAKE_BL,1)) +endif +ifeq (${NEED_BL2},yes) $(eval $(call MAKE_BL,2,in_fip)) +endif +ifeq (${NEED_BL31},yes) BL31_SOURCES += ${SPD_SOURCES} $(eval $(call MAKE_BL,31,in_fip)) +endif ifeq (${NEED_BL32},yes) $(eval $(call MAKE_BL,32,in_fip)) endif -${BUILD_PLAT}/fip.bin: locate-bl33 ${FIP_DEPS} ${FIPTOOL} +ifneq (${BL33},) +FIP_DEPS += ${BL33} +FIP_ARGS += --bl33 ${BL33} +endif + +${BUILD_PLAT}/fip.bin: ${FIP_DEPS} ${FIPTOOL} ${Q}${FIPTOOL} --dump \ ${FIP_ARGS} \ - --bl33 ${BL33} \ $@ @echo @echo "Built $@ successfully" |