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 8
8
set (kmu_json_commands "" )
9
9
set (kmu_json_dependencies "" )
10
10
11
- # First command: Generate keyfile for BL_PUBKEY
11
+ # First command: Generate keyfile for b0 ( BL_PUBKEY)
12
12
if (SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE)
13
13
# --- Determine the signing key file to use ---
14
14
set (signature_private_key_file "" ) # Initialize
@@ -39,12 +39,18 @@ if(SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE)
39
39
list (APPEND kmu_json_dependencies ${signature_private_key_file} )
40
40
endif ()
41
41
42
- # Second command (conditional): Update keyfile for UROT_PUBKEY
42
+ # Second command (conditional): Update keyfile for MCUboot ( UROT_PUBKEY or BL_PUBKEY)
43
43
if (SB_CONFIG_MCUBOOT_GENERATE_DEFAULT_KMU_KEYFILE)
44
44
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_ORIGINAL_MAPPING AND NOT SB_CONFIG_SECURE_BOOT_APPCORE)
48
+ set (mcuboot_kmu_keyname BL_PUBKEY)
49
+ endif ()
50
+
45
51
list (APPEND kmu_json_commands
46
52
COMMAND ${Python3_EXECUTABLE} -m west ncs-provision upload
47
- --keyname UROT_PUBKEY
53
+ --keyname ${mcuboot_kmu_keyname}
48
54
--key ${mcuboot_signature_key_file}
49
55
--build -dir ${CMAKE_BINARY_DIR}
50
56
--dry-run
Original file line number Diff line number Diff line change @@ -238,6 +238,12 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
238
238
239
239
if (SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU)
240
240
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU y)
241
+
242
+ if (SB_CONFIG_MCUBOOT_SIGNATURE_KMU_ORIGINAL_MAPPING)
243
+ set_config_bool(mcuboot CONFIG_NCS_BOOT_SIGNATURE_KMU_ORIGINAL_MAPPING y)
244
+ else ()
245
+ set_config_bool(mcuboot CONFIG_NCS_BOOT_SIGNATURE_KMU_ORIGINAL_MAPPING n)
246
+ endif ()
241
247
else ()
242
248
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU n)
243
249
endif ()
Original file line number Diff line number Diff line change @@ -183,6 +183,18 @@ config MCUBOOT_SIGNATURE_USING_KMU
183
183
help
184
184
The device needs to be provisioned with proper set of keys.
185
185
186
+ config MCUBOOT_SIGNATURE_KMU_ORIGINAL_MAPPING
187
+ bool "Use original 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 key slot IDs for the MCUboot image
194
+ which are assigned for the non-immutable bootloader IDs, otherwise it will use the key
195
+ set for the mode that MCUboot is used in (non-immutable slots when b0 is enabled, or
196
+ immutable slots when b0 is not enabled).
197
+
186
198
config MCUBOOT_SIGNATURE_USING_ITS
187
199
bool "Use ITS stored keys for signature verification [EXPERIMENTAL]"
188
200
depends on SOC_SERIES_NRF54HX
You can’t perform that action at this time.
0 commit comments