-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sysbuild: Emit warning log when MCUboot uses KMU #19352
Conversation
Using KMU for MCUboot keys requires provisioning the device manually before running `west flash`. Emit a CMake warning to ensure that user is aware that an additional action is required. Jira: NCSDK-30742 Signed-off-by: Marek Pieta <[email protected]>
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 7f3742fb38836ff0831ca2b85c866f8904826c78 more detailssdk-nrf:
Github labels
List of changed files detected by CI (2)
Outputs:ToolchainVersion: b77d8c1312 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
Memory footprint analysis revealed the following potential issuessample.matter.template.release[nrf7002dk/nrf5340/cpuapp]: High ROM usage: 820678[B] - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic) Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-19352/1) |
if(NOT SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU_SKIP_WARNING) | ||
message(WARNING " | ||
------------------------------------------------------------------------------ | ||
--- WARNING: MCUboot uses KMU stored keys for signature verification. Make --- |
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.
Add link to provisioning documentation
Also add information that without keys you won't be able to run application and application won't start so that a user could quickly identify this warning as a cause of his potential problem.
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 am really not fond of this annoying warning
Warning would be very helpful. This feature is active for ~1 week and already 2 persons wasted some time trying to figure out why sample is not working |
Here's the 2 flow routes for this:
This does absolutely nothing for 2, it will only ever do anything for 1 because in a customer use case they're going to turn this off as soon as they know how to use it. On that basis I will not accept this as it is, I will however accept a NCS sample-specific Kconfig that samples/applications can opt-in to (note: opt-in, not opt-out), can be |
Which sample? |
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 see emitting this warning for anything as unwanted. I'm fine with doing that for NCS samples or applications. Don't have strong opinion on opt-in vs opt-out. I think possibility for suppress this by default for given NCS installation might be a very good idea.
nRF Desktop application ( |
Note: which is no different that any non-secure image, which is documented in the readme files for said samples: https://github.com/nrfconnect/sdk-nrf/tree/main/samples/tfm/tfm_psa_template#building-and-running |
I would not insist on introducing a build warning enabled by default. Still, the missing KMU provisioning is related to MCUboot bootloader, so maybe we could introduce a build warning in scope of MCUboot or MCUboot's sysbuild integration in NCS (using an opt-in Kconfig option)? I would expect that other NCS applications may also use KMU for the MCUboot keys soon. A common warning would allow to achieve consistent user experience in scope of nRF Connect SDK. If you think that the warning is not a proper approach, we could also consider relying only on documentation (e.g. this PR introduces documentation for nRF Desktop application: #19356). Then I would close this PR. |
The warning can be added as per my comment above for NCS samples, not being enabled at an MCUboot or NSIB level, it is expected that if someone enables them in their applications then they should have first read how to use them like with any feature in NCS/zephyr. This Kconfig should be used, opt-in, for samples only, it can display a cmake warning, samples will need to select the Kconfig manually in their |
Taking into account comments from @nordicjm and @zycz, I eventually decided to make it an nRF Desktop application-specific CMake warning: #19440 Introducing a I close this PR. |
Using KMU for MCUboot keys requires provisioning the device manually before running
west flash
. Emit a CMake warning to ensure that user is aware that an additional action is required.Jira: NCSDK-30742