Commit 5773b532 authored by danh-arm's avatar danh-arm
Browse files

Merge pull request #479 from jcastillo-arm/jc/tbbr_fip

Apply TBBR naming convention to the fip_create options
parents d37b2098 8f0617ef
......@@ -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:
......
......@@ -495,7 +495,7 @@ Create a Firmware package that contains existing BL2 and BL31 images:
# fip_create --help to print usage information
# fip_create <fip_name> <images to add> [--dump to show result]
./tools/fip_create/fip_create fip.bin --dump \
--bl2 build/<platform>/debug/bl2.bin --bl31 build/<platform>/debug/bl31.bin
--tb-fw build/<platform>/debug/bl2.bin --soc-fw build/<platform>/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/<platform>/release/bl2.bin
--tb-fw build/<platform>/release/bl2.bin
Firmware Image Package ToC:
---------------------------
......
......@@ -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))
......
......@@ -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}
......
......@@ -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.
......
......@@ -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 },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment