You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of requirements from our customers is option to download image with older version. This is not possible when direct-xip mode is used because image with highest version is always chosen. At least I'm not aware of another way so please correct me if I'm wrong.
In our internal fork of MCUBoot I have modified loader.c by adding new hook called boot_find_active_slot_hook()
This way user can modify the code flow and possibly implement his own way of downgrade support for direct-xip. I have tested the approach where boot_find_active_slot_hook() forces to load new downloaded image (magic trailer==set, image_ok==unset, copy_done==any) so MCUBoot boots it if it is valid...otherwise image is erased by internal MCUBoot mechanism.
When image in active slot is marked OK (image_ok==0x1) the image with possible higher version in inactive slot has to be invalidated by deleting its header so it is not loaded next boot session.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
One of requirements from our customers is option to download image with older version. This is not possible when direct-xip mode is used because image with highest version is always chosen. At least I'm not aware of another way so please correct me if I'm wrong.
In our internal fork of MCUBoot I have modified loader.c by adding new hook called boot_find_active_slot_hook()
This way user can modify the code flow and possibly implement his own way of downgrade support for direct-xip. I have tested the approach where boot_find_active_slot_hook() forces to load new downloaded image (magic trailer==set, image_ok==unset, copy_done==any) so MCUBoot boots it if it is valid...otherwise image is erased by internal MCUBoot mechanism.
When image in active slot is marked OK (image_ok==0x1) the image with possible higher version in inactive slot has to be invalidated by deleting its header so it is not loaded next boot session.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions