wolfSSL / wolfBoot

wolfBoot is a portable, OS-agnostic, secure bootloader for microcontrollers, supporting firmware authentication and firmware update mechanisms.
https://www.wolfssl.com
GNU General Public License v3.0
331 stars 95 forks source link

DISABLE_BACKUP is now powerfail-safe. #409

Closed danielinux closed 4 months ago

danielinux commented 4 months ago

When DISABLE_BACKUP=1, by not checking/updating sector flags during copies from UPDATE to BOOT partitions, a copy operation getting interrupted by power failure will be less likely to cause problems to the integrity of the BOOT image. This is because in case of interruptions, the copy operation will be restarted from the first sector.

Idea taken from ZD17551.

danielinux commented 4 months ago

Thanks @jpbland1 - I've added two more test cases to check the combination of DISABLE_BACKUP with the two options mentioned above. Please consider for merging.