Skip to content

Commit 4d5fc86

Browse files
committed
share: sysbuild: bootloader: add BOOTLOADER_CUSTOM option as choice
This configuration aims to auxiliate on including a custom bootloader build when building using sysbuild. Its build should be configured and triggered from the target's sysbuild cmake files. Signed-off-by: Almir Okato <[email protected]>
1 parent dfbfa0f commit 4d5fc86

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

share/sysbuild/image_configurations/MAIN_image_default.cmake

+9-8
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
# This sysbuild CMake file sets the sysbuild controlled settings as properties
66
# on the main Zephyr image.
77

8-
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_BOOTLOADER_MCUBOOT "${SB_CONFIG_BOOTLOADER_MCUBOOT}")
9-
set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_SIGNATURE_KEY_FILE
10-
"${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE}"
11-
)
12-
set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_ENCRYPTION_KEY_FILE
13-
"${SB_CONFIG_BOOT_ENCRYPTION_KEY_FILE}"
14-
)
15-
168
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
9+
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_BOOTLOADER_MCUBOOT y)
10+
11+
set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_SIGNATURE_KEY_FILE
12+
"${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE}"
13+
)
14+
set_config_string(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_ENCRYPTION_KEY_FILE
15+
"${SB_CONFIG_BOOT_ENCRYPTION_KEY_FILE}"
16+
)
17+
1718
if("${SB_CONFIG_SIGNATURE_TYPE}" STREQUAL "NONE")
1819
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE y)
1920
else()

share/sysbuild/images/bootloader/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ config BOOTLOADER_MCUBOOT
2626
help
2727
Include MCUboot (Zephyr port) as the bootloader to use
2828

29+
config BOOTLOADER_CUSTOM
30+
bool "Custom bootloader"
31+
help
32+
Include custom bootloader in the build
33+
(the bootloader build must be configured and triggered
34+
from the target SOC or BOARD sysbuild system)
35+
2936
endchoice
3037

3138
if BOOTLOADER_MCUBOOT

0 commit comments

Comments
 (0)