2022-06-22 17:19:05 +08:00
|
|
|
# Copyright (c) 2022 Nordic Semiconductor
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
# Include MCUboot if enabled.
|
|
|
|
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
|
2023-03-16 21:57:16 +08:00
|
|
|
set(image mcuboot)
|
2022-06-22 17:19:05 +08:00
|
|
|
ExternalZephyrProject_Add(
|
2023-03-16 21:57:16 +08:00
|
|
|
APPLICATION ${image}
|
2022-06-22 17:19:05 +08:00
|
|
|
SOURCE_DIR ${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/
|
2023-03-16 21:57:16 +08:00
|
|
|
APP_TYPE BOOTLOADER
|
2022-06-22 17:19:05 +08:00
|
|
|
)
|
2023-10-31 01:15:19 +08:00
|
|
|
# Place MCUBoot first in list to ensure it is configured and flashed before other images.
|
|
|
|
sysbuild_add_dependencies(CONFIGURE ${DEFAULT_IMAGE} ${image})
|
2023-05-15 17:19:47 +08:00
|
|
|
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} ${image})
|
2023-03-16 21:57:16 +08:00
|
|
|
|
|
|
|
set_config_string(${image} CONFIG_BOOT_SIGNATURE_KEY_FILE "${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE}")
|
2023-07-17 21:46:45 +08:00
|
|
|
set_config_bool(${image} CONFIG_BOOT_ENCRYPT_IMAGE "${SB_CONFIG_BOOT_ENCRYPTION}")
|
|
|
|
if(SB_CONFIG_BOOT_ENCRYPTION)
|
|
|
|
set_config_string(${image} CONFIG_BOOT_ENCRYPTION_KEY_FILE "${SB_CONFIG_BOOT_ENCRYPTION_KEY_FILE}")
|
|
|
|
endif()
|
2022-06-22 17:19:05 +08:00
|
|
|
endif()
|