-
Notifications
You must be signed in to change notification settings - Fork 716
[nrf fromtree] west: runners: nrfutil: Add key file when present to west flash command #2894
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
[nrf fromtree] west: runners: nrfutil: Add key file when present to west flash command #2894
Conversation
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 really do not want this amount of out-of-tree code in this file. It will be a nightmare to keep in sync.
Our options are:
- Have everything, including provisioning, upstream (we could call it
--provision
instead). We already did something similar with the H20 SUIT support, where it was upstream although only needed for downstream - Use an extension command
west ncs-provision
- Change the bare minimum in this file, put the logic elsewhere
I fully agree, which is why I added the DNM label (unfortunately, I can't change the PR to draft status). I created this as a POC to demonstrate how we can test a simple application without manual steps, eliminating the need for pytest harness in Twister. Where is the issue with west ncs-provision? FYI @nvlsianpu |
There is a |
I forgot about
or
An option would be to extend |
505a62b
to
0d6a1a7
Compare
cb24635
to
696147c
Compare
5a71714
to
bd5f806
Compare
62df148
to
edde8da
Compare
Added automatic KMU key provisioning, when keyfile.json file exists in the build directory. This enables automated key provisioning during the flashing process to enable testing nRF54L aplications using Twister. Only applicable on nrfutil runner. Signed-off-by: Grzegorz Chwierut <[email protected]> (cherry picked from commit db3c344)
edde8da
to
adb4823
Compare
|
Added automatic KMU key provisioning for both NSIB and MCUboot.
Changes in zephyr allows to provision KMU keys with west flash command, if keyfile.json (generated by west ncs-provision) is in build directory.
In sdk-nrf (PR with manifest) added examples and Kconfigs to enable automatic keyfile generation during build process.
If Kconfig flas to automaticaly create keyfile.json is not enabled, one can still generate/modify keyfile.json in build directory and keys will be provisioned after flash
Build app with NSIB (can be added MCUboot with KMU etc)
west build -p -b nrf54l15dk/nrf54l15/cpuapp $ZEPHYR_BASE/samples/hello_world -d build-54l-nsib -- -DSB_CONFIG_SECURE_BOOT_APPCORE=y
Generate keyfile.json in build dir (west ncs-provision with --dry-run)
west ncs-provision upload --keyname BL_PUBKEY --key build-54l-nsib/GENERATED_NON_SECURE_SIGN_KEY_PRIVATE.pem --build-dir build-54l-nsib --dry-run
and flash (with --erase or --recover option)
west flash --skip-rebuild --erase -d build-54l-nsib