diff --git a/cmake/sysbuild/suit.cmake b/cmake/sysbuild/suit.cmake index 33ebce99b34a..c70c1e8bfaf4 100644 --- a/cmake/sysbuild/suit.cmake +++ b/cmake/sysbuild/suit.cmake @@ -165,6 +165,11 @@ function(suit_create_package) suit_set_absolute_or_relative_path(${SB_CONFIG_SUIT_ENVELOPE_EDITABLE_TEMPLATES_LOCATION} ${PROJECT_BINARY_DIR} INPUT_TEMPLATES_DIRECTORY) set(ENVELOPE_SHALL_BE_SIGNED ${SB_CONFIG_SUIT_ENVELOPE_SIGN}) + if(NOT DEFINED west_realpath) + # Twister build - ignore and store in the build folder! + set(SB_CONFIG_SUIT_ENVELOPE_EDITABLE_TEMPLATES_LOCATION "./") + endif() + sysbuild_get(ENVELOPE_SHALL_BE_SIGNED IMAGE ${DEFAULT_IMAGE} VAR CONFIG_SUIT_ENVELOPE_SIGN KCONFIG) if(NOT DEFINED ENVELOPE_SHALL_BE_SIGNED) set(ENVELOPE_SHALL_BE_SIGNED FALSE) endif() @@ -202,9 +207,14 @@ function(suit_create_package) unset(GENERATE_LOCAL_ENVELOPE) sysbuild_get(INPUT_ENVELOPE_JINJA_FILE IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_TEMPLATE KCONFIG) - sysbuild_get(target IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_TARGET KCONFIG) suit_set_absolute_or_relative_path(${INPUT_ENVELOPE_JINJA_FILE} ${PROJECT_BINARY_DIR} INPUT_ENVELOPE_JINJA_FILE) - + sysbuild_get(target IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_TARGET KCONFIG) + sysbuild_get(BINARY_DIR IMAGE ${image} VAR APPLICATION_BINARY_DIR CACHE) + sysbuild_get(BINARY_FILE IMAGE ${image} VAR CONFIG_KERNEL_BIN_NAME KCONFIG) + if (NOT DEFINED INPUT_ENVELOPE_JINJA_FILE OR INPUT_ENVELOPE_JINJA_FILE STREQUAL "") + message(STATUS "DFU: Input SUIT template for ${image} is not defined. Skipping.") + continue() + endif() suit_copy_input_template(${INPUT_TEMPLATES_DIRECTORY} "${INPUT_ENVELOPE_JINJA_FILE}" ENVELOPE_JINJA_FILE) if(NOT DEFINED ENVELOPE_JINJA_FILE) message(SEND_ERROR "DFU: Creation of SUIT artifacts failed.") @@ -223,6 +233,7 @@ function(suit_create_package) endforeach() set(INPUT_ROOT_ENVELOPE_JINJA_FILE ${SB_CONFIG_SUIT_ENVELOPE_ROOT_TEMPLATE}) + suit_set_absolute_or_relative_path(${INPUT_ROOT_ENVELOPE_JINJA_FILE} ${PROJECT_BINARY_DIR} INPUT_ROOT_ENVELOPE_JINJA_FILE) # create root envelope if defined if(DEFINED INPUT_ROOT_ENVELOPE_JINJA_FILE AND NOT INPUT_ROOT_ENVELOPE_JINJA_FILE STREQUAL "") @@ -287,6 +298,10 @@ function(suit_setup_merge) sysbuild_get(IMAGE_BINARY_DIR IMAGE ${image} VAR APPLICATION_BINARY_DIR CACHE) sysbuild_get(IMAGE_BINARY_FILE IMAGE ${image} VAR CONFIG_KERNEL_BIN_NAME KCONFIG) sysbuild_get(IMAGE_TARGET_NAME IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_TARGET KCONFIG) + if (NOT DEFINED IMAGE_TARGET_NAME OR IMAGE_TARGET_NAME STREQUAL "") + message(STATUS "DFU: Target name for ${image} is not defined. Skipping.") + continue() + endif() sysbuild_get(CONFIG_SUIT_ENVELOPE_OUTPUT_ARTIFACT IMAGE ${image} VAR CONFIG_SUIT_ENVELOPE_OUTPUT_ARTIFACT KCONFIG) sysbuild_get(CONFIG_NRF_REGTOOL_GENERATE_UICR IMAGE ${image} VAR CONFIG_NRF_REGTOOL_GENERATE_UICR KCONFIG) diff --git a/subsys/suit/provisioning/Kconfig b/subsys/suit/provisioning/Kconfig index 9199b64fe013..3d5e0ab7dd2c 100644 --- a/subsys/suit/provisioning/Kconfig +++ b/subsys/suit/provisioning/Kconfig @@ -8,6 +8,7 @@ menu "SUIT provisioning" config SUIT_MPI_GENERATE bool "Generate SUIT Manifest Provisioning Information binary" + default y if SOC_SERIES_NRF54HX if SUIT_MPI_GENERATE diff --git a/sysbuild/Kconfig.suit b/sysbuild/Kconfig.suit index 05ccccaceec1..06dca1ca9b69 100644 --- a/sysbuild/Kconfig.suit +++ b/sysbuild/Kconfig.suit @@ -6,9 +6,9 @@ menu "SUIT" -# 'default y if SOC_SERIES_NRF54HX' to be added when SUIT is to be enabled globally. menuconfig SUIT_ENVELOPE bool "Create SUIT envelope" + default y if SOC_SERIES_NRF54HX help Enable DFU SUIT envelope creation diff --git a/west.yml b/west.yml index 04ae4c9879dd..fe82641e13c1 100644 --- a/west.yml +++ b/west.yml @@ -239,7 +239,7 @@ manifest: upstream-sha: c6eaeda5a1c1c5dbb24dce7e027340cb8893a77b compare-by-default: false - name: suit-generator - revision: 93f1fbba4283da95479cafb7e59b7fea11cbda07 + revision: 72e873da8201d8f48e2821ee0ae1b076e081cc5d path: modules/lib/suit-generator - name: suit-processor revision: dcb84006795fe99b497e044f3435988d206ac177