-
Notifications
You must be signed in to change notification settings - Fork 671
[nrf fromlist] west: runners: Add ncs-provision 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
base: main
Are you sure you want to change the base?
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
f391ea9
to
cb24635
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. Upstream PR #: 90605 Signed-off-by: Grzegorz Chwierut <[email protected]>
cb24635
to
696147c
Compare
|
Added automatic KMU key provisioning for both NSIB and MCUboot.
A new
--ncs-provision
command line option added to nrfutil runner.This enables automated key provisioning during the flashing process, to enable testing nRF54L aplications (with NSIB and/or MCUboot) using Twister.
For testing:
app with NSIB:
west build -p -b nrf54l15dk/nrf54l15/cpuapp $ZEPHYR_BASE/samples/hello_world -d build-54l-nsib -- -DSB_CONFIG_SECURE_BOOT_APPCORE=y
west flash --skip-rebuild -d build-54l-nsib --erase --ncs-provision
app with NSIB + MCUboot (with enabled KMU keys)
west build -p -b nrf54l15dk/nrf54l15/cpuapp $ZEPHYR_BASE/samples/hello_world -d build-54l-nsib_mcuboot_kmu -- -DSB_CONFIG_SECURE_BOOT_APPCORE=y -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -DSB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU=y
west flash --skip-rebuild -d build-54l-nsib_mcuboot_kmu --erase --ncs-provision
For testing with Twister, one can revert that commit:
nrfconnect/sdk-nrf@f4c0cc0
and run:
$ZEPHYR_BASE/scripts/twister -c -T tests/subsys/bootloader/boot_chains -p nrf54l15dk/nrf54l15/cpuapp --device-testing --device-serial /dev/ttyACM1 --west-flash="--recover,--ncs-provision" --enable-slow -vv -ll debug
(only boot_chains, bacause b0_lock causing rolling reboot)