From 3b2b68c47f0ede03bbfdb1f0529e1ce607574732 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 24 Jan 2025 09:59:40 +0000 Subject: [PATCH 1/2] suit: Fix Kconfig issues Fixes various styling issues with Kconfig files and changes Kconfig option names that duplicate information which is already known which would lead to more unselectable Kconfig options in future for additional SoCs, lessening the complexity and maintenance burden. Also fixes an issue that was completely hidden whereby an existing Zephyr Kconfig was re-defined, completely obscuring the fact that the original Zephyr Kconfig was removed in 4.0 and had been doing nothing since the upmerge to that version of Zephyr Signed-off-by: Jamie McCrae --- subsys/suit/cache/Kconfig | 6 +++--- subsys/suit/mci/CMakeLists.txt | 2 ++ subsys/suit/mci/Kconfig | 7 +++---- subsys/suit/memptr_storage/Kconfig | 7 ++++--- subsys/suit/platform/Kconfig | 13 +++++++------ subsys/suit/storage/CMakeLists.txt | 9 +++++++-- subsys/suit/storage/Kconfig | 19 ++++++++++++++----- subsys/suit/stream/Kconfig | 8 ++++++-- subsys/suit/validator/CMakeLists.txt | 5 ++++- subsys/suit/validator/Kconfig | 15 ++++++++++----- 10 files changed, 60 insertions(+), 31 deletions(-) diff --git a/subsys/suit/cache/Kconfig b/subsys/suit/cache/Kconfig index cbc350eca4ef..46a495cdc842 100644 --- a/subsys/suit/cache/Kconfig +++ b/subsys/suit/cache/Kconfig @@ -15,11 +15,11 @@ if SUIT_CACHE config SUIT_CACHE_MAX_CACHES int "The maximum number of caches that will be handled" range 1 16 + default 8 help The maximum number of user-defined caches is limited to 15. User defined cache partitions names start at index 1 as suit_cache_0 is predefined. The default value is 8, and the minimum is 1. - default 8 config APP_LINK_WITH_SUIT_CACHE_INTERFACE bool @@ -30,8 +30,8 @@ config SUIT_MAX_URI_LENGTH range 1 512 default 128 help - This option determines the longest URI that can be read or written from - the cache. + This option determines the longest URI that can be read or written from + the cache. config SUIT_CACHE_RW bool "Enable write mode for SUIT cache" diff --git a/subsys/suit/mci/CMakeLists.txt b/subsys/suit/mci/CMakeLists.txt index 7cfc6eb3d238..2e0236e3c05c 100644 --- a/subsys/suit/mci/CMakeLists.txt +++ b/subsys/suit/mci/CMakeLists.txt @@ -11,9 +11,11 @@ target_link_libraries(suit_mci INTERFACE suit_platform_err) target_link_libraries(suit_mci INTERFACE suit_metadata) zephyr_library() + if(CONFIG_SUIT_MCI_IMPL_SDFW) zephyr_library_sources(src/suit_mci_${CONFIG_SOC}.c) endif() + zephyr_library_sources(src/suit_generic_ids.c) zephyr_library_link_libraries(suit_mci) diff --git a/subsys/suit/mci/Kconfig b/subsys/suit/mci/Kconfig index 99a681f37032..6fe8fd51d4c4 100644 --- a/subsys/suit/mci/Kconfig +++ b/subsys/suit/mci/Kconfig @@ -13,7 +13,7 @@ if SUIT_MCI config SUPPORT_SUIT_MCI_IMPL_SDFW bool - default y if SOC_SERIES_NRF54HX + default y if SOC_SERIES_NRF54HX && SUIT_PLATFORM_VARIANT_SDFW choice SUIT_MCI_IMPL prompt "MCI implementation" @@ -22,12 +22,11 @@ choice SUIT_MCI_IMPL config SUIT_MCI_IMPL_SDFW bool "Secure domain" - depends on SUIT_PLATFORM_VARIANT_SDFW depends on SUPPORT_SUIT_MCI_IMPL_SDFW config SUIT_MCI_IMPL_CUSTOM - bool "custom" + bool "Custom" -endchoice #MCI implementation +endchoice # SUIT_MCI_IMPL endif # SUIT_MCI diff --git a/subsys/suit/memptr_storage/Kconfig b/subsys/suit/memptr_storage/Kconfig index 9cd00b242cd6..c6877b860fbb 100644 --- a/subsys/suit/memptr_storage/Kconfig +++ b/subsys/suit/memptr_storage/Kconfig @@ -12,9 +12,10 @@ if SUIT_MEMPTR_STORAGE config SUIT_MAX_NUMBER_OF_INTEGRATED_PAYLOADS int "The maximum number of envelope reference components that will be handled" range 0 255 - help - Index is of type uint8_t, which restricts number of components of this type to 255. - Default value is 8 and minimal 0. Where 0 means that Envelope Reference component is disabled. default 8 + help + Index is of type uint8_t, which restricts number of components of this type to 255. + Default value is 8 and minimal 0. Where 0 means that Envelope Reference component is + disabled. endif # SUIT_MEMPTR_STORAGE diff --git a/subsys/suit/platform/Kconfig b/subsys/suit/platform/Kconfig index e56bfbeac105..5a00feb91ac3 100644 --- a/subsys/suit/platform/Kconfig +++ b/subsys/suit/platform/Kconfig @@ -23,19 +23,22 @@ config SUIT_DIGEST depends on SUIT_STREAM_SINK_DIGEST config MAX_NUMBER_OF_MANIFEST_CLASS_IDS - int "Maximum number of supported manifest class IDs that can be handled" + int "Maximum number of supported manifest class IDs that can be handled" range 1 200 default 11 if SOC_SERIES_NRF54HX default 5 if SOC_NRF52840 default 5 if SOC_POSIX help - Check SUIT_STORAGE_N_ENVELOPES + Check SUIT_STORAGE_N_ENVELOPES if SUIT_PLATFORM_VARIANT_SDFW + rsource "sdfw/Kconfig" + endif # SUIT_PLATFORM_VARIANT_SDFW rsource "sink_selector/Kconfig" + endif # SUIT_PLATFORM config SUIT_CRYPTO @@ -51,17 +54,14 @@ config SUIT_CRYPTO select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE imply PSA_WANT_ECC_TWISTED_EDWARDS_255 - if MBEDTLS && SOC_POSIX # Make sure that PSA API compatibility layer is enabled config MBEDTLS_PSA_CRYPTO_C - bool default y # Instruct mbedTLS to use Zephyr entropy -config MBEDTLS_ZEPHYR_ENTROPY - bool +config MBEDTLS_ENTROPY_POLL_ZEPHYR default y config SUIT_DEFAULT_MBEDTLS_CONFIG @@ -71,6 +71,7 @@ config SUIT_DEFAULT_MBEDTLS_CONFIG config MBEDTLS_USER_CONFIG_FILE default "user-tls-conf.h" if SUIT_DEFAULT_MBEDTLS_CONFIG + endif config SUIT_CHECK_IMAGE_MATCH diff --git a/subsys/suit/storage/CMakeLists.txt b/subsys/suit/storage/CMakeLists.txt index 768285d7b190..09828603a801 100644 --- a/subsys/suit/storage/CMakeLists.txt +++ b/subsys/suit/storage/CMakeLists.txt @@ -11,8 +11,13 @@ target_link_libraries(suit_storage_interface INTERFACE suit_platform_err) target_link_libraries(suit_storage_interface INTERFACE suit_utils) zephyr_library() -zephyr_library_sources_ifdef(CONFIG_SUIT_STORAGE_LAYOUT_TEST src/suit_storage_test.c) -zephyr_library_sources_ifdef(CONFIG_SUIT_STORAGE_LAYOUT_NRF54H20 src/suit_storage_nrf54h20.c) + +if(CONFIG_SUIT_STORAGE_LAYOUT_SOC) + zephyr_library_sources(src/suit_storage_${CONFIG_SOC}.c) +elseif(CONFIG_SUIT_STORAGE_LAYOUT_TEST) + zephyr_library_sources(src/suit_storage_test.c) +endif() + zephyr_library_sources(src/suit_storage_update.c) zephyr_library_sources(src/suit_storage_encode.c) zephyr_library_sources(src/suit_storage_envelope.c) diff --git a/subsys/suit/storage/Kconfig b/subsys/suit/storage/Kconfig index 8690d7497360..442b6fad271d 100644 --- a/subsys/suit/storage/Kconfig +++ b/subsys/suit/storage/Kconfig @@ -15,17 +15,26 @@ menuconfig SUIT_STORAGE if SUIT_STORAGE +config SUPPORT_SUIT_STORAGE_LAYOUT_SOC + bool + default y if SOC_SERIES_NRF54HX + +config SUPPORT_SUIT_STORAGE_LAYOUT_TEST + bool + choice SUIT_STORAGE_LAYOUT prompt "MCU-specific layout of the SUIT storage" - default SUIT_STORAGE_LAYOUT_NRF54H20 if SOC_SERIES_NRF54HX - default SUIT_STORAGE_LAYOUT_TEST if !SOC_SERIES_NRF54HX + default SUIT_STORAGE_LAYOUT_SOC if SUPPORT_SUIT_STORAGE_LAYOUT_SOC + default SUIT_STORAGE_LAYOUT_TEST if SUPPORT_SUIT_STORAGE_LAYOUT_TEST -config SUIT_STORAGE_LAYOUT_NRF54H20 - bool "nRF54H20" +config SUIT_STORAGE_LAYOUT_SOC + bool "SoC default" + depends on SUPPORT_SUIT_STORAGE_LAYOUT_SOC select PSA_WANT_ALG_SHA_256 if SUIT_CRYPTO config SUIT_STORAGE_LAYOUT_TEST - bool "tests" + bool "Tests" + depends on SUPPORT_SUIT_STORAGE_LAYOUT_TEST help Configuration to be used for running SUIT tests diff --git a/subsys/suit/stream/Kconfig b/subsys/suit/stream/Kconfig index 50bf9b00a5f7..058b67827ffd 100644 --- a/subsys/suit/stream/Kconfig +++ b/subsys/suit/stream/Kconfig @@ -121,9 +121,11 @@ config SUIT_STREAM_SINK_DIGEST imply PSA_WANT_ALG_SHA_512 if SOC_FAMILY_NORDIC_NRF if SUIT_STREAM_SINK_DIGEST - config SUIT_STREAM_SINK_DIGEST_CONTEXT_COUNT + +config SUIT_STREAM_SINK_DIGEST_CONTEXT_COUNT int "Maximum number of contexts" default 1 + endif # SUIT_STREAM_SINK_DIGEST config SUIT_STREAM_SOURCE_CACHE @@ -166,9 +168,11 @@ config SUIT_STREAM_IPC_PROVIDER depends on SUIT_STREAM_FETCH_SOURCE_MGR config SUIT_STREAM_IPC_PROVIDER_BUFFERS - int "The number of buffers supported by provider. For optimal performance should be equal to CONFIG_SUIT_STREAM_IPC_REQUESTOR_MAX_CHUNKS" + int "The number of buffers supported by provider" default 3 depends on SUIT_STREAM_IPC_PROVIDER + help + For optimal performance should be equal to CONFIG_SUIT_STREAM_IPC_REQUESTOR_MAX_CHUNKS config SUIT_STREAM_IPC_PROVIDER_BUFFER_SIZE int "Size of single buffer in bytes" diff --git a/subsys/suit/validator/CMakeLists.txt b/subsys/suit/validator/CMakeLists.txt index ad1ea4da498d..3346d05b8805 100644 --- a/subsys/suit/validator/CMakeLists.txt +++ b/subsys/suit/validator/CMakeLists.txt @@ -10,7 +10,10 @@ target_include_directories(suit_validator INTERFACE include) target_link_libraries(suit_validator INTERFACE suit_platform_err) zephyr_library() -zephyr_library_sources_ifdef(CONFIG_SUIT_VALIDATOR_IMPL_NRF54H20_SDFW src/suit_validator_nrf54h20.c) + +if(CONFIG_SUIT_VALIDATOR_IMPL_SDFW) + zephyr_library_sources(src/suit_validator_${CONFIG_SOC}.c) +endif() zephyr_library_link_libraries(suit_validator) zephyr_library_link_libraries(suit_memory_layout_interface) diff --git a/subsys/suit/validator/Kconfig b/subsys/suit/validator/Kconfig index 8ff7d72be768..550a151a8884 100644 --- a/subsys/suit/validator/Kconfig +++ b/subsys/suit/validator/Kconfig @@ -10,16 +10,21 @@ menuconfig SUIT_VALIDATOR if SUIT_VALIDATOR +config SUPPORT_SUIT_VALIDATOR_IMPL_SDFW + bool + default y if SOC_SERIES_NRF54HX && SUIT_PLATFORM_VARIANT_SDFW + choice SUIT_VALIDATOR_IMPL prompt "SUIT validator implementation" + default SUIT_VALIDATOR_IMPL_SDFW if SUPPORT_SUIT_VALIDATOR_IMPL_SDFW + default SUIT_VALIDATOR_IMPL_CUSTOM -config SUIT_VALIDATOR_IMPL_NRF54H20_SDFW - bool "nRF54H20: Secure domain" - depends on SOC_SERIES_NRF54HX - depends on SUIT_PLATFORM_VARIANT_SDFW +config SUIT_VALIDATOR_IMPL_SDFW + bool "Secure domain" + depends on SUPPORT_SUIT_VALIDATOR_IMPL_SDFW config SUIT_VALIDATOR_IMPL_CUSTOM - bool "custom" + bool "Custom" endchoice # SUIT_VALIDATOR_IMPL From 7412166cbd009daedc1e8389ecbcb2172733a51e Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 24 Jan 2025 10:01:52 +0000 Subject: [PATCH 2/2] tests: Update SUIT Kconfig usage Updates to use new Kconfig symbol names, and enables usage of the test Kconfig only in tests to prevent accidental selection by users where it should not be able to be selected Signed-off-by: Jamie McCrae --- .../suit/cache_pool_digest/CMakeLists.txt | 1 - tests/subsys/suit/check_content/Kconfig | 9 ++++ tests/subsys/suit/check_image_match/Kconfig | 9 ++++ tests/subsys/suit/common/CMakeLists.txt | 54 +++++++++---------- .../CMakeLists.txt | 4 +- .../component_compatibility_check/prj.conf | 2 - tests/subsys/suit/copy/Kconfig | 1 + tests/subsys/suit/digest_sink/CMakeLists.txt | 3 +- tests/subsys/suit/envelope_decoder/Kconfig | 9 ++++ .../fetch_integrated_payload_flash/Kconfig | 9 ++++ tests/subsys/suit/flash_sink/CMakeLists.txt | 2 +- tests/subsys/suit/manifest_variables/Kconfig | 1 + .../orchestrator_app/CMakeLists.txt | 1 + .../orchestrator/orchestrator_sdfw/Kconfig | 9 ++++ .../orchestrator_sdfw_nrf54h20/CMakeLists.txt | 6 +++ .../orchestrator_sdfw_nrf54h20/prj.conf | 2 +- tests/subsys/suit/storage/Kconfig | 9 ++++ .../suit/storage_nrf54h20/CMakeLists.txt | 9 ++++ tests/subsys/suit/storage_nrf54h20/prj.conf | 2 - tests/subsys/suit/tests/Kconfig | 7 +++ tests/subsys/suit/tests/sdfw/Kconfig | 9 ++++ tests/subsys/suit/write/Kconfig | 1 + 22 files changed, 122 insertions(+), 37 deletions(-) create mode 100644 tests/subsys/suit/check_content/Kconfig create mode 100644 tests/subsys/suit/check_image_match/Kconfig create mode 100644 tests/subsys/suit/envelope_decoder/Kconfig create mode 100644 tests/subsys/suit/fetch_integrated_payload_flash/Kconfig create mode 100644 tests/subsys/suit/orchestrator/orchestrator_sdfw/Kconfig create mode 100644 tests/subsys/suit/storage/Kconfig create mode 100644 tests/subsys/suit/tests/Kconfig create mode 100644 tests/subsys/suit/tests/sdfw/Kconfig diff --git a/tests/subsys/suit/cache_pool_digest/CMakeLists.txt b/tests/subsys/suit/cache_pool_digest/CMakeLists.txt index d6c3d57e2f5f..4af58f99159c 100644 --- a/tests/subsys/suit/cache_pool_digest/CMakeLists.txt +++ b/tests/subsys/suit/cache_pool_digest/CMakeLists.txt @@ -11,7 +11,6 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(integration_test_cache_pool_digest) include(../cmake/test_template.cmake) - zephyr_library_link_libraries(suit_stream_sinks_interface) zephyr_library_link_libraries(suit_utils) zephyr_library_link_libraries(suit_platform_interface) diff --git a/tests/subsys/suit/check_content/Kconfig b/tests/subsys/suit/check_content/Kconfig new file mode 100644 index 000000000000..73e2e9f904a1 --- /dev/null +++ b/tests/subsys/suit/check_content/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/check_image_match/Kconfig b/tests/subsys/suit/check_image_match/Kconfig new file mode 100644 index 000000000000..73e2e9f904a1 --- /dev/null +++ b/tests/subsys/suit/check_image_match/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/common/CMakeLists.txt b/tests/subsys/suit/common/CMakeLists.txt index c3328734b8f1..8bbe10aa5640 100644 --- a/tests/subsys/suit/common/CMakeLists.txt +++ b/tests/subsys/suit/common/CMakeLists.txt @@ -9,35 +9,35 @@ add_subdirectory(validator_test) add_subdirectory_ifdef(CONFIG_SUIT_STREAM_FILTER_DECRYPT decrypt_utils) zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/include) -if (CONFIG_MBEDTLS) -if (CONFIG_SUIT_PLATFORM) -# Link SUIT platform (incl. crypto) module with mbedTLS library, that provides PSA crypto APIs. -target_link_libraries(suit_platform_interface INTERFACE mbedTLS) -endif() # CONFIG_SUIT_PLATFORM - -if (CONFIG_SUIT_STREAM_SINK_DIGEST) -target_link_libraries(suit_stream_sinks_interface INTERFACE mbedTLS) +if(CONFIG_MBEDTLS) + if(CONFIG_SUIT_PLATFORM) + # Link SUIT platform (incl. crypto) module with mbedTLS library, that provides PSA crypto APIs. + target_link_libraries(suit_platform_interface INTERFACE mbedTLS) + endif() + + if(CONFIG_SUIT_STREAM_SINK_DIGEST) + target_link_libraries(suit_stream_sinks_interface INTERFACE mbedTLS) + endif() + + if(CONFIG_SUIT_STREAM_FILTER_DECRYPT) + target_link_libraries(suit_stream_filters_interface INTERFACE mbedTLS) + target_link_libraries(suit_decrypt_test_utils PUBLIC mbedTLS) + endif() + + if(CONFIG_SUIT_STORAGE_LAYOUT_SOC) + target_link_libraries(suit_storage_interface INTERFACE mbedTLS) + endif() + + # Fix the mbedTLS build scripts: + # The "mbedtls/library/psa_crypto_cipher.c" file includes "", + # but this header is not a part of mbedTLS public API, thus it is not found and + # the compiler reports this as an error. + target_include_directories(mbedTLS INTERFACE ${ZEPHYR_MBEDTLS_MODULE_DIR}/library) endif() -if (CONFIG_SUIT_STREAM_FILTER_DECRYPT) -target_link_libraries(suit_stream_filters_interface INTERFACE mbedTLS) -target_link_libraries(suit_decrypt_test_utils PUBLIC mbedTLS) -endif() - -if (CONFIG_SUIT_STORAGE_LAYOUT_NRF54H20) -target_link_libraries(suit_storage_interface INTERFACE mbedTLS) -endif() - -# Fix the mbedTLS build scripts: -# The "mbedtls/library/psa_crypto_cipher.c" file includes "", -# but this header is not a part of mbedTLS public API, thus it is not found and -# the compiler reports this as an error. -target_include_directories(mbedTLS INTERFACE ${ZEPHYR_MBEDTLS_MODULE_DIR}/library) -endif() - -if (CONFIG_SUIT_DEFAULT_MBEDTLS_CONFIG) -# Add include path for the default, customized mbedTLS configuration header. -zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/tls_config) +if(CONFIG_SUIT_DEFAULT_MBEDTLS_CONFIG) + # Add include path for the default, customized mbedTLS configuration header. + zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/tls_config) endif() zephyr_interface_library_named(suit_update_magic_values) diff --git a/tests/subsys/suit/component_compatibility_check/CMakeLists.txt b/tests/subsys/suit/component_compatibility_check/CMakeLists.txt index b76d34956a56..78d84e236899 100644 --- a/tests/subsys/suit/component_compatibility_check/CMakeLists.txt +++ b/tests/subsys/suit/component_compatibility_check/CMakeLists.txt @@ -12,13 +12,15 @@ project(integration_suit_component_compatibility_check) include(../cmake/test_template.cmake) target_include_directories(app PRIVATE - ${SUIT_SUBSYS_DIR}/mci//include + ${SUIT_SUBSYS_DIR}/mci/include + ${SUIT_SUBSYS_DIR}/storage/include ) target_sources(app PRIVATE # Use nRF54H20-specific MCI implementation. ${SUIT_SUBSYS_DIR}/mci/src/suit_mci_nrf54h20.c ${SUIT_SUBSYS_DIR}/platform/sdfw/src/suit_plat_component_compatibility.c + ${SUIT_SUBSYS_DIR}/storage/src/suit_storage_nrf54h20.c ) # Link with the CMake target, that includes SUIT platform internal APIs header diff --git a/tests/subsys/suit/component_compatibility_check/prj.conf b/tests/subsys/suit/component_compatibility_check/prj.conf index 65bd9712b236..269709c9d44d 100644 --- a/tests/subsys/suit/component_compatibility_check/prj.conf +++ b/tests/subsys/suit/component_compatibility_check/prj.conf @@ -15,9 +15,7 @@ CONFIG_SUIT_MEMPTR_STORAGE=y CONFIG_SUIT_PLATFORM=y CONFIG_SUIT_PLATFORM_VARIANT_SDFW=y -# Force SUIT storage memory layout to match nRF54H20-specific implementation. CONFIG_SUIT_STORAGE=y -CONFIG_SUIT_STORAGE_LAYOUT_NRF54H20=y CONFIG_SUIT_METADATA=y # nRF54H20 storage uses SHA-256 to protect MPI and NVVs: CONFIG_SUIT_CRYPTO=y diff --git a/tests/subsys/suit/copy/Kconfig b/tests/subsys/suit/copy/Kconfig index 3f9efe4e184e..8edc11bd7cde 100644 --- a/tests/subsys/suit/copy/Kconfig +++ b/tests/subsys/suit/copy/Kconfig @@ -6,5 +6,6 @@ # Include and define MOCK_* Kconfigs rsource "../mocks/Kconfig" +rsource "../tests/Kconfig" source "Kconfig.zephyr" diff --git a/tests/subsys/suit/digest_sink/CMakeLists.txt b/tests/subsys/suit/digest_sink/CMakeLists.txt index 55d71aa1f1cb..57fbf73ebef9 100644 --- a/tests/subsys/suit/digest_sink/CMakeLists.txt +++ b/tests/subsys/suit/digest_sink/CMakeLists.txt @@ -11,6 +11,5 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(integration_test_suit_digest_sink) include(../cmake/test_template.cmake) - -# link with the cmake target, that includes suit platform internal apis header +# Link with the CMake target, that includes suit platform internal apis header zephyr_library_link_libraries(suit_stream_sinks_interface) diff --git a/tests/subsys/suit/envelope_decoder/Kconfig b/tests/subsys/suit/envelope_decoder/Kconfig new file mode 100644 index 000000000000..73e2e9f904a1 --- /dev/null +++ b/tests/subsys/suit/envelope_decoder/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/fetch_integrated_payload_flash/Kconfig b/tests/subsys/suit/fetch_integrated_payload_flash/Kconfig new file mode 100644 index 000000000000..73e2e9f904a1 --- /dev/null +++ b/tests/subsys/suit/fetch_integrated_payload_flash/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/flash_sink/CMakeLists.txt b/tests/subsys/suit/flash_sink/CMakeLists.txt index feff47afe6bc..6c987ea271a1 100644 --- a/tests/subsys/suit/flash_sink/CMakeLists.txt +++ b/tests/subsys/suit/flash_sink/CMakeLists.txt @@ -11,6 +11,6 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(integration_test_flash_sink) include(../cmake/test_template.cmake) -# link with the cmake target, that includes suit platform internal apis header +# Link with the CMake target, that includes suit platform internal apis header zephyr_library_link_libraries(suit_utils) zephyr_library_link_libraries(suit_stream_sinks_interface) diff --git a/tests/subsys/suit/manifest_variables/Kconfig b/tests/subsys/suit/manifest_variables/Kconfig index 3f9efe4e184e..8edc11bd7cde 100644 --- a/tests/subsys/suit/manifest_variables/Kconfig +++ b/tests/subsys/suit/manifest_variables/Kconfig @@ -6,5 +6,6 @@ # Include and define MOCK_* Kconfigs rsource "../mocks/Kconfig" +rsource "../tests/Kconfig" source "Kconfig.zephyr" diff --git a/tests/subsys/suit/orchestrator/orchestrator_app/CMakeLists.txt b/tests/subsys/suit/orchestrator/orchestrator_app/CMakeLists.txt index 2f1ca8b7b757..4235c10713b2 100644 --- a/tests/subsys/suit/orchestrator/orchestrator_app/CMakeLists.txt +++ b/tests/subsys/suit/orchestrator/orchestrator_app/CMakeLists.txt @@ -18,6 +18,7 @@ target_sources(app PRIVATE # Link with the CMake target, that includes SUIT platform internal APIs header zephyr_library_link_libraries(suit_utils) + if(CONFIG_TESTS_SUIT_ORCHESTRATOR_APP_FULL_PROCESSING) zephyr_library_link_libraries(suit_cache_interface) zephyr_library_link_libraries(suit_stream_sources_interface) diff --git a/tests/subsys/suit/orchestrator/orchestrator_sdfw/Kconfig b/tests/subsys/suit/orchestrator/orchestrator_sdfw/Kconfig new file mode 100644 index 000000000000..c72d1a41fadf --- /dev/null +++ b/tests/subsys/suit/orchestrator/orchestrator_sdfw/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/CMakeLists.txt b/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/CMakeLists.txt index 611976c33cc2..0a4fcdbac7fa 100644 --- a/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/CMakeLists.txt +++ b/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/CMakeLists.txt @@ -14,6 +14,12 @@ include(../../cmake/test_template.cmake) FILE(GLOB manifest_sources ../manifest/src/*.c) target_sources(app PRIVATE ${manifest_sources} + # Use nRF54H20-specific implementation. + ${SUIT_SUBSYS_DIR}/storage/src/suit_storage_nrf54h20.c + ) + +target_include_directories(app PRIVATE + ${SUIT_SUBSYS_DIR}/storage/include ) # Link with the CMake target, that includes SUIT platform internal APIs header diff --git a/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/prj.conf b/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/prj.conf index 4565f0e944d5..274a6d5c2c3a 100644 --- a/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/prj.conf +++ b/tests/subsys/suit/orchestrator/orchestrator_sdfw_nrf54h20/prj.conf @@ -25,7 +25,7 @@ CONFIG_SUIT_CACHE=y CONFIG_SUIT_CACHE_MAX_CACHES=5 CONFIG_SUIT_STORAGE=y # Force SUIT storage memory layout to match nRF54H20-specific implementation. -CONFIG_SUIT_STORAGE_LAYOUT_NRF54H20=y +CONFIG_SUIT_STORAGE_LAYOUT_SOC=y # nRF54H20 storage uses SHA-256 to protect MPI and NVVs: CONFIG_SUIT_CRYPTO=y CONFIG_SUIT_MEMPTR_STORAGE=y diff --git a/tests/subsys/suit/storage/Kconfig b/tests/subsys/suit/storage/Kconfig new file mode 100644 index 000000000000..73e2e9f904a1 --- /dev/null +++ b/tests/subsys/suit/storage/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "../tests/Kconfig" + +source "Kconfig.zephyr" diff --git a/tests/subsys/suit/storage_nrf54h20/CMakeLists.txt b/tests/subsys/suit/storage_nrf54h20/CMakeLists.txt index 04a4471f1755..eb578226ada0 100644 --- a/tests/subsys/suit/storage_nrf54h20/CMakeLists.txt +++ b/tests/subsys/suit/storage_nrf54h20/CMakeLists.txt @@ -11,6 +11,15 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(integration_test_suit_storage_nrf54h20) include(../cmake/test_template.cmake) +target_include_directories(app PRIVATE + ${SUIT_SUBSYS_DIR}/storage/include +) + +target_sources(app PRIVATE + # Use nRF54H20-specific implementation. + ${SUIT_SUBSYS_DIR}/storage/src/suit_storage_nrf54h20.c +) + # Link with the CMake target, that includes SUIT platform internal APIs header zephyr_library_link_libraries(suit_utils) zephyr_library_link_libraries(suit_storage_interface) diff --git a/tests/subsys/suit/storage_nrf54h20/prj.conf b/tests/subsys/suit/storage_nrf54h20/prj.conf index b57baf2bd685..daa2de6f2bc8 100644 --- a/tests/subsys/suit/storage_nrf54h20/prj.conf +++ b/tests/subsys/suit/storage_nrf54h20/prj.conf @@ -9,8 +9,6 @@ CONFIG_ZTEST=y CONFIG_SUIT=y CONFIG_SUIT_UTILS=y CONFIG_SUIT_STORAGE=y -# Force SUIT storage memory layout to match nRF54H20-specific implementation. -CONFIG_SUIT_STORAGE_LAYOUT_NRF54H20=y CONFIG_SUIT_METADATA=y # nRF54H20 storage uses SHA-256 to protect MPI and NVVs: CONFIG_SUIT_CRYPTO=y diff --git a/tests/subsys/suit/tests/Kconfig b/tests/subsys/suit/tests/Kconfig new file mode 100644 index 000000000000..dd09d80af51a --- /dev/null +++ b/tests/subsys/suit/tests/Kconfig @@ -0,0 +1,7 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +rsource "sdfw/Kconfig" diff --git a/tests/subsys/suit/tests/sdfw/Kconfig b/tests/subsys/suit/tests/sdfw/Kconfig new file mode 100644 index 000000000000..11d329210090 --- /dev/null +++ b/tests/subsys/suit/tests/sdfw/Kconfig @@ -0,0 +1,9 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +config SUPPORT_SUIT_STORAGE_LAYOUT_TEST + default y + depends on SUIT_STORAGE diff --git a/tests/subsys/suit/write/Kconfig b/tests/subsys/suit/write/Kconfig index 3f9efe4e184e..8edc11bd7cde 100644 --- a/tests/subsys/suit/write/Kconfig +++ b/tests/subsys/suit/write/Kconfig @@ -6,5 +6,6 @@ # Include and define MOCK_* Kconfigs rsource "../mocks/Kconfig" +rsource "../tests/Kconfig" source "Kconfig.zephyr"