Skip to content

Commit 8e8c7c7

Browse files
michalek-nonvlsianpu
authored andcommitted
doc: nrf: KMU provisioning while west flashing
adds sections about new provisioning method. Signed-off-by: Mateusz Michalek <[email protected]>
1 parent 30c6c4a commit 8e8c7c7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/nrf/app_dev/device_guides/nrf54l/kmu_provision.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,18 @@ Once you have an unprovisioned SoC, upload keys to the board by running one of t
142142
You can call this command multiple times also to provision multiple keys, as long as each key has a different ID that is part of the metadata string.
143143

144144
For more information about this command, see the `Provisioning keys for hardware KMU`_ page in the nRF Util documentation.
145+
146+
Alternative provisioning method
147+
*********************************
148+
149+
To simplify the development process, keys can be generated and provisioned at the same time as the flashing process
150+
In the case of NSIB, enabling the ``SB_CONFIG_SECURE_BOOT_GENERATE_DEFAULT_KMU_KEYFILE`` Kconfig option at the sysbuild level introduces an additional programming step that is triggered when you execute the ``west flash --recover`` command.
151+
If you set the ``SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE`` Kconfig option to a PEM key file, that specific file will be used.
152+
If not, the build will use the default key named :file:`GENERATED_NON_SECURE_SIGN_KEY_PRIVATE.pem`, which is located in the build directory.
153+
154+
For MCUboot configurations, activating the ``SB_CONFIG_MCUBOOT_GENERATE_DEFAULT_KMU_KEYFILE`` Kconfig option at the sysbuild level allows to provision keys simultaneously with the flashing process. Provisioning step is triggered when you execute either ``west flash --recover`` or ``west flash --erase`` command.
155+
MCUboot uses the key file designated by the ``SB_CONFIG_BOOT_SIGNATURE_KEY_FILE`` option.
156+
157+
At the end of the described process the :file:`keyfile.json` file is generated in the build directory.
158+
This file allows key provisioning to occur simultaneously with the flashing process.
159+
Alternatively, you can bypass the mentioned Kconfig options and manually place a custom :file:`keyfile.json` in the build directory.

0 commit comments

Comments
 (0)