From e1e545899f3342c08aec1c4ea43cde686e9c3a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20=C3=98ye=20Amundsen?= Date: Mon, 23 Sep 2019 11:57:06 +0000 Subject: [PATCH] [nrf noup] cmake: inject kconfig from mcuboot cmakelist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously this injection took place earlier in the build process, resulting in menuconfig data being overwritten. By moving the injection here, the menuconfig data is not overwritten. Signed-off-by: Håkon Øye Amundsen (cherry picked from commit 45e7a2404625d50dcc651d0392a93691f4eaa1cd) Signed-off-by: Martí Bolívar --- zephyr/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index b8df4ee4d..646b869a5 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -72,6 +72,17 @@ if(CONFIG_BOOTLOADER_MCUBOOT) # Build a second bootloader image set(MCUBOOT_BASE ${CMAKE_CURRENT_LIST_DIR}/..) + if (CONFIG_MCUBOOT_BUILD_S1_VARIANT) + # Inject this configuration from parent image to mcuboot. + set(conf_path "${ZEPHYR_BASE}/../nrf/subsys/bootloader/image/build_s1.conf") + string(FIND ${mcuboot_OVERLAY_CONFIG} ${conf_path} out) + if (${out} EQUAL -1) + set(mcuboot_OVERLAY_CONFIG + "${mcuboot_OVERLAY_CONFIG} ${conf_path}" + CACHE STRING "" FORCE) + endif() + endif() + zephyr_add_executable(mcuboot require_build) if (${require_build})