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/img: Cherry-pick MCUboot direct XIP support #1260

Closed
wants to merge 8 commits into from

Conversation

MarekPieta
Copy link
Contributor

Cherry-pick MCUboot direct XIP support.

Copy link
Contributor

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

Note that MCUmgr MCUboot info may significantly change.

@MarekPieta
Copy link
Contributor Author

Note that MCUmgr MCUboot info may significantly change.

What do you mean @de-nordic? Do you think we should desist from cherry-picking it at this point?
@philips77 please confirm if you want to test with the MCUmgr MCUboot info in the current version.

@de-nordic
Copy link
Contributor

Note that MCUmgr MCUboot info may significantly change.

What do you mean @de-nordic? Do you think we should desist from cherry-picking it at this point? @philips77 please confirm if you want to test with the MCUmgr MCUboot info in the current version.

@nordicjm Do you agree with the proposed command specification as done in https://github.com/zephyrproject-rtos/zephyr/pull/57797/files?

@nordicjm
Copy link
Contributor

nordicjm commented Aug 2, 2023

Note that MCUmgr MCUboot info may significantly change.

What do you mean @de-nordic? Do you think we should desist from cherry-picking it at this point? @philips77 please confirm if you want to test with the MCUmgr MCUboot info in the current version.

@nordicjm Do you agree with the proposed command specification as done in https://github.com/zephyrproject-rtos/zephyr/pull/57797/files?

Yes, at present it has the code in the file to do it but in future I suggest we replace it and just use it to directly query the blinfo group of settings once someone stops moaning over zephyrproject-rtos/zephyr#59025

@philips77
Copy link

please confirm if you want to test with the MCUmgr MCUboot info in the current version.

It depends on what is inside the info and how is it will be released. If you plan to release these features separately, so d-xip goes in 2.5, but info later, than I need to test d-xip only and together with info later. Or if they can be enabled separately, so one does not depend on the other.

The commit adds functions:
 img_mgmt_get_next_boot_slot
 img_mgmt_get_opposite_slot

to simplify obtaining information on next boot slot.

Upstream PR: zephyrproject-rtos/zephyr#58803

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
…_boot_slot

The commit modifies image list command operations to use
img_mgmt_get_next_boot_slot instead of directly relying of
MCUboot flags.
The function is now used, also, by img_mgmt_slot_in_use to
figure out whether queried slot is in use.

Upstream PR: zephyrproject-rtos/zephyr#58803

Added missing declaration of int32_t ret_rc for the image status hook.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The Kconfig option allows to configure bootutil to work with
MCUboot compiled for DirectXIP with revert.
Enabling this option is required to modify boot_set_next behaviour
so that setting application images for test and confirming,
int DirectXIP-revert mode, would be possible from application.

Upstream PR: zephyrproject-rtos/zephyr#58803

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
…vert

The commit adds support for uploading image to board with MCUboot
configured wiht DirectXIP with revert.
It allows to set uploaded image either for test or as permanent
boot application, until never image gets confirmed.
Note that in DirectXIP with revert MCUboot will remove image
that has not been set for test nor confirmed and MCUmgr does not
set either mode unless image has the mode set within uploaded
binary.
The commit adds Kconfig option
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT
that enabled the new mode of operation within MCUmgr.

Upstream PR: zephyrproject-rtos/zephyr#58803

Added missing declaration of int32_t ret_rc for the image status hook.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Adds sample build for
 CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT=y

Upstream PR: zephyrproject-rtos/zephyr#58803

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
…nition

Specification for MCUmgr OS group command allowing to query
for bootloader information.

Upstream PR: zephyrproject-rtos/zephyr#57797

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Adds command allowing to query information on bootloader.
In this case support is provided to query MCUboot information.

Upstream PR: zephyrproject-rtos/zephyr#57797

Manually changed from zcbor_int32_decode to zcbor_tstr_decode in
os_mgmt_bootloader_info.

Manually changed != to == to fix query comparison in
os_mgmt_bootloader_info.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
…query

Provide information on supported MCUboot parameters query by MCUmgr
group OS.

Upstream PR: zephyrproject-rtos/zephyr#57797

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
@kapi-no
Copy link
Contributor

kapi-no commented Oct 4, 2023

This PR should be closed as the support for Direct-XIP in this PR is outdated. The support will come as nrf fromtree commits from a different PR set.

@MarekPieta MarekPieta closed this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants