arm-trusted-firmware/make_helpers/tbbr/tbbr_tools.mk

98 lines
3.8 KiB
Makefile
Raw Normal View History

Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
#
# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
#
# SPDX-License-Identifier: BSD-3-Clause
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
#
# This file defines the keys and certificates that must be created to establish
# a Chain of Trust following the TBBR document. These definitions include the
# command line options passed to the cert_create and fiptool commands.
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
#
# Expected environment:
#
# BUILD_PLAT: output directory
# NEED_BL32: indicates whether BL32 is needed by the platform
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# BL2: image filename (optional). Default is IMG_BIN(2) (see macro IMG_BIN)
# SCP_BL2: image filename (optional). Default is IMG_BIN(30)
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# BL31: image filename (optional). Default is IMG_BIN(31)
# BL32: image filename (optional). Default is IMG_BIN(32)
# BL33: image filename (optional). Default is IMG_BIN(33)
#
# Build options added by this file:
#
# KEY_ALG
# KEY_SIZE
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# ROT_KEY
# TRUSTED_WORLD_KEY
# NON_TRUSTED_WORLD_KEY
# SCP_BL2_KEY
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# BL31_KEY
# BL32_KEY
# BL33_KEY
#
# Certificate generation tool default parameters
TRUSTED_KEY_CERT := ${BUILD_PLAT}/trusted_key.crt
FWU_CERT := ${BUILD_PLAT}/fwu_cert.crt
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# Default non-volatile counter values (overridable by the platform)
TFW_NVCTR_VAL ?= 0
NTFW_NVCTR_VAL ?= 0
# Pass the non-volatile counters to the cert_create tool
$(eval $(call CERT_ADD_CMD_OPT,${TFW_NVCTR_VAL},--tfw-nvctr))
$(eval $(call CERT_ADD_CMD_OPT,${NTFW_NVCTR_VAL},--ntfw-nvctr))
# Add Trusted Key certificate to the fiptool and cert_create command line options
$(eval $(call TOOL_ADD_PAYLOAD,${TRUSTED_KEY_CERT},--trusted-key-cert))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# Add fwu certificate to the fiptool and cert_create command line options
$(eval $(call TOOL_ADD_PAYLOAD,${FWU_CERT},--fwu-cert,,FWU_))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# Add the keys to the cert_create command line options (private keys are NOT
# packed in the FIP). Developers can use their own keys by specifying the proper
# build option in the command line when building the Trusted Firmware
$(if ${KEY_ALG},$(eval $(call CERT_ADD_CMD_OPT,${KEY_ALG},--key-alg)))
$(if ${KEY_SIZE},$(eval $(call CERT_ADD_CMD_OPT,${KEY_SIZE},--key-size)))
$(if ${HASH_ALG},$(eval $(call CERT_ADD_CMD_OPT,${HASH_ALG},--hash-alg)))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key)))
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key,FWU_)))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
$(if ${TRUSTED_WORLD_KEY},$(eval $(call CERT_ADD_CMD_OPT,${TRUSTED_WORLD_KEY},--trusted-world-key)))
$(if ${NON_TRUSTED_WORLD_KEY},$(eval $(call CERT_ADD_CMD_OPT,${NON_TRUSTED_WORLD_KEY},--non-trusted-world-key)))
# Add the BL2 CoT (image cert)
ifeq (${BL2_AT_EL3}, 0)
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tb_fw.crt,--tb-fw-cert))
endif
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# Add the SCP_BL2 CoT (key cert + img cert)
ifneq (${SCP_BL2},)
$(if ${SCP_BL2_KEY},$(eval $(call CERT_ADD_CMD_OPT,${SCP_BL2_KEY},--scp-fw-key)))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/scp_fw_content.crt,--scp-fw-cert))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/scp_fw_key.crt,--scp-fw-key-cert))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
endif
ifeq (${ARCH},aarch64)
ifeq (${NEED_BL31},yes)
# Add the BL31 CoT (key cert + img cert)
TBB: apply TBBR naming convention to certificates and extensions This patch applies the TBBR naming convention to the certificates and the corresponding extensions defined by the CoT: * Certificate UUID names * Certificate identifier names * OID names Changes apply to: * Generic code (variables and defines) * The default certificate identifiers provided in the generic code * Build system * ARM platforms port * cert_create tool internal definitions * fip_create and cert_create tools command line options * Documentation IMPORTANT: this change breaks the compatibility with platforms that use TBBR. The platform will need to adapt the identifiers and OIDs to the TBBR naming convention introduced by this patch: Certificate UUIDs: UUID_TRUSTED_BOOT_FIRMWARE_BL2_CERT --> UUID_TRUSTED_BOOT_FW_CERT UUID_SCP_FIRMWARE_BL30_KEY_CERT --> UUID_SCP_FW_KEY_CERT UUID_SCP_FIRMWARE_BL30_CERT --> UUID_SCP_FW_CONTENT_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_KEY_CERT --> UUID_SOC_FW_KEY_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_CERT --> UUID_SOC_FW_CONTENT_CERT UUID_SECURE_PAYLOAD_BL32_KEY_CERT --> UUID_TRUSTED_OS_FW_KEY_CERT UUID_SECURE_PAYLOAD_BL32_CERT --> UUID_TRUSTED_OS_FW_CONTENT_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_KEY_CERT --> UUID_NON_TRUSTED_FW_KEY_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_CERT --> UUID_NON_TRUSTED_FW_CONTENT_CERT Certificate identifiers: BL2_CERT_ID --> TRUSTED_BOOT_FW_CERT_ID BL30_KEY_CERT_ID --> SCP_FW_KEY_CERT_ID BL30_CERT_ID --> SCP_FW_CONTENT_CERT_ID BL31_KEY_CERT_ID --> SOC_FW_KEY_CERT_ID BL31_CERT_ID --> SOC_FW_CONTENT_CERT_ID BL32_KEY_CERT_ID --> TRUSTED_OS_FW_KEY_CERT_ID BL32_CERT_ID --> TRUSTED_OS_FW_CONTENT_CERT_ID BL33_KEY_CERT_ID --> NON_TRUSTED_FW_KEY_CERT_ID BL33_CERT_ID --> NON_TRUSTED_FW_CONTENT_CERT_ID OIDs: TZ_FW_NVCOUNTER_OID --> TRUSTED_FW_NVCOUNTER_OID NTZ_FW_NVCOUNTER_OID --> NON_TRUSTED_FW_NVCOUNTER_OID BL2_HASH_OID --> TRUSTED_BOOT_FW_HASH_OID TZ_WORLD_PK_OID --> TRUSTED_WORLD_PK_OID NTZ_WORLD_PK_OID --> NON_TRUSTED_WORLD_PK_OID BL30_CONTENT_CERT_PK_OID --> SCP_FW_CONTENT_CERT_PK_OID BL30_HASH_OID --> SCP_FW_HASH_OID BL31_CONTENT_CERT_PK_OID --> SOC_FW_CONTENT_CERT_PK_OID BL31_HASH_OID --> SOC_AP_FW_HASH_OID BL32_CONTENT_CERT_PK_OID --> TRUSTED_OS_FW_CONTENT_CERT_PK_OID BL32_HASH_OID --> TRUSTED_OS_FW_HASH_OID BL33_CONTENT_CERT_PK_OID --> NON_TRUSTED_FW_CONTENT_CERT_PK_OID BL33_HASH_OID --> NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID BL2U_HASH_OID --> AP_FWU_CFG_HASH_OID SCP_BL2U_HASH_OID --> SCP_FWU_CFG_HASH_OID NS_BL2U_HASH_OID --> FWU_HASH_OID Change-Id: I1e047ae046299ca913911c39ac3a6e123bd41079
2015-12-03 10:19:21 +00:00
$(if ${BL31_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL31_KEY},--soc-fw-key)))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/soc_fw_content.crt,--soc-fw-cert))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/soc_fw_key.crt,--soc-fw-key-cert))
endif
endif
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
# Add the BL32 CoT (key cert + img cert)
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
ifeq (${NEED_BL32},yes)
TBB: apply TBBR naming convention to certificates and extensions This patch applies the TBBR naming convention to the certificates and the corresponding extensions defined by the CoT: * Certificate UUID names * Certificate identifier names * OID names Changes apply to: * Generic code (variables and defines) * The default certificate identifiers provided in the generic code * Build system * ARM platforms port * cert_create tool internal definitions * fip_create and cert_create tools command line options * Documentation IMPORTANT: this change breaks the compatibility with platforms that use TBBR. The platform will need to adapt the identifiers and OIDs to the TBBR naming convention introduced by this patch: Certificate UUIDs: UUID_TRUSTED_BOOT_FIRMWARE_BL2_CERT --> UUID_TRUSTED_BOOT_FW_CERT UUID_SCP_FIRMWARE_BL30_KEY_CERT --> UUID_SCP_FW_KEY_CERT UUID_SCP_FIRMWARE_BL30_CERT --> UUID_SCP_FW_CONTENT_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_KEY_CERT --> UUID_SOC_FW_KEY_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_CERT --> UUID_SOC_FW_CONTENT_CERT UUID_SECURE_PAYLOAD_BL32_KEY_CERT --> UUID_TRUSTED_OS_FW_KEY_CERT UUID_SECURE_PAYLOAD_BL32_CERT --> UUID_TRUSTED_OS_FW_CONTENT_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_KEY_CERT --> UUID_NON_TRUSTED_FW_KEY_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_CERT --> UUID_NON_TRUSTED_FW_CONTENT_CERT Certificate identifiers: BL2_CERT_ID --> TRUSTED_BOOT_FW_CERT_ID BL30_KEY_CERT_ID --> SCP_FW_KEY_CERT_ID BL30_CERT_ID --> SCP_FW_CONTENT_CERT_ID BL31_KEY_CERT_ID --> SOC_FW_KEY_CERT_ID BL31_CERT_ID --> SOC_FW_CONTENT_CERT_ID BL32_KEY_CERT_ID --> TRUSTED_OS_FW_KEY_CERT_ID BL32_CERT_ID --> TRUSTED_OS_FW_CONTENT_CERT_ID BL33_KEY_CERT_ID --> NON_TRUSTED_FW_KEY_CERT_ID BL33_CERT_ID --> NON_TRUSTED_FW_CONTENT_CERT_ID OIDs: TZ_FW_NVCOUNTER_OID --> TRUSTED_FW_NVCOUNTER_OID NTZ_FW_NVCOUNTER_OID --> NON_TRUSTED_FW_NVCOUNTER_OID BL2_HASH_OID --> TRUSTED_BOOT_FW_HASH_OID TZ_WORLD_PK_OID --> TRUSTED_WORLD_PK_OID NTZ_WORLD_PK_OID --> NON_TRUSTED_WORLD_PK_OID BL30_CONTENT_CERT_PK_OID --> SCP_FW_CONTENT_CERT_PK_OID BL30_HASH_OID --> SCP_FW_HASH_OID BL31_CONTENT_CERT_PK_OID --> SOC_FW_CONTENT_CERT_PK_OID BL31_HASH_OID --> SOC_AP_FW_HASH_OID BL32_CONTENT_CERT_PK_OID --> TRUSTED_OS_FW_CONTENT_CERT_PK_OID BL32_HASH_OID --> TRUSTED_OS_FW_HASH_OID BL33_CONTENT_CERT_PK_OID --> NON_TRUSTED_FW_CONTENT_CERT_PK_OID BL33_HASH_OID --> NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID BL2U_HASH_OID --> AP_FWU_CFG_HASH_OID SCP_BL2U_HASH_OID --> SCP_FWU_CFG_HASH_OID NS_BL2U_HASH_OID --> FWU_HASH_OID Change-Id: I1e047ae046299ca913911c39ac3a6e123bd41079
2015-12-03 10:19:21 +00:00
$(if ${BL32_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL32_KEY},--tos-fw-key)))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_content.crt,--tos-fw-cert))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_key.crt,--tos-fw-key-cert))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
endif
# Add the BL33 CoT (key cert + img cert)
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
ifneq (${BL33},)
TBB: apply TBBR naming convention to certificates and extensions This patch applies the TBBR naming convention to the certificates and the corresponding extensions defined by the CoT: * Certificate UUID names * Certificate identifier names * OID names Changes apply to: * Generic code (variables and defines) * The default certificate identifiers provided in the generic code * Build system * ARM platforms port * cert_create tool internal definitions * fip_create and cert_create tools command line options * Documentation IMPORTANT: this change breaks the compatibility with platforms that use TBBR. The platform will need to adapt the identifiers and OIDs to the TBBR naming convention introduced by this patch: Certificate UUIDs: UUID_TRUSTED_BOOT_FIRMWARE_BL2_CERT --> UUID_TRUSTED_BOOT_FW_CERT UUID_SCP_FIRMWARE_BL30_KEY_CERT --> UUID_SCP_FW_KEY_CERT UUID_SCP_FIRMWARE_BL30_CERT --> UUID_SCP_FW_CONTENT_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_KEY_CERT --> UUID_SOC_FW_KEY_CERT UUID_EL3_RUNTIME_FIRMWARE_BL31_CERT --> UUID_SOC_FW_CONTENT_CERT UUID_SECURE_PAYLOAD_BL32_KEY_CERT --> UUID_TRUSTED_OS_FW_KEY_CERT UUID_SECURE_PAYLOAD_BL32_CERT --> UUID_TRUSTED_OS_FW_CONTENT_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_KEY_CERT --> UUID_NON_TRUSTED_FW_KEY_CERT UUID_NON_TRUSTED_FIRMWARE_BL33_CERT --> UUID_NON_TRUSTED_FW_CONTENT_CERT Certificate identifiers: BL2_CERT_ID --> TRUSTED_BOOT_FW_CERT_ID BL30_KEY_CERT_ID --> SCP_FW_KEY_CERT_ID BL30_CERT_ID --> SCP_FW_CONTENT_CERT_ID BL31_KEY_CERT_ID --> SOC_FW_KEY_CERT_ID BL31_CERT_ID --> SOC_FW_CONTENT_CERT_ID BL32_KEY_CERT_ID --> TRUSTED_OS_FW_KEY_CERT_ID BL32_CERT_ID --> TRUSTED_OS_FW_CONTENT_CERT_ID BL33_KEY_CERT_ID --> NON_TRUSTED_FW_KEY_CERT_ID BL33_CERT_ID --> NON_TRUSTED_FW_CONTENT_CERT_ID OIDs: TZ_FW_NVCOUNTER_OID --> TRUSTED_FW_NVCOUNTER_OID NTZ_FW_NVCOUNTER_OID --> NON_TRUSTED_FW_NVCOUNTER_OID BL2_HASH_OID --> TRUSTED_BOOT_FW_HASH_OID TZ_WORLD_PK_OID --> TRUSTED_WORLD_PK_OID NTZ_WORLD_PK_OID --> NON_TRUSTED_WORLD_PK_OID BL30_CONTENT_CERT_PK_OID --> SCP_FW_CONTENT_CERT_PK_OID BL30_HASH_OID --> SCP_FW_HASH_OID BL31_CONTENT_CERT_PK_OID --> SOC_FW_CONTENT_CERT_PK_OID BL31_HASH_OID --> SOC_AP_FW_HASH_OID BL32_CONTENT_CERT_PK_OID --> TRUSTED_OS_FW_CONTENT_CERT_PK_OID BL32_HASH_OID --> TRUSTED_OS_FW_HASH_OID BL33_CONTENT_CERT_PK_OID --> NON_TRUSTED_FW_CONTENT_CERT_PK_OID BL33_HASH_OID --> NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID BL2U_HASH_OID --> AP_FWU_CFG_HASH_OID SCP_BL2U_HASH_OID --> SCP_FWU_CFG_HASH_OID NS_BL2U_HASH_OID --> FWU_HASH_OID Change-Id: I1e047ae046299ca913911c39ac3a6e123bd41079
2015-12-03 10:19:21 +00:00
$(if ${BL33_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL33_KEY},--nt-fw-key)))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/nt_fw_content.crt,--nt-fw-cert))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/nt_fw_key.crt,--nt-fw-key-cert))
Rework Makefile This patch is a complete rework of the main Makefile. Functionality remains the same but the code has been reorganized in sections in order to improve readability and facilitate adding future extensions. A new file 'build_macros.mk' has been created and will contain common definitions (variables, macros, etc) that may be used from the main Makefile and other platform specific makefiles. A new macro 'FIP_ADD_IMG' has been introduced and it will allow the platform to specify binary images and the necessary checks for a successful build. Platforms that require a BL30 image no longer need to specify the NEED_BL30 option. The main Makefile is now completely unaware of additional images not built as part of Trusted Firmware, like BL30. It is the platform responsibility to specify images using the macro 'FIP_ADD_IMG'. Juno uses this macro to include the BL30 image in the build. BL33 image is specified in the main Makefile to preserve backward compatibility with the NEED_BL33 option. Otherwise, platform ports that rely on the definition of NEED_BL33 might break. All Trusted Board Boot related definitions have been moved to a separate file 'tbbr_tools.mk'. The main Makefile will include this file unless the platform indicates otherwise by setting the variable 'INCLUDE_TBBR_MK := 0' in the corresponding platform.mk file. This will keep backward compatibility but ideally each platform should include the corresponding TBB .mk file in platform.mk. Change-Id: I35e7bc9930d38132412e950e20aa2a01e2b26801
2015-08-18 14:23:04 +01:00
endif