Platform: Move tfm_rotpk.c under template
Move the example ROTPK under platform/ext/common/template.
Change-Id: If3cf33779642f3f2519c9fbb94eb8b512eafc62a
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/platform/ext/Mps2AN519.cmake b/platform/ext/Mps2AN519.cmake
index c2f8c40..7ae3e9e 100644
--- a/platform/ext/Mps2AN519.cmake
+++ b/platform/ext/Mps2AN519.cmake
@@ -40,7 +40,7 @@
if (${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "RAM_LOADING")
message(FATAL_ERROR "ERROR: RAM_LOADING upgrade strategy is not supported on target '${TARGET_PLATFORM}'.")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -151,7 +151,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
diff --git a/platform/ext/Mps2AN521.cmake b/platform/ext/Mps2AN521.cmake
index d465800..aa008e4 100644
--- a/platform/ext/Mps2AN521.cmake
+++ b/platform/ext/Mps2AN521.cmake
@@ -41,7 +41,7 @@
if (${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "RAM_LOADING")
message(FATAL_ERROR "ERROR: RAM_LOADING upgrade strategy is not supported on target '${TARGET_PLATFORM}'.")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -152,7 +152,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
diff --git a/platform/ext/Mps2AN539.cmake b/platform/ext/Mps2AN539.cmake
index cd8ac4c..c2c5cf9 100644
--- a/platform/ext/Mps2AN539.cmake
+++ b/platform/ext/Mps2AN539.cmake
@@ -42,7 +42,7 @@
if (${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "RAM_LOADING")
message(FATAL_ERROR "ERROR: RAM_LOADING upgrade strategy is not supported on target '${TARGET_PLATFORM}'.")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -136,7 +136,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
diff --git a/platform/ext/Mps3AN524.cmake b/platform/ext/Mps3AN524.cmake
index afa83aa..f546bba 100644
--- a/platform/ext/Mps3AN524.cmake
+++ b/platform/ext/Mps3AN524.cmake
@@ -50,7 +50,7 @@
mcuboot_override_upgrade_strategy("NO_SWAP")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -158,7 +158,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
diff --git a/platform/ext/common/tfm_rotpk.c b/platform/ext/common/template/tfm_rotpk.c
similarity index 100%
rename from platform/ext/common/tfm_rotpk.c
rename to platform/ext/common/template/tfm_rotpk.c
diff --git a/platform/ext/musca_a.cmake b/platform/ext/musca_a.cmake
index 29982cf..c9161d4 100644
--- a/platform/ext/musca_a.cmake
+++ b/platform/ext/musca_a.cmake
@@ -147,7 +147,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
@@ -206,7 +206,7 @@
if (BL2)
set(BL2_LINKER_CONFIG ${BL2_SCATTER_FILE_NAME})
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
diff --git a/platform/ext/musca_b1.cmake b/platform/ext/musca_b1.cmake
index 3ae0564..c739870 100644
--- a/platform/ext/musca_b1.cmake
+++ b/platform/ext/musca_b1.cmake
@@ -42,7 +42,7 @@
mcuboot_override_upgrade_strategy("NO_SWAP")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -160,7 +160,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif (BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/musca_b1/dummy_crypto_keys.c")
endif()
diff --git a/platform/ext/musca_s1.cmake b/platform/ext/musca_s1.cmake
index ee591ed..c3e4bc2 100644
--- a/platform/ext/musca_s1.cmake
+++ b/platform/ext/musca_s1.cmake
@@ -42,7 +42,7 @@
mcuboot_override_upgrade_strategy("NO_SWAP")
endif()
- #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/tfm_rotpk.c
+ #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c
# instead independently loaded from secure code as a blob.
if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048")
add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048)
@@ -152,7 +152,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c")
endif()
diff --git a/platform/ext/psoc64.cmake b/platform/ext/psoc64.cmake
index b878b72..45f6962 100644
--- a/platform/ext/psoc64.cmake
+++ b/platform/ext/psoc64.cmake
@@ -188,7 +188,7 @@
message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!")
elseif(BUILD_TARGET_HARDWARE_KEYS)
list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c")
- list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/tfm_rotpk.c")
+ list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/template/tfm_rotpk.c")
list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/dummy_crypto_keys.c")
endif()