aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIoannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>2021-05-11 12:44:39 +0200
committerDavid Hu <david.hu@arm.com>2021-05-17 04:25:50 +0200
commit855321afde18de7f08217e8f946e79153e674ba4 (patch)
tree60e064097ddbeee2a4b934dfa0c4fd6adacc181c
parent1881ef1a5e3e9de6e88dfdbe733b0155a4a202e8 (diff)
downloadtrusted-firmware-m-855321afde18de7f08217e8f946e79153e674ba4.tar.gz
mcuboot: make mbedcrypto config file configurable
Change the mbedtls config file path for mcuboot to being configurable by the user. For that we introduce a new CMake variable, called MCUBOOT_MBEDCRYPTO_CONFIG_PATH. Change-Id: I14701b8301f039f0eb081919a2589bcca7936e8f Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
-rw-r--r--bl2/CMakeLists.txt2
-rw-r--r--config/config_default.cmake2
2 files changed, 3 insertions, 1 deletions
diff --git a/bl2/CMakeLists.txt b/bl2/CMakeLists.txt
index 0fc72d61e8..cbdd796cc7 100644
--- a/bl2/CMakeLists.txt
+++ b/bl2/CMakeLists.txt
@@ -60,7 +60,7 @@ target_compile_definitions(bl2_mbedcrypto_config
INTERFACE
$<$<STREQUAL:${MCUBOOT_SIGNATURE_TYPE},RSA>:MCUBOOT_SIGN_RSA>
$<$<STREQUAL:${MCUBOOT_SIGNATURE_TYPE},RSA>:MCUBOOT_SIGN_RSA_LEN=${MCUBOOT_SIGNATURE_KEY_LEN}>
- MBEDTLS_CONFIG_FILE="$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ext/mcuboot/config/mcuboot-mbedtls-cfg.h>"
+ MBEDTLS_CONFIG_FILE="${MCUBOOT_MBEDCRYPTO_CONFIG_FILEPATH}"
# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
$<$<OR:$<STREQUAL:${CMAKE_SYSTEM_ARCHITECTURE},armv8-m.base>,$<STREQUAL:${CMAKE_SYSTEM_ARCHITECTURE},armv6-m>>:MULADDC_CANNOT_USE_R7>
)
diff --git a/config/config_default.cmake b/config/config_default.cmake
index 1236c4ce94..a684a01843 100644
--- a/config/config_default.cmake
+++ b/config/config_default.cmake
@@ -72,6 +72,8 @@ set(MCUBOOT_SECURITY_COUNTER_NS "auto" CACHE STRING "Security co
set(MCUBOOT_S_IMAGE_MIN_VER 0.0.0+0 CACHE STRING "Minimum version of secure image required by the non-secure image for upgrade to this non-secure image. If MCUBOOT_IMAGE_NUMBER == 1 this option has no effect")
set(MCUBOOT_NS_IMAGE_MIN_VER 0.0.0+0 CACHE STRING "Minimum version of non-secure image required by the secure image for upgrade to this secure image. If MCUBOOT_IMAGE_NUMBER == 1 this option has no effect")
+set(MCUBOOT_MBEDCRYPTO_CONFIG_FILEPATH "${CMAKE_SOURCE_DIR}/bl2/ext/mcuboot/config/mcuboot-mbedtls-cfg.h" CACHE FILEPATH "Mbedtls config file to use with MCUboot")
+
############################ Platform ##########################################
set(TFM_MULTI_CORE_TOPOLOGY OFF CACHE BOOL "Whether to build for a dual-cpu architecture")