Skip to content

Commit 6168414

Browse files
hakonfamSebastianBoe
authored andcommitted
[nrf toup] cmake: check BOARD before setting default
Wil go upstream when multi image is added upstream. Currently the BOARD variable is not checked before setting the default value. This causes issues in a multi image context. Fix this by checking if the BOARD variable is set before setting it to its default value. Signed-off-by: Håkon Øye Amundsen <[email protected]>
1 parent 0341ae4 commit 6168414

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

boot/zephyr/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ cmake_minimum_required(VERSION 3.8.2)
88

99
# Board-specific CONF_FILES should get merged into the build as well.
1010
# Default to qemu_x86 if no board has been specified.
11-
set(BOARD qemu_x86)
11+
# If BOARD is already defined, mcuboot is being built in a multi image
12+
# context, and should default to its parent image BOARD.
13+
if (NOT BOARD)
14+
set(BOARD qemu_x86)
15+
endif()
1216

1317
# Add a common dts overlay necessary to ensure mcuboot is linked into,
1418
# and fits inside, the boot partition. (If the user specified a

0 commit comments

Comments
 (0)