-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
scripts: Update ncs-provision west command to use nrfutil for uploading keys #20172
scripts: Update ncs-provision west command to use nrfutil for uploading keys #20172
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: fcc8e9c641def43187e930dcda8db5e897bdcb81 more detailssdk-nrf:
Github labels
List of changed files detected by CI (6)
Outputs:ToolchainVersion: aedb4c0245 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
1882474
to
e16136e
Compare
0b841db
to
37c0b83
Compare
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.
I've run our internal tests on that PR and surprisingly all tests passed.
Version of nrfutil device on the CI is 2.7.8 (I thought that in 2.7.13 KMU keys provissioning was added to nrfutil).
I've checked it locally, and it is working also on nrfutil 2.7.8
nrfutil install --force device=2.7.8
nrfutil device x-provision-nrf54l-keys --key-file /tmp/nrfutil_22pv6_t3/keyfile.json --verify --serial-number xxx
to run with Twister:
$ZEPHYR_BASE/scripts/twister -T tests/subsys/kmu/hello_for_kmu --device-testing --hardware-map hardware_map.yml --west-flash=--recover -vv --no-clean -s mcuboot.kmu.west.provision.default_key --pytest-args='-k test_kmu_use_key_from_config'
where command:
west ncs-provision upload --soc nrf54l15 --key /home/grch/ncs/bootloader/mcuboot/root-ed25519.pem --dev-id 001057755847
is called to provision KMU keys.
Scripts looks OK, and if nrfutil supports KMU keys provisioning in 2.7.8 version, it can be integrated (should not fail any regression tests)
Dependency to nrfprovision
package can be removed from requirements-extra.txt and from kmu_provision.rst:
https://github.com/nrfconnect/sdk-nrf/blob/main/doc/nrf/app_dev/device_guides/nrf54l/kmu_provision.rst#L20
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.
remember about removing dependencies to nrfprovision
package from requirements-extra.txt and updating docs kmu_provision.rst
37c0b83
to
d3a243f
Compare
f6c01dc
to
fa52a8f
Compare
764bbe0
to
1033ef3
Compare
rebase needed |
To write some unit tests for this module it has to be importable. Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
nrfutil provides a command to upload public keys to KMU. West ncs-provision command should use nrfutil instead of nrfprovision python library. Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
1033ef3
to
fcc8e9c
Compare
nrfutil
provides a command to upload public keys to KMU. This PR replacesnrfprovision
script withnrfutil
in west ncs-provision command .Example usage:
Additional options:
--dry-run
- generate JSON keyfile without executing upload--build-dir=Path
- path where keyfile will be saved--input=Path
- path to a YAML file with list of keys to upload, example: