Skip to content

Commit

Permalink
applications/samples/tests/sysbuild: Fix board revision usage
Browse files Browse the repository at this point in the history
Fixes uses of sysbuild projects being added which did not use the
BOARD_REVISION option properly

Signed-off-by: Jamie McCrae <[email protected]>
  • Loading branch information
nordicjm committed Jul 10, 2024
1 parent 41f88be commit 44c65d2
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 17 deletions.
1 change: 1 addition & 0 deletions applications/machine_learning/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if(SB_CONFIG_ML_APP_INCLUDE_REMOTE_IMAGE AND DEFINED SB_CONFIG_ML_APP_REMOTE_BOA
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_ML_APP_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)

if(SB_CONFIG_PARTITION_MANAGER)
Expand Down
1 change: 1 addition & 0 deletions samples/caf_sensor_manager/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)

if(SB_CONFIG_PARTITION_MANAGER)
Expand Down
1 change: 1 addition & 0 deletions samples/event_manager_proxy/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES remote)
Expand Down
1 change: 1 addition & 0 deletions samples/ipc/ipc_service/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES remote)
Expand Down
9 changes: 2 additions & 7 deletions sysbuild/netcore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@ if(SB_CONFIG_SUPPORT_NETCORE AND NOT SB_CONFIG_NETCORE_NONE AND DEFINED SB_CONFI
string(REPLACE "/" ";" split_board_qualifiers "${BOARD_QUALIFIERS}")
list(GET split_board_qualifiers 1 target_soc)
list(GET split_board_qualifiers 2 target_cpucluster)

if(DEFINED BOARD_REVISION)
set(board_target_netcore "${BOARD}@${BOARD_REVISION}/${target_soc}/${SB_CONFIG_NETCORE_REMOTE_BOARD_TARGET_CPUCLUSTER}")
else()
set(board_target_netcore "${BOARD}/${target_soc}/${SB_CONFIG_NETCORE_REMOTE_BOARD_TARGET_CPUCLUSTER}")
endif()

set(board_target_netcore "${BOARD}/${target_soc}/${SB_CONFIG_NETCORE_REMOTE_BOARD_TARGET_CPUCLUSTER}")
set(target_soc)
set(target_cpucluster)

ExternalZephyrProject_Add(
APPLICATION ${SB_CONFIG_NETCORE_IMAGE_NAME}
SOURCE_DIR ${SB_CONFIG_NETCORE_IMAGE_PATH}
BOARD ${board_target_netcore}
BOARD_REVISION ${BOARD_REVISION}
)

if(NOT "${SB_CONFIG_NETCORE_IMAGE_DOMAIN}" IN_LIST PM_DOMAINS)
Expand Down
7 changes: 2 additions & 5 deletions sysbuild/secureboot.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ if(SB_CONFIG_SECURE_BOOT)
list(GET split_board_qualifiers 1 target_soc)
list(GET split_board_qualifiers 2 target_cpucluster)

if(DEFINED BOARD_REVISION)
set(board_target_netcore "${BOARD}@${BOARD_REVISION}/${target_soc}/${SB_CONFIG_SECURE_BOOT_NETWORK_BOARD_TARGET_CPUCLUSTER}")
else()
set(board_target_netcore "${BOARD}/${target_soc}/${SB_CONFIG_SECURE_BOOT_NETWORK_BOARD_TARGET_CPUCLUSTER}")
endif()
set(board_target_netcore "${BOARD}/${target_soc}/${SB_CONFIG_SECURE_BOOT_NETWORK_BOARD_TARGET_CPUCLUSTER}")

set(target_soc)
set(target_cpucluster)
Expand All @@ -26,6 +22,7 @@ if(SB_CONFIG_SECURE_BOOT)
APPLICATION b0n
SOURCE_DIR ${secure_boot_source_dir}
BOARD ${board_target_netcore}
BOARD_REVISION ${BOARD_REVISION}
BUILD_ONLY true
)
set_target_properties(b0n PROPERTIES
Expand Down
7 changes: 2 additions & 5 deletions sysbuild/suit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ if(SB_CONFIG_SUIT_BUILD_FLASH_COMPANION)
list(GET split_board_qualifiers 1 target_soc)
list(GET split_board_qualifiers 2 target_cpucluster)

if(DEFINED BOARD_REVISION)
set(board_target "${BOARD}@${BOARD_REVISION}/${target_soc}/${SB_CONFIG_FLASH_COMPANION_TARGET_CPUCLUSTER}")
else()
set(board_target "${BOARD}/${target_soc}/${SB_CONFIG_FLASH_COMPANION_TARGET_CPUCLUSTER}")
endif()
set(board_target "${BOARD}/${target_soc}/${SB_CONFIG_FLASH_COMPANION_TARGET_CPUCLUSTER}")

ExternalZephyrProject_Add(
APPLICATION flash_companion
SOURCE_DIR "${ZEPHYR_NRF_MODULE_DIR}/samples/suit/flash_companion"
BOARD ${board_target}
BOARD_REVISION ${BOARD_REVISION}
)
endif()
1 change: 1 addition & 0 deletions tests/benchmarks/multicore/idle/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES remote)
Expand Down
1 change: 1 addition & 0 deletions tests/subsys/event_manager_proxy/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ExternalZephyrProject_Add(
APPLICATION remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES remote)
Expand Down
1 change: 1 addition & 0 deletions tests/subsys/pcd/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ExternalZephyrProject_Add(
APPLICATION hello_world
SOURCE_DIR ${ZEPHYR_BASE}/samples/hello_world
BOARD ${SB_CONFIG_REMOTE_BOARD}
BOARD_REVISION ${BOARD_REVISION}
)

set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES hello_world)
Expand Down

0 comments on commit 44c65d2

Please sign in to comment.