add powerfail during final sector erase, exposing

the problems of losing the encryption key when the power fails before the key can be written back, failing to select the correct NVM_FLASH_WRITEONCE sector when a sector is corrupt, and losing the testing state when the power fails before the partition state can be set. these issues are addressed in the next commit
pull/379/head
John Bland 2023-08-22 21:44:31 -04:00 committed by Daniele Lacamera
parent d27fc910bb
commit ffc7a435e5
1 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,9 @@ fi
./wolfboot.elf powerfail 15000 get_version 2>/dev/null
./wolfboot.elf powerfail 18000 get_version 2>/dev/null
./wolfboot.elf powerfail 1a000 get_version 2>/dev/null
# fail on the last sector to stop the encrypt key save and state update
./wolfboot.elf powerfail 3e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3f000 get_version 2>/dev/null
V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x2" ]; then
@ -20,6 +23,8 @@ fi
./wolfboot.elf powerfail 11000 get_version 2>/dev/null
./wolfboot.elf powerfail 14000 get_version 2>/dev/null
./wolfboot.elf powerfail 1e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3f000 get_version 2>/dev/null
V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x1" ]; then