Downgrade support for direct-xip #1475
DanielStindl-NXP
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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