-
Notifications
You must be signed in to change notification settings - Fork 1.4k
mgmt: mcumgr: grp: os: Add active b0 slot bootloader info query #19714
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
Conversation
|
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 16ea1c38b318987a4821c42467b6a3a5788e1ca7 more detailssdk-nrf:
zephyr:
Github labels
List of changed files detected by CI (14)Outputs:ToolchainVersion: 342151af73 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
8f0fa94 to
d55e7c9
Compare
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
d55e7c9 to
133ff8e
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.
This comment seems copy-pasted.
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.
Comment removed
c1a739f to
94441a8
Compare
Memory footprint analysis revealed the following potential issuessample.matter.template.debug[nrf7002dk/nrf5340/cpuapp]: High ROM usage: 912194[B] - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic) Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-19714/10) |
94441a8 to
a4df296
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.
minor nit.
Very long line before, and even much longer now 😞
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.
is the !s1_info needed?
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.
it's possible that there is no s1 image loaded in which case s1 would be a null pointer so the check is needed.
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.
Assuming that at this point we can have both s0_info and s1_info and the above else and else if have not been triggered, with the !s0_info and !s1_info, we have no processing of situation where both s0_info && s1_info, in which case active_slot is left uninitialized.
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.
there must be an s0_info or s1_info for b0 to be able to boot the image so one of the conditions must run, if there is no s0_info and no s1_info and b0 has booted the image then something is very wrong
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.
Right, my bad.
This can be used by the application to know if MCUboot and b0 are enabled, though the slot itself cannot be used from the application Signed-off-by: Jamie McCrae <[email protected]>
Includes an update to add a new MCUmgr OS group error code Signed-off-by: Jamie McCrae <[email protected]>
Allows querying the active b0 slot via MCUmgr so that the correct update image can be loaded to a device Signed-off-by: Jamie McCrae <[email protected]>
Adds slot numbers to the manifest used when building MCUboot updates for b0 Signed-off-by: Jamie McCrae <[email protected]>
a4df296 to
16ea1c3
Compare
However, FW_INFO is flawed in that it does no image verification at all and just checks the struct, the whole image could have been marked as invalid by b0 and so the application can return the wrong result