From 8f0617ef9e469e47f6df077f2bb02e594594d3a7 Mon Sep 17 00:00:00 2001 From: Juan Castillo Date: Tue, 5 Jan 2016 11:55:36 +0000 Subject: [PATCH] Apply TBBR naming convention to the fip_create options The fip_create tool specifies images in the command line using the ARM TF naming convention (--bl2, --bl31, etc), while the cert_create tool uses the TBBR convention (--tb-fw, --soc-fw, etc). This double convention is confusing and should be aligned. This patch updates the fip_create command line options to follow the TBBR naming convention. Usage examples in the User Guide have been also updated. NOTE: users that build the FIP by calling the fip_create tool directly from the command line must update the command line options in their scripts. Users that build the FIP by invoking the main ARM TF Makefile should not notice any difference. Change-Id: I84d602630a2585e558d927b50dfde4dd2112496f --- Makefile | 18 +++++++++--------- docs/user-guide.md | 4 ++-- make_helpers/build_macros.mk | 8 ++++---- plat/arm/common/arm_common.mk | 2 +- plat/arm/css/common/css_common.mk | 4 ++-- tools/fip_create/fip_create.c | 16 ++++++++-------- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 500b0fc2..add2e9f9 100644 --- a/Makefile +++ b/Makefile @@ -457,34 +457,34 @@ $(eval $(call MAKE_BL,1)) endif ifeq (${NEED_BL2},yes) -$(if ${BL2}, $(eval $(call MAKE_TOOL_ARGS,2,${BL2},in_fip)),\ - $(eval $(call MAKE_BL,2,in_fip))) +$(if ${BL2}, $(eval $(call MAKE_TOOL_ARGS,2,${BL2},tb-fw)),\ + $(eval $(call MAKE_BL,2,tb-fw))) endif ifeq (${NEED_BL31},yes) BL31_SOURCES += ${SPD_SOURCES} -$(if ${BL31}, $(eval $(call MAKE_TOOL_ARGS,31,${BL31},in_fip)),\ - $(eval $(call MAKE_BL,31,in_fip))) +$(if ${BL31}, $(eval $(call MAKE_TOOL_ARGS,31,${BL31},soc-fw)),\ + $(eval $(call MAKE_BL,31,soc-fw))) endif # If a BL32 image is needed but neither BL32 nor BL32_SOURCES is defined, the # build system will call FIP_ADD_IMG to print a warning message and abort the # process. Note that the dependency on BL32 applies to the FIP only. ifeq (${NEED_BL32},yes) -$(if ${BL32}, $(eval $(call MAKE_TOOL_ARGS,32,${BL32},in_fip)),\ - $(if ${BL32_SOURCES}, $(eval $(call MAKE_BL,32,in_fip)),\ - $(eval $(call FIP_ADD_IMG,BL32,--bl32)))) +$(if ${BL32}, $(eval $(call MAKE_TOOL_ARGS,32,${BL32},tos-fw)),\ + $(if ${BL32_SOURCES}, $(eval $(call MAKE_BL,32,tos-fw)),\ + $(eval $(call FIP_ADD_IMG,BL32,--tos-fw)))) endif # Add the BL33 image if required by the platform ifeq (${NEED_BL33},yes) -$(eval $(call FIP_ADD_IMG,BL33,--bl33)) +$(eval $(call FIP_ADD_IMG,BL33,--nt-fw)) endif ifeq (${NEED_BL2U},yes) BL2U_PATH := $(if ${BL2U},${BL2U},$(call IMG_BIN,2u)) $(if ${BL2U}, ,$(eval $(call MAKE_BL,2u))) -$(eval $(call FWU_FIP_ADD_PAYLOAD,${BL2U_PATH},--bl2u)) +$(eval $(call FWU_FIP_ADD_PAYLOAD,${BL2U_PATH},--ap-fwu-cfg)) endif locate-checkpatch: diff --git a/docs/user-guide.md b/docs/user-guide.md index 435a903b..3337f88d 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -495,7 +495,7 @@ Create a Firmware package that contains existing BL2 and BL31 images: # fip_create --help to print usage information # fip_create [--dump to show result] ./tools/fip_create/fip_create fip.bin --dump \ - --bl2 build//debug/bl2.bin --bl31 build//debug/bl31.bin + --tb-fw build//debug/bl2.bin --soc-fw build//debug/bl31.bin Firmware Image Package ToC: --------------------------- @@ -520,7 +520,7 @@ Existing package entries can be individually updated: # Change the BL2 from Debug to Release version ./tools/fip_create/fip_create fip.bin --dump \ - --bl2 build//release/bl2.bin + --tb-fw build//release/bl2.bin Firmware Image Package ToC: --------------------------- diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 00fb92c9..d6a4e3ab 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -126,7 +126,7 @@ endef # FWU_FIP_ADD_PAYLOAD appends the command line arguments required by the FIP tool # to package a new FWU payload. Optionally, it adds the dependency on this payload # $(1) = payload filename (e.g. ns_bl2u.bin) -# $(2) = command line option for the specified payload (e.g. --ns_bl2u) +# $(2) = command line option for the specified payload (e.g. --fwu) # $(3) = fip target dependency (optional) (e.g. ns_bl2u) define FWU_FIP_ADD_PAYLOAD $(eval $(if $(3),FWU_FIP_DEPS += $(3))) @@ -285,16 +285,16 @@ endef # each BL image. Arguments: # $(1) = BL stage (2, 30, 31, 32, 33) # $(2) = Binary file -# $(3) = In FIP (false if empty) +# $(3) = FIP command line option (if empty, image will not be included in the FIP) define MAKE_TOOL_ARGS - $(if $(3),$(eval $(call FIP_ADD_PAYLOAD,$(2),--bl$(1),bl$(1)))) + $(if $(3),$(eval $(call FIP_ADD_PAYLOAD,$(2),--$(3),bl$(1)))) endef # MAKE_BL macro defines the targets and options to build each BL image. # Arguments: # $(1) = BL stage (2, 2u, 30, 31, 32, 33) -# $(2) = In FIP (false if empty) +# $(2) = FIP command line option (if empty, image will not be included in the FIP) define MAKE_BL $(eval BUILD_DIR := ${BUILD_PLAT}/bl$(1)) $(eval BL_SOURCES := $(BL$(call uppercase,$(1))_SOURCES)) diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 4ac12d9b..0748f921 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -140,7 +140,7 @@ ifneq (${TRUSTED_BOARD_BOOT},0) BL2_SOURCES += ${AUTH_SOURCES} - $(eval $(call FWU_FIP_ADD_IMG,NS_BL2U,--ns_bl2u)) + $(eval $(call FWU_FIP_ADD_IMG,NS_BL2U,--fwu)) MBEDTLS_KEY_ALG := ${KEY_ALG} diff --git a/plat/arm/css/common/css_common.mk b/plat/arm/css/common/css_common.mk index aabcb46e..6a8773dd 100644 --- a/plat/arm/css/common/css_common.mk +++ b/plat/arm/css/common/css_common.mk @@ -52,7 +52,7 @@ BL31_SOURCES += plat/arm/css/common/css_mhu.c \ plat/arm/css/common/css_topology.c ifneq (${TRUSTED_BOARD_BOOT},0) -$(eval $(call FWU_FIP_ADD_IMG,SCP_BL2U,--scp_bl2u)) +$(eval $(call FWU_FIP_ADD_IMG,SCP_BL2U,--scp-fwu-cfg)) endif ifneq (${RESET_TO_BL31},0) @@ -61,7 +61,7 @@ ifneq (${RESET_TO_BL31},0) endif # Subsystems require a SCP_BL2 image -$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp_bl2)) +$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw)) # Enable option to detect whether the SCP ROM firmware in use predates version # 1.7.0 and therefore, is incompatible. diff --git a/tools/fip_create/fip_create.c b/tools/fip_create/fip_create.c index f0d07910..19afc748 100644 --- a/tools/fip_create/fip_create.c +++ b/tools/fip_create/fip_create.c @@ -56,23 +56,23 @@ uuid_t uuid_null = {0}; /* The images used depends on the platform. */ static entry_lookup_list_t toc_entry_lookup_list[] = { { "SCP Firmware Updater Configuration FWU SCP_BL2U", UUID_TRUSTED_UPDATE_FIRMWARE_SCP_BL2U, - "scp_bl2u", NULL, FLAG_FILENAME }, + "scp-fwu-cfg", NULL, FLAG_FILENAME }, { "AP Firmware Updater Configuration BL2U", UUID_TRUSTED_UPDATE_FIRMWARE_BL2U, - "bl2u", NULL, FLAG_FILENAME }, + "ap-fwu-cfg", NULL, FLAG_FILENAME }, { "Firmware Updater NS_BL2U", UUID_TRUSTED_UPDATE_FIRMWARE_NS_BL2U, - "ns_bl2u", NULL, FLAG_FILENAME }, + "fwu", NULL, FLAG_FILENAME }, { "Non-Trusted Firmware Updater certificate", UUID_TRUSTED_FWU_CERT, "fwu-cert", NULL, FLAG_FILENAME}, { "Trusted Boot Firmware BL2", UUID_TRUSTED_BOOT_FIRMWARE_BL2, - "bl2", NULL, FLAG_FILENAME }, + "tb-fw", NULL, FLAG_FILENAME }, { "SCP Firmware SCP_BL2", UUID_SCP_FIRMWARE_SCP_BL2, - "scp_bl2", NULL, FLAG_FILENAME}, + "scp-fw", NULL, FLAG_FILENAME}, { "EL3 Runtime Firmware BL31", UUID_EL3_RUNTIME_FIRMWARE_BL31, - "bl31", NULL, FLAG_FILENAME}, + "soc-fw", NULL, FLAG_FILENAME}, { "Secure Payload BL32 (Trusted OS)", UUID_SECURE_PAYLOAD_BL32, - "bl32", NULL, FLAG_FILENAME}, + "tos-fw", NULL, FLAG_FILENAME}, { "Non-Trusted Firmware BL33", UUID_NON_TRUSTED_FIRMWARE_BL33, - "bl33", NULL, FLAG_FILENAME}, + "nt-fw", NULL, FLAG_FILENAME}, /* Key Certificates */ { "Root Of Trust key certificate", UUID_ROT_KEY_CERT, "rot-cert", NULL, FLAG_FILENAME }, -- 2.30.2