diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-26 11:42:01 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-02-01 20:39:38 +0900 |
commit | 33950dd8fec0056b251bdc5d9d8651dc7d121924 (patch) | |
tree | aab8b25f7b61992dc23f3421a1a24b9526f628f1 /make_helpers/build_macros.mk | |
parent | 36af3455e2213b0ad923bdd8bd1d88304f7265c9 (diff) |
Build: change the first parameter of TOOL_ADD_IMG to lowercase
In the next commit, I need the image name in lowercase because
output files are generally named in lowercase.
Unfortunately, TOOL_ADD_IMG takes the first argument in uppercase
since we generally use uppercase Make variables.
make_helpers/build_macros.mk provides 'uppercase' macro to convert
a string into uppercase, but 'lowercase' does not exist. We can
implement it if we like, but it would be more straightforward to
change the argument of TOOL_ADD_IMG.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'make_helpers/build_macros.mk')
-rw-r--r-- | make_helpers/build_macros.mk | 14 |
1 files changed, 9 insertions, 5 deletions
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 ################################################################################ |