Skip to content

Commit

Permalink
[nrf noup] cmake: inject kconfig from mcuboot cmakelist
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit 45e7a24)
Signed-off-by: Martí Bolívar <[email protected]>
  • Loading branch information
hakonfam authored and mbolivar-nordic committed Oct 24, 2019
1 parent 46edf6b commit e1e5458
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit e1e5458

Please sign in to comment.