-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
dfu: boot: mcuboot: fix boot_is_img_confirmed #82109
base: main
Are you sure you want to change the base?
dfu: boot: mcuboot: fix boot_is_img_confirmed #82109
Conversation
include/zephyr/dfu/mcuboot.h
Outdated
@@ -255,6 +255,20 @@ int boot_request_upgrade(int permanent); | |||
*/ | |||
int boot_request_upgrade_multi(int image_index, int permanent); |
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 function should be used, a new function taking a partition ID should not be introduced
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 one unfortunately does something different, that is for pairs.
it will only use the secondary slots.
image_index = 0 will request on slot1_partition
image_index = 1 will request on slot3_partition
image_index = 2 will request on slot5_partition
and I can't request an update on slot0, which I need.
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.
look in bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h
and /home/[email protected]/zephyr-apps/sw__otem_mcu/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c
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.
MCUboot operates in pairs so I don't understand the problem? Or are you saying you are using directXIP mode and it's marking the wrong slot? If so, then the function I pointed to should be updated to support XIP mode but adding a new function just taking a partition ID is not acceptable
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 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 is marking the wrong slot. Its not just for directXIP, but also for ram load mode (even throw mcuboot currently don't hake use of the trailer, but could be extended the same way that DIRECT_XIP got extended to DIRECT_XIP_REVERT and use the same functionality)
6fce364
to
86e05e1
Compare
Several reasons we should not follow this path:
|
86e05e1
to
e9d8a93
Compare
Fix image confirmed for Direct XIP. Signed-off-by: Fin Maaß <[email protected]>
8466e56
to
789f840
Compare
add boot_request_upgrade_by_id() to request aupdate to the provided partition.
Fix image confirmed for Direct XIP.