Skip to content

Commit

Permalink
Fix provision files not being generated
Browse files Browse the repository at this point in the history
  • Loading branch information
nordicjm committed Oct 24, 2023
1 parent 3d4b304 commit 9fdd7fe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
7 changes: 7 additions & 0 deletions cmake/sysbuild/partition_manager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ function(partition_manager)
else()
set(part "${DEFAULT_IMAGE}")
endif()
elseif(${part} STREQUAL "provision")
# Adjust provision name for domain
if("${PM_DOMAIN}" STREQUAL "CPUNET")
set(part "net_${part}")
else()
set(part "app_${part}")
endif()
endif()
string(TOUPPER ${part} PART)
get_property(${part}_PM_HEX_FILE GLOBAL PROPERTY ${part}_PM_HEX_FILE)
Expand Down
27 changes: 14 additions & 13 deletions sysbuild/Kconfig.secureboot
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,28 @@ config SECURE_BOOT_NETCORE

#endchoice

config SECURE_BOOT_IMAGE_NAME
string
default "b0n" if SECURE_BOOT_NETCORE
default "b0"
help
Internal build system name of secure bootloader image.
#config SECURE_BOOT_IMAGE_NAME
# string
# default "b0n" if SECURE_BOOT_NETCORE
# default "b0"
# help
# Internal build system name of secure bootloader image.

config SECURE_BOOT_BOARD
config SECURE_BOOT_NETWORK_BOARD
string
default "nrf5340dk_nrf5340_cpunet" if SECURE_BOOT_NETCORE && ($(BOARD) = "nrf5340dk_nrf5340_cpuapp" || $(BOARD) = "nrf5340dk_nrf5340_cpuapp_ns")
default "thingy53_nrf5340_cpunet" if SECURE_BOOT_NETCORE && ($(BOARD) = "thingy53_nrf5340_cpuapp" || $(BOARD) = "thingy53_nrf5340_cpuapp_ns")
depends on SECURE_BOOT_NETCORE
help
Remote board when building this sample.
If not set, the board given to sysbuild is used.

config SECURE_BOOT_DOMAIN
string
default "CPUNET" if SECURE_BOOT_NETCORE
default "APP"
help
Internal build system domain name used for first stage bootloader.
#config SECURE_BOOT_DOMAIN
# string
# default "CPUNET" if SECURE_BOOT_NETCORE
# default "APP"
# help
# Internal build system domain name used for first stage bootloader.

config SECURE_BOOT_BUILD_S1_VARIANT_IMAGE
# bool "Build S1 variant image" # Possibly support disabling this in future
Expand Down
6 changes: 2 additions & 4 deletions sysbuild/secureboot.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ if(SB_CONFIG_SECURE_BOOT)
set(secure_boot_source_dir ${ZEPHYR_NRF_MODULE_DIR}/samples/nrf5340/netboot)

ExternalZephyrProject_Add(
# APPLICATION ${SB_CONFIG_SECURE_BOOT_IMAGE_NAME}
APPLICATION b0n
# ToDo: which sample is used as secure boot sample in other cases ?
SOURCE_DIR ${secure_boot_source_dir}
BOARD ${SB_CONFIG_SECURE_BOOT_BOARD}
BOARD ${SB_CONFIG_SECURE_BOOT_NETWORK_BOARD}
BUILD_ONLY true
)
set_target_properties(${SB_CONFIG_SECURE_BOOT_IMAGE_NAME} PROPERTIES
Expand Down Expand Up @@ -45,7 +44,6 @@ endif()
set(secure_boot_source_dir ${ZEPHYR_NRF_MODULE_DIR}/samples/bootloader)

ExternalZephyrProject_Add(
# APPLICATION ${SB_CONFIG_SECURE_BOOT_IMAGE_NAME}
APPLICATION b0
# ToDo: which sample is used as secure boot sample in other cases ?
SOURCE_DIR ${secure_boot_source_dir}
Expand Down Expand Up @@ -88,7 +86,7 @@ endif()
endif()

set_property(GLOBAL APPEND PROPERTY
PM_${SB_CONFIG_SECURE_BOOT_DOMAIN}_IMAGES
PM_APP_IMAGES
"${image}"
)
endif()
Expand Down

0 comments on commit 9fdd7fe

Please sign in to comment.