Skip to content
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

mgmt: mcumgr: grp: os: Add active b0 slot bootloader info query #19714

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nordicjm
Copy link
Contributor

Allows querying the active b0 slot via MCUmgr so that the correct
update image can be loaded to a device

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

@nordicjm nordicjm requested review from a team as code owners December 30, 2024 09:16
@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Dec 30, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 30, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
zephyr nrfconnect/sdk-zephyr@1e841e3 (main) nrfconnect/sdk-zephyr#2410 nrfconnect/sdk-zephyr#2410/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 30, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 7

Inputs:

Sources:

sdk-nrf: PR head: 94441a85ac59d36faed74aa98fd7c6951ef727d6
zephyr: PR head: 56c284a8b38e035083807ee501634b73ad1f2b89

more details

sdk-nrf:

PR head: 94441a85ac59d36faed74aa98fd7c6951ef727d6
merge base: 9299b43e0891eb3d300f6139d1b8235f95ed8832
target head (main): 5f476ed09d75635bc98bf78c1aa1114b602ae771
Diff

zephyr:

PR head: 56c284a8b38e035083807ee501634b73ad1f2b89
merge base: 1e841e3e45ad9abf7174d6638e1771a9cc2dd126
target head (main): 52a1ceee359c93ecf0cfeee835b60e7b4c8c78a5
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (14)
cmake
│  ├── sysbuild
│  │  │ b0_mcuboot_signing.cmake
subsys
│  ├── CMakeLists.txt
│  ├── Kconfig
│  ├── mgmt
│  │  ├── mcumgr
│  │  │  ├── CMakeLists.txt
│  │  │  ├── Kconfig
│  │  │  ├── grp
│  │  │  │  ├── CMakeLists.txt
│  │  │  │  ├── Kconfig
│  │  │  │  ├── os_mgmt
│  │  │  │  │  ├── CMakeLists.txt
│  │  │  │  │  ├── Kconfig
│  │  │  │  │  ├── src
│  │  │  │  │  │  │ os_mgmt_b0_active_slot.c
sysbuild
│  │ CMakeLists.txt
west.yml
zephyr
│  ├── include
│  │  ├── zephyr
│  │  │  ├── mgmt
│  │  │  │  ├── mcumgr
│  │  │  │  │  ├── grp
│  │  │  │  │  │  ├── os_mgmt
│  │  │  │  │  │  │  │ os_mgmt.h
│  ├── subsys
│  │  ├── mgmt
│  │  │  ├── mcumgr
│  │  │  │  ├── grp
│  │  │  │  │  ├── os_mgmt
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ os_mgmt.c

Outputs:

Toolchain

Version: 11349092be
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:11349092be_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
  • ❌ Integration tests
    • ✅ test-sdk-audio - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ desktop52_verification - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-boot - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-apps - Skipped: Job was skipped as it succeeded in a previous run
    • ❌ test_ble_nrf_config
    • ✅ test-fw-nrfconnect-ble_mesh - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ble_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-chip - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nfc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • ✅ test-fw-nrfconnect-nrf-iot_serial_lte_modem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m
    • ✅ doc-internal - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91 - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf_crypto - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rpc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-tfm - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-thread - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-zigbee - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-find-my - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_mosh - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_positioning - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-sidewalk - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-wifi - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-low-level - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_nrf_provisioning - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-pmic-samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-mcuboot - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ps - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-secdom-samples-public
    • ⚠️ test-fw-nrfconnect-fw-update

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

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.

return MGMT_CB_ERROR_RC;
}

/* If no parameter is recognized then just introduce the bootloader. */
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment removed

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]>
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 9, 2025

Memory footprint analysis revealed the following potential issues

sample.matter.template.debug[nrf7002dk/nrf5340/cpuapp]: High ROM usage: 911930[B] - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic)
sample.matter.template.release[nrf7002dk/nrf5340/cpuapp]: High ROM usage: 820762[B] - link (cc: @kkasperczyk-no @ArekBalysNordic @markaj-nordic)

Note: This message is automatically posted and updated by the CI (latest/sdk-nrf/PR-19714/7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. DNM manifest manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants