-
Couldn't load subscription status.
- Fork 1.4k
nrf desktop autoprovisioning #23509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
nrf desktop autoprovisioning #23509
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1020,14 +1020,31 @@ nRF54L MCUboot provisioning | |
| =========================== | ||
|
|
||
| nRF54L-based nRF Desktop devices enable hardware cryptography for the MCUboot bootloader. | ||
| The public key that MCUboot uses to validate the application image is securely stored in the hardware Key Management Unit (KMU). | ||
| In this use case, the application image is automatically signed by the |NCS| build system. | ||
| However, the public key is not automatically provisioned to the device when programming the bootloader and the application images using the ``west flash`` command. | ||
| For this purpose, a set of private and public keys is needed. | ||
| The private key is used to sign the application image. | ||
| The public key is generated from the private key and is used by MCUboot to validate the application image. | ||
| The public key is securely stored in the Key Management Unit (KMU) hardware peripheral of the nRF54L device. | ||
|
|
||
| To provision the MCUboot keys, use the ``west ncs-provision`` command before programming the bootloader and application images. | ||
| Make sure that the provisioned public key is generated from the private key that was used to sign the application image. | ||
| In this application, the application image is automatically signed with a private key by the |NCS| build system. | ||
| The private keys are stored in the application configuration directory of the board. | ||
| Path to the private key is defined by the ``SB_CONFIG_BOOT_SIGNATURE_KEY_FILE`` sysbuild Kconfig option. | ||
|
||
|
|
||
| To store the public key in the KMU, it must first be provisioned. | ||
| This provisioning step can be performed automatically by the west runner, provided that a :file:`keyfile.json` file is present in the build directory. | ||
| In this application, the :file:`keyfile.json` file is automatically generated using the ``SB_CONFIG_MCUBOOT_GENERATE_DEFAULT_KMU_KEYFILE`` Kconfig option. | ||
| This option uses the private key specified by the :kconfig:option:`SB_CONFIG_BOOT_SIGNATURE_KEY_FILE` sysbuild Kconfig option to generate the required file during the build process. | ||
|
|
||
| To trigger KMU provisioning during flashing, use the ``west flash`` command with either the ``--erase`` or ``--recover`` flag. | ||
| This ensures that both the firmware and the MCUboot public key are correctly programmed onto the target device using the KMU-based key storage. | ||
| Use the following command to perform the operation: | ||
|
|
||
| .. parsed-literal:: | ||
| :class: highlight | ||
|
|
||
| west flash --recover | ||
|
|
||
| Alternatively, you can perform the provisioning operation manually with the ``west ncs-provision upload`` command and then flash the device with the ``west flash`` command. | ||
|
|
||
| You only need to provision one public key to an nRF Desktop device. | ||
| For details, see :ref:`provisioning KMU for nRF54L devices <ug_nrf54l_developing_provision_kmu>`. | ||
|
|
||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,23 +19,18 @@ common: | |
| - "(ble_adv: Advertising started)|(ble_scan: Scan started)" | ||
| - "dfu: Secondary image slot is clean" | ||
| tests: | ||
| applications.nrf_desktop.zdebug.uart.kmu_provision: | ||
| platform_allow: | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| integration_platforms: | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| timeout: 180 | ||
| harness: pytest | ||
| applications.nrf_desktop.zdebug.uart: | ||
| platform_allow: | ||
| - nrf54h20dk/nrf54h20/cpuapp | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| - nrf54lm20dk/nrf54lm20a/cpuapp | ||
| - nrf54lm20pdk/nrf54lm20a/cpuapp | ||
| - [email protected]/nrf54lm20a/cpuapp | ||
| integration_platforms: | ||
| - nrf54h20dk/nrf54h20/cpuapp | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| - nrf54lm20dk/nrf54lm20a/cpuapp | ||
| - nrf54lm20pdk/nrf54lm20a/cpuapp | ||
| - [email protected]/nrf54lm20a/cpuapp | ||
|
|
@@ -78,7 +73,7 @@ tests: | |
| integration_platforms: | ||
| - nrf52833dk/nrf52833 | ||
| extra_args: FILE_SUFFIX=dongle_small | ||
| applications.nrf_desktop.zdebug_fast_pair.gmouse.uart.kmu_provision: | ||
| applications.nrf_desktop.zdebug_fast_pair.gmouse.uart: | ||
| platform_allow: | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
|
|
@@ -87,8 +82,7 @@ tests: | |
| - nrf54l15dk/nrf54l15/cpuapp | ||
| extra_args: | ||
| - FILE_SUFFIX=fast_pair | ||
| timeout: 180 | ||
| harness: pytest | ||
| harness: console | ||
| applications.nrf_desktop.zdebug_fast_pair.gmouse: | ||
| build_only: true | ||
| platform_allow: | ||
|
|
@@ -164,16 +158,15 @@ tests: | |
| integration_platforms: | ||
| - nrf54h20dk/nrf54h20/cpuapp | ||
| extra_args: FILE_SUFFIX=release_dongle | ||
| applications.nrf_desktop.zdebug_keyboard.uart.kmu_provision: | ||
| applications.nrf_desktop.zdebug_keyboard.uart: | ||
| platform_allow: | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| integration_platforms: | ||
| - nrf54l15dk/nrf54l10/cpuapp | ||
| - nrf54l15dk/nrf54l15/cpuapp | ||
| extra_args: FILE_SUFFIX=keyboard | ||
| timeout: 180 | ||
| harness: pytest | ||
| harness: console | ||
| applications.nrf_desktop.zdebug_keyboard: | ||
| build_only: true | ||
| platform_allow: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling hardware crypto does not require the bootloader to use a private/public key. The bootloader uses it regardless of whether HW crypto is used or not.
It may be improved in a follow-up PR. Merging this one at @zycz request