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

boot: bootutil: loader: Fix issue with stuck revert #2199

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

nordicjm
Copy link
Collaborator

Fixes an issue (only for swap using move, unsure if it affects
other modes) whereby a device can get into a state that there is
a valid primary image, no secondary image but the primary image
flag is still set to revert, which then makes loading a firmware
update from the application impossible due to it assuming that a
revert will happen upon device reboot

Fixes an issue (only for swap using move, unsure if it affects
other modes) whereby a device can get into a state that there is
a valid primary image, no secondary image but the primary image
flag is still set to revert, which then makes loading a firmware
update from the application impossible due to it assuming that a
revert will happen upon device reboot

Signed-off-by: Jamie McCrae <[email protected]>
Adds a note on this fix

Signed-off-by: Jamie McCrae <[email protected]>
boot_swap_type_multi(BOOT_CURR_IMG(state)) == BOOT_SWAP_TYPE_REVERT) {
const struct flash_area *fap_pri;

rc = flash_area_open(flash_area_id_from_multi_image_slot(BOOT_CURR_IMG(state),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess that flash_area_id_from_multi_image_slot returning -1 never happens here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

would be a very interesting flash setup heh

@nordicjm nordicjm merged commit 251c054 into mcu-tools:main Feb 12, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants