commit | f515bb1c4453d6bb01a37d7abaaf4704e27ae00c | [log] [tgz] |
---|---|---|
author | Thomas Altenbach <thomas.altenbach@legrand.com> | Fri Apr 26 18:31:57 2024 +0200 |
committer | Fabio Utzig <utzig@utzig.org> | Mon Jul 15 20:03:21 2024 -0300 |
tree | f40025461d3a99f3016dc426a4d4ada9d17f4db7 | |
parent | fb2cf0ec3da3687b93f28e556ab682bdd4b85223 [diff] |
bootutil: Properly retrieve image headers after interrupted swap-scratch For swap using scratch, the boot_read_image_header routine, responsible for reading the image headers, was always looking for the primary and secondary image's headers at the beginning of respectively the primary and secondary slots, regardless of the current boot status. This means if during a swap-scratch upgrade a reset happens after the sector containing the image header in the primary or secondary slot has been erased, invalid image headers were read since at that time the location of the headers has changed. Currently, this doesn't seem to cause any issue because the swap-scratch algorithm is implemented in such a way the content of the headers is no more necessary when the headers are erased. However, to be able to decrypt the secondary image when copied to the primary slot instead of when copied to the scratch area, properly reading the secondary image's header is required even after it has been erased from the secondary slot. To that end, the boot_read_image_header is modified to determine from the boot status the current location of the image headers and to always read the actual header, no matter the current state of the upgrade process. Signed-off-by: Thomas Altenbach <thomas.altenbach@legrand.com>
This is MCUboot version 2.1.0
MCUboot is a secure bootloader for 32-bits microcontrollers. It defines a common infrastructure for the bootloader and the system flash layout on microcontroller systems, and provides a secure bootloader that enables easy software upgrade.
MCUboot is not dependent on any specific operating system and hardware and relies on hardware porting layers from the operating system it works with. Currently, MCUboot works with the following operating systems and SoCs:
RIOT is supported only as a boot target. We will accept any new port contributed by the community once it is good enough.
See the following pages for instructions on using MCUboot with different operating systems and SoCs:
There are also instructions for the Simulator.
The issues being planned and worked on are tracked using GitHub issues. To give your input, visit MCUboot GitHub Issues.
You can find additional documentation on the bootloader in the source files. For more information, use the following links:
Developers are welcome!
Use the following links to join or see more about the project: