File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 88set (kmu_json_commands "" )
99set (kmu_json_dependencies "" )
1010
11- # First command: Generate keyfile for BL_PUBKEY
11+ # First command: Generate keyfile for b0 ( BL_PUBKEY)
1212if (SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE)
1313 # --- Determine the signing key file to use ---
1414 set (signature_private_key_file "" ) # Initialize
@@ -39,12 +39,18 @@ if(SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE)
3939 list (APPEND kmu_json_dependencies ${signature_private_key_file} )
4040endif ()
4141
42- # Second command (conditional): Update keyfile for UROT_PUBKEY
42+ # Second command (conditional): Update keyfile for MCUboot ( UROT_PUBKEY or BL_PUBKEY)
4343if (SB_CONFIG_MCUBOOT_GENERATE_DEFAULT_KMU_KEYFILE)
4444 string (CONFIGURE "${SB_CONFIG_BOOT_SIGNATURE_KEY_FILE} " mcuboot_signature_key_file)
45+ set (mcuboot_kmu_keyname UROT_PUBKEY)
46+
47+ if (NOT SB_CONFIG_MCUBOOT_SIGNATURE_KMU_UROT_MAPPING AND NOT SB_CONFIG_SECURE_BOOT_APPCORE)
48+ set (mcuboot_kmu_keyname BL_PUBKEY)
49+ endif ()
50+
4551 list (APPEND kmu_json_commands
4652 COMMAND ${Python3_EXECUTABLE} -m west ncs-provision upload
47- --keyname UROT_PUBKEY
53+ --keyname ${mcuboot_kmu_keyname}
4854 --key ${mcuboot_signature_key_file}
4955 --build -dir ${CMAKE_BINARY_DIR}
5056 --dry-run
Original file line number Diff line number Diff line change @@ -238,6 +238,12 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
238238
239239 if (SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU)
240240 set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU y)
241+
242+ if (SB_CONFIG_MCUBOOT_SIGNATURE_KMU_UROT_MAPPING)
243+ set_config_bool(mcuboot CONFIG_NCS_BOOT_SIGNATURE_KMU_UROT_MAPPING y)
244+ else ()
245+ set_config_bool(mcuboot CONFIG_NCS_BOOT_SIGNATURE_KMU_UROT_MAPPING n)
246+ endif ()
241247 else ()
242248 set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU n)
243249 endif ()
Original file line number Diff line number Diff line change @@ -183,6 +183,18 @@ config MCUBOOT_SIGNATURE_USING_KMU
183183 help
184184 The device needs to be provisioned with proper set of keys.
185185
186+ config MCUBOOT_SIGNATURE_KMU_UROT_MAPPING
187+ bool "Use original UROT KMU key mapping [DEPRECATED]"
188+ depends on MCUBOOT_SIGNATURE_USING_KMU
189+ depends on SOC_SERIES_NRF54LX
190+ depends on !SECURE_BOOT_APPCORE
191+ select DEPRECATED
192+ help
193+ When this option is enabled, it will use the previous UROT_PUBKEY key slot IDs for the
194+ MCUboot image which are assigned for the non-immutable bootloader IDs, otherwise it
195+ will use the key set for the mode that MCUboot is used in (non-immutable slots when b0
196+ is enabled, or immutable slots when b0 is not enabled).
197+
186198config MCUBOOT_SIGNATURE_USING_ITS
187199 bool "Use ITS stored keys for signature verification [EXPERIMENTAL]"
188200 depends on SOC_SERIES_NRF54HX
You can’t perform that action at this time.
0 commit comments