aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--make_helpers/build_macros.mk14
-rw-r--r--plat/arm/common/arm_common.mk6
-rw-r--r--plat/arm/css/common/css_common.mk2
-rw-r--r--plat/hisilicon/hikey/platform.mk4
-rw-r--r--plat/hisilicon/hikey960/platform.mk4
-rw-r--r--plat/qemu/platform.mk4
7 files changed, 25 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index a9618f5e..e32ba193 100644
--- a/Makefile
+++ b/Makefile
@@ -598,17 +598,17 @@ ifeq (${BL2_AT_EL3}, 0)
FIP_BL2_ARGS := tb-fw
endif
-$(if ${BL2}, $(eval $(call TOOL_ADD_IMG,BL2,--${FIP_BL2_ARGS})),\
+$(if ${BL2}, $(eval $(call TOOL_ADD_IMG,bl2,--${FIP_BL2_ARGS})),\
$(eval $(call MAKE_BL,2,${FIP_BL2_ARGS})))
endif
ifeq (${NEED_SCP_BL2},yes)
-$(eval $(call TOOL_ADD_IMG,SCP_BL2,--scp-fw))
+$(eval $(call TOOL_ADD_IMG,scp_bl2,--scp-fw))
endif
ifeq (${NEED_BL31},yes)
BL31_SOURCES += ${SPD_SOURCES}
-$(if ${BL31}, $(eval $(call TOOL_ADD_IMG,BL31,--soc-fw)),\
+$(if ${BL31}, $(eval $(call TOOL_ADD_IMG,bl31,--soc-fw)),\
$(eval $(call MAKE_BL,31,soc-fw)))
endif
@@ -620,16 +620,16 @@ ifeq (${NEED_BL32},yes)
BUILD_BL32 := $(if $(BL32),,$(if $(BL32_SOURCES),1))
$(if ${BUILD_BL32}, $(eval $(call MAKE_BL,32,tos-fw)),\
- $(eval $(call TOOL_ADD_IMG,BL32,--tos-fw)))
+ $(eval $(call TOOL_ADD_IMG,bl32,--tos-fw)))
endif
# Add the BL33 image if required by the platform
ifeq (${NEED_BL33},yes)
-$(eval $(call TOOL_ADD_IMG,BL33,--nt-fw))
+$(eval $(call TOOL_ADD_IMG,bl33,--nt-fw))
endif
ifeq (${NEED_BL2U},yes)
-$(if ${BL2U}, $(eval $(call TOOL_ADD_IMG,BL2U,--ap-fwu-cfg,FWU_)),\
+$(if ${BL2U}, $(eval $(call TOOL_ADD_IMG,bl2u,--ap-fwu-cfg,FWU_)),\
$(eval $(call MAKE_BL,2u,ap-fwu-cfg,FWU_)))
endif
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 8fb46b46..ef24f1d9 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -123,20 +123,24 @@ endef
# TOOL_ADD_IMG allows the platform to specify an external image to be packed
# in the FIP and/or for which certificate is generated. It also adds a
# dependency on the image file, aborting the build if the file does not exist.
-# $(1) = build option to specify the image filename (SCP_BL2, BL33, etc)
+# $(1) = image_type (scp_bl2, bl33, etc.)
# $(2) = command line option for fiptool (--scp-fw, --nt-fw, etc)
# $(3) = FIP prefix (optional) (if FWU_, target is fwu_fip instead of fip)
# Example:
-# $(eval $(call TOOL_ADD_IMG,BL33,--nt-fw))
+# $(eval $(call TOOL_ADD_IMG,bl33,--nt-fw))
define TOOL_ADD_IMG
+ # Build option to specify the image filename (SCP_BL2, BL33, etc)
+ # This is the uppercase form of the first parameter
+ $(eval _V := $(call uppercase,$(1)))
+
$(3)CRT_DEPS += check_$(1)
$(3)FIP_DEPS += check_$(1)
- $(call TOOL_ADD_PAYLOAD,$(value $(1)),$(2),,$(3))
+ $(call TOOL_ADD_PAYLOAD,$(value $(_V)),$(2),,$(3))
.PHONY: check_$(1)
check_$(1):
- $$(if $(value $(1)),,$$(error "Platform '${PLAT}' requires $(1). Please set $(1) to point to the right file"))
- $$(if $(wildcard $(value $(1))),,$$(error '$(1)=$(value $(1))' was specified, but '$(value $(1))' does not exist))
+ $$(if $(value $(_V)),,$$(error "Platform '${PLAT}' requires $(_V). Please set $(_V) to point to the right file"))
+ $$(if $(wildcard $(value $(_V))),,$$(error '$(_V)=$(value $(_V))' was specified, but '$(value $(_V))' does not exist))
endef
################################################################################
diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk
index 33fa5743..48e70717 100644
--- a/plat/arm/common/arm_common.mk
+++ b/plat/arm/common/arm_common.mk
@@ -87,10 +87,10 @@ $(eval $(call add_define,MBEDTLS_SHA256_SMALLER))
# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
# in the FIP if the platform requires.
ifneq ($(BL32_EXTRA1),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
+$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1))
endif
ifneq ($(BL32_EXTRA2),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
+$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2))
endif
# Enable PSCI_STAT_COUNT/RESIDENCY APIs on ARM platforms
@@ -211,7 +211,7 @@ ifneq (${TRUSTED_BOARD_BOOT},0)
BL2_SOURCES += ${AUTH_SOURCES} \
plat/common/tbbr/plat_tbbr.c
- $(eval $(call TOOL_ADD_IMG,NS_BL2U,--fwu,FWU_))
+ $(eval $(call TOOL_ADD_IMG,ns_bl2u,--fwu,FWU_))
# We expect to locate the *.mk files under the directories specified below
ifeq (${ARM_CRYPTOCELL_INTEG},0)
diff --git a/plat/arm/css/common/css_common.mk b/plat/arm/css/common/css_common.mk
index 4f311c34..cfbb3e92 100644
--- a/plat/arm/css/common/css_common.mk
+++ b/plat/arm/css/common/css_common.mk
@@ -49,7 +49,7 @@ $(eval $(call add_define,CSS_LOAD_SCP_IMAGES))
ifeq (${CSS_LOAD_SCP_IMAGES},1)
NEED_SCP_BL2 := yes
ifneq (${TRUSTED_BOARD_BOOT},0)
- $(eval $(call TOOL_ADD_IMG,SCP_BL2U,--scp-fwu-cfg,FWU_))
+ $(eval $(call TOOL_ADD_IMG,scp_bl2u,--scp-fwu-cfg,FWU_))
endif
ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
diff --git a/plat/hisilicon/hikey/platform.mk b/plat/hisilicon/hikey/platform.mk
index 802c79c5..4db21e6d 100644
--- a/plat/hisilicon/hikey/platform.mk
+++ b/plat/hisilicon/hikey/platform.mk
@@ -36,10 +36,10 @@ $(eval $(call add_define,PLAT_PARTITION_MAX_ENTRIES))
# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
# in the FIP if the platform requires.
ifneq ($(BL32_EXTRA1),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
+$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1))
endif
ifneq ($(BL32_EXTRA2),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
+$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2))
endif
ENABLE_PLAT_COMPAT := 0
diff --git a/plat/hisilicon/hikey960/platform.mk b/plat/hisilicon/hikey960/platform.mk
index 8d1876f8..cd063058 100644
--- a/plat/hisilicon/hikey960/platform.mk
+++ b/plat/hisilicon/hikey960/platform.mk
@@ -29,10 +29,10 @@ $(eval $(call add_define,CRASH_CONSOLE_BASE))
# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
# in the FIP if the platform requires.
ifneq ($(BL32_EXTRA1),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
+$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1))
endif
ifneq ($(BL32_EXTRA2),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
+$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2))
endif
ENABLE_PLAT_COMPAT := 0
diff --git a/plat/qemu/platform.mk b/plat/qemu/platform.mk
index a3ba8787..3d15a746 100644
--- a/plat/qemu/platform.mk
+++ b/plat/qemu/platform.mk
@@ -133,10 +133,10 @@ BL31_SOURCES += lib/cpus/aarch64/aem_generic.S \
# Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
# in the FIP if the platform requires.
ifneq ($(BL32_EXTRA1),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA1,--tos-fw-extra1))
+$(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1))
endif
ifneq ($(BL32_EXTRA2),)
-$(eval $(call TOOL_ADD_IMG,BL32_EXTRA2,--tos-fw-extra2))
+$(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2))
endif
# Disable the PSCI platform compatibility layer