summaryrefslogtreecommitdiff
path: root/make_helpers
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-11-12 10:59:26 +0000
committerJuan Castillo <juan.castillo@arm.com>2015-11-17 09:25:17 +0000
commit70d1fc5383b920652e1fe6d426183b7f874b3928 (patch)
treeaedb416e6407fb5572ac90614a7d0bb825500189 /make_helpers
parent4266228306de468dff34609581474f2f43d781fa (diff)
Fix build error when `BL32` is not defined
If an SPD wants to use a prebuilt binary as BL32 image (for example, the OPTEE Dispatcher), it must point the `BL32` variable to the image file. This dependency should apply only to the `fip` target. However, it also applies to the `all` target at the moment. If the user tries to build all individual TF images using `make all` without setting BL32, the build fails. The following command will throw the error: make CROSS_COMPILE=aarch64-linux-gnu- SPD=opteed all ... ... aarch64-linux-gnu-gcc: fatal error: no input files compilation terminated. make: *** [build/fvp/release/bl32/bl32.ld] Error 1 The reason is that the build system checks if BL32 is defined, and if it is not, it will try to build BL32 from source. If the SPD makefile does not provide support for that (as is the case of the OPTEE Dispatcher, since OPTEE is provided as an external binary), the build will fail. This patch fixes the issue by checking if `BL32_SOURCES` has been defined by the SPD before attempting to build BL32 from source. If neither `BL32` nor `BL32_SOURCES` is defined when building the FIP, a warning message will be printed and the process aborted. Fixes ARM-software/tf-issues#333 Change-Id: I5e801ad333103ed9b042e5c4757424c8df2ff6e4
Diffstat (limited to 'make_helpers')
-rw-r--r--make_helpers/tbbr/tbbr_tools.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/make_helpers/tbbr/tbbr_tools.mk b/make_helpers/tbbr/tbbr_tools.mk
index 58c84d20..2ec72b90 100644
--- a/make_helpers/tbbr/tbbr_tools.mk
+++ b/make_helpers/tbbr/tbbr_tools.mk
@@ -97,7 +97,7 @@ $(eval $(call FIP_ADD_PAYLOAD,${BUILD_PLAT}/bl31_key.crt,--bl31-key-cert))
# Add the BL32 CoT (key cert + img cert + image)
ifeq (${NEED_BL32},yes)
$(if ${BL32},$(eval $(call CERT_ADD_CMD_OPT,${BL32},--bl32,true)),\
- $(eval $(call CERT_ADD_CMD_OPT,$(call IMG_BIN,32),--bl32,true)))
+ $(if ${BL32_SOURCES},$(eval $(call CERT_ADD_CMD_OPT,$(call IMG_BIN,32),--bl32,true))))
$(if ${BL32_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL32_KEY},--bl32-key)))
$(eval $(call CERT_ADD_CMD_OPT,${BUILD_PLAT}/bl32.crt,--bl32-cert))
$(eval $(call CERT_ADD_CMD_OPT,${BUILD_PLAT}/bl32_key.crt,--bl32-key-cert))