aboutsummaryrefslogtreecommitdiff
path: root/secure_fw
diff options
context:
space:
mode:
authorSherry Zhang <sherry.zhang2@arm.com>2021-05-19 15:14:27 +0800
committerSherry Zhang <sherry.zhang2@arm.com>2021-05-19 15:52:40 +0800
commit539ade4e842961fbb602840fd5ab4c36ec19d97d (patch)
treefb4eb9cc527502d611128168d33d8b5b713916a8 /secure_fw
parent004db24583c394dfcd4ff3eb16f012a5966158de (diff)
downloadtrusted-firmware-m-539ade4e842961fbb602840fd5ab4c36ec19d97d.tar.gz
FWU: Make setting the bootloader used in FWU simpler
TFM_FWU_BOOTLOADER_LIB is set as the full path of the bootloader configuation file in Firmware Update partition. To make it simpler, just set it as the name of the bootloader. Change-Id: Ieb145793590628f75c8eebfe1c131affcd36bd05 Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Diffstat (limited to 'secure_fw')
-rw-r--r--secure_fw/partitions/firmware_update/CMakeLists.txt7
-rw-r--r--secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt (renamed from secure_fw/partitions/firmware_update/bootloader/mcuboot/mcuboot_utilities.cmake)6
2 files changed, 7 insertions, 6 deletions
diff --git a/secure_fw/partitions/firmware_update/CMakeLists.txt b/secure_fw/partitions/firmware_update/CMakeLists.txt
index f7753d8e6..ffb78dde4 100644
--- a/secure_fw/partitions/firmware_update/CMakeLists.txt
+++ b/secure_fw/partitions/firmware_update/CMakeLists.txt
@@ -39,12 +39,11 @@ target_sources(tfm_partitions
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/firmware_update/auto_generated/static_info_tfm_firmware_update.c>
)
-# Include the bootloader specific configuration.
-if ((NOT TFM_FWU_BOOTLOADER_LIB) OR (NOT EXISTS ${TFM_FWU_BOOTLOADER_LIB}))
+# The bootloader specific configuration.
+if ((NOT TFM_FWU_BOOTLOADER_LIB) OR (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bootloader/${TFM_FWU_BOOTLOADER_LIB}))
message(FATAL_ERROR "TFM_FWU_BOOTLOADER_LIB invalid")
endif()
-
-include(${TFM_FWU_BOOTLOADER_LIB})
+add_subdirectory(bootloader/${TFM_FWU_BOOTLOADER_LIB})
target_link_libraries(tfm_psa_rot_partition_fwu
PRIVATE
diff --git a/secure_fw/partitions/firmware_update/bootloader/mcuboot/mcuboot_utilities.cmake b/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt
index fc1508b22..b764c9ea9 100644
--- a/secure_fw/partitions/firmware_update/bootloader/mcuboot/mcuboot_utilities.cmake
+++ b/secure_fw/partitions/firmware_update/bootloader/mcuboot/CMakeLists.txt
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
+cmake_minimum_required(VERSION 3.15)
+cmake_policy(SET CMP0079 NEW)
add_library(tfm_fwu_mcuboot_util INTERFACE)
@@ -13,7 +15,7 @@ target_sources(tfm_fwu_mcuboot_util
${MCUBOOT_PATH}/boot/bootutil/src/tlv.c
${CMAKE_SOURCE_DIR}/bl2/src/flash_map.c
${CMAKE_SOURCE_DIR}/bl2/ext/mcuboot/flash_map_extended.c
- ${CMAKE_CURRENT_SOURCE_DIR}/bootloader/mcuboot/tfm_mcuboot_fwu.c
+ ./tfm_mcuboot_fwu.c
)
target_include_directories(tfm_fwu_mcuboot_util
@@ -22,7 +24,7 @@ target_include_directories(tfm_fwu_mcuboot_util
${CMAKE_SOURCE_DIR}/bl2/ext/mcuboot/include
${MCUBOOT_PATH}/boot/bootutil/include
${MCUBOOT_PATH}/boot/bootutil/src
- ${CMAKE_CURRENT_SOURCE_DIR}/bootloader
+ ${CMAKE_CURRENT_SOURCE_DIR}/../
)
target_link_libraries(tfm_fwu_mcuboot_util