Skip to content

Commit 77c7c55

Browse files
hakonfamNordicBuilder
authored andcommitted
cmake: skip SUIT if using iron board variant
Ref: NCSDK-NONE Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
1 parent 81c2cb0 commit 77c7c55

File tree

1 file changed

+25
-71
lines changed

1 file changed

+25
-71
lines changed

sysbuild/CMakeLists.txt

+25-71
Original file line numberDiff line numberDiff line change
@@ -461,79 +461,24 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
461461
set_config_bool(mcuboot CONFIG_FW_INFO y)
462462

463463
if(SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256)
464-
if(SB_CONFIG_SOC_SERIES_NRF54LX)
465-
set_config_bool(mcuboot CONFIG_BOOT_ECDSA_TINYCRYPT y)
466-
else()
467-
add_overlay_config(
468-
mcuboot
469-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/external_crypto.conf
470-
)
471-
endif()
464+
add_overlay_config(
465+
mcuboot
466+
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/external_crypto.conf
467+
)
472468
else()
473469
message(WARNING "MCUboot and secure boot (application core) are enabled but MCUboot signing key type is not set to ECDSA-P256, this is a non-optimal configuration")
474470
endif()
475471
else()
476472
set_config_bool(${DEFAULT_IMAGE} CONFIG_SECURE_BOOT y)
477473
set_config_bool(${DEFAULT_IMAGE} CONFIG_FW_INFO y)
478474
endif()
479-
480-
# Apply configuration for hashing
481-
if(SB_CONFIG_SECURE_BOOT_HASH_TYPE_SHA256 AND NOT SB_CONFIG_SECURE_BOOT_APPCORE_HASH_TYPE_NONE)
482-
if(SB_CONFIG_SECURE_BOOT_APPCORE_HASH_TYPE_HARDWARE)
483-
set_config_bool(b0 CONFIG_SB_CRYPTO_CC310_SHA256 y)
484-
elseif(SB_CONFIG_SECURE_BOOT_APPCORE_HASH_TYPE_SOFTWARE)
485-
set_config_bool(b0 CONFIG_SB_CRYPTO_OBERON_SHA256 y)
486-
elseif(SB_CONFIG_SECURE_BOOT_APPCORE_HASH_TYPE_UNUSED)
487-
set_config_bool(b0 CONFIG_SB_CRYPTO_NO_SHA256 y)
488-
endif()
489-
elseif(SB_CONFIG_SECURE_BOOT_HASH_TYPE_NONE OR SB_CONFIG_SECURE_BOOT_APPCORE_HASH_TYPE_NONE)
490-
set_config_bool(b0 CONFIG_SB_CRYPTO_NONE y)
491-
endif()
492-
493-
if(SB_CONFIG_SECURE_BOOT_SIGNATURE_TYPE_ED25519)
494-
if(SB_CONFIG_SECURE_BOOT_APPCORE_SIGNATURE_TYPE_HARDWARE)
495-
set_config_bool(b0 CONFIG_NRF_SECURITY y)
496-
set_config_bool(b0 CONFIG_SB_CRYPTO_PSA_ED25519 y)
497-
endif()
498-
elseif(SB_CONFIG_SECURE_BOOT_SIGNATURE_TYPE_ECDSA)
499-
if(SB_CONFIG_SECURE_BOOT_APPCORE_SIGNATURE_TYPE_HARDWARE)
500-
set_config_bool(b0 CONFIG_SB_CRYPTO_CC310_ECDSA_SECP256R1 y)
501-
elseif(SB_CONFIG_SECURE_BOOT_APPCORE_SIGNATURE_TYPE_SOFTWARE)
502-
set_config_bool(b0 CONFIG_SB_CRYPTO_OBERON_ECDSA_SECP256R1 y)
503-
elseif(SB_CONFIG_SECURE_BOOT_APPCORE_SIGNATURE_TYPE_UNUSED)
504-
set_config_bool(b0 CONFIG_SB_CRYPTO_NO_ECDSA_SECP256R1 y)
505-
endif()
506-
endif()
507-
endif()
508-
509-
if(SB_CONFIG_SECURE_BOOT_BOOTCONF_LOCK_WRITES)
510-
set_config_bool(b0 CONFIG_FPROTECT_ALLOW_COMBINED_REGIONS n)
511475
endif()
512476

513477
if(SB_CONFIG_SECURE_BOOT_NETCORE)
514478
if(NOT SB_CONFIG_NETCORE_NONE)
515479
set_config_bool(${SB_CONFIG_NETCORE_IMAGE_NAME} CONFIG_SECURE_BOOT y)
516480
endif()
517481

518-
# Apply configuration for hashing
519-
if(SB_CONFIG_SECURE_BOOT_HASH_TYPE_SHA256 AND NOT SB_CONFIG_SECURE_BOOT_NETCORE_HASH_TYPE_NONE)
520-
if(SB_CONFIG_SECURE_BOOT_NETCORE_HASH_TYPE_SOFTWARE)
521-
set_config_bool(b0n CONFIG_SB_CRYPTO_OBERON_SHA256 y)
522-
elseif(SB_CONFIG_SECURE_BOOT_NETCORE_HASH_TYPE_UNUSED)
523-
set_config_bool(b0n CONFIG_SB_CRYPTO_NO_SHA256 y)
524-
endif()
525-
elseif(SB_CONFIG_SECURE_BOOT_HASH_TYPE_NONE OR SB_CONFIG_SECURE_BOOT_NETCORE_HASH_TYPE_NONE)
526-
set_config_bool(b0n CONFIG_SB_CRYPTO_NONE y)
527-
endif()
528-
529-
if(SB_CONFIG_SECURE_BOOT_SIGNATURE_TYPE_ECDSA)
530-
if(SB_CONFIG_SECURE_BOOT_NETCORE_SIGNATURE_TYPE_SOFTWARE)
531-
set_config_bool(b0n CONFIG_SB_CRYPTO_OBERON_ECDSA_SECP256R1 y)
532-
elseif(SB_CONFIG_SECURE_BOOT_NETCORE_SIGNATURE_TYPE_UNUSED)
533-
set_config_bool(b0n CONFIG_SB_CRYPTO_NO_ECDSA_SECP256R1 y)
534-
endif()
535-
endif()
536-
537482
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
538483
if(SB_CONFIG_NETCORE_APP_UPDATE)
539484
set_config_bool(mcuboot CONFIG_PCD_APP y)
@@ -559,9 +504,21 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
559504
set_config_bool(mcuboot CONFIG_PCD_APP n)
560505
endif()
561506

562-
if(SB_CONFIG_BT_FAST_PAIR_PROV_DATA AND SB_CONFIG_PARTITION_MANAGER)
563-
# The PM properties for the Fast Pair hex file must be set in the pre-CMake stage.
564-
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair/hex.cmake)
507+
if(SB_CONFIG_BT_FAST_PAIR)
508+
set_config_bool(${DEFAULT_IMAGE} CONFIG_BT_FAST_PAIR y)
509+
510+
if(DEFINED FP_MODEL_ID AND DEFINED FP_ANTI_SPOOFING_KEY)
511+
if(SB_CONFIG_PARTITION_MANAGER)
512+
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair_hex.cmake)
513+
endif()
514+
515+
set(FP_DATA_PRESENT "y" CACHE INTERNAL "Fast Pair provisioning data provided" FORCE)
516+
else()
517+
message(WARNING "Fast Pair support is enabled but `FP_MODEL_ID` or `FP_ANTI_SPOOFING_KEY` were not provided, this is likely to cause a build error")
518+
set(FP_DATA_PRESENT "n" CACHE INTERNAL "Fast Pair provisioning data provided" FORCE)
519+
endif()
520+
else()
521+
set_config_bool(${DEFAULT_IMAGE} CONFIG_BT_FAST_PAIR n)
565522
endif()
566523

567524
if(SB_CONFIG_WIFI_NRF70)
@@ -708,9 +665,8 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake)
708665
set_property(GLOBAL PROPERTY DOMAIN_APP_APP ${DEFAULT_IMAGE})
709666

710667
# Include any files that need to merge files with uicr_merged.hex before including suit
711-
if(SB_CONFIG_BT_FAST_PAIR_PROV_DATA AND NOT SB_CONFIG_PARTITION_MANAGER)
712-
# The DTS partition for the Fast Pair hex file is available in the post-CMake stage.
713-
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair/hex.cmake)
668+
if(FP_DATA_PRESENT AND NOT SB_CONFIG_PARTITION_MANAGER)
669+
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair_hex.cmake)
714670
endif()
715671

716672
if(SB_CONFIG_MATTER_FACTORY_DATA_GENERATE)
@@ -719,8 +675,10 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake)
719675
endif()
720676

721677
include_packaging()
722-
include_suit_provisioning()
723-
include_suit()
678+
if(NOT SB_CONFIG_IRON)
679+
include_suit_provisioning()
680+
include_suit()
681+
endif()
724682

725683
if(SB_CONFIG_SECURE_BOOT OR SB_CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION)
726684
include_provision_hex()
@@ -740,10 +698,6 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_post_cmake)
740698
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/nrf700x.cmake)
741699
endif()
742700

743-
if(SB_CONFIG_SECURE_BOOT_BOOTCONF_LOCK_WRITES)
744-
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/bootconf.cmake)
745-
endif()
746-
747701
if(SB_CONFIG_DFU_ZIP)
748702
if(SB_CONFIG_BOOTLOADER_MCUBOOT)
749703
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/zip.cmake)

0 commit comments

Comments
 (0)