Commit Graph

11 Commits (master)

Author SHA1 Message Date
John Bland 6c3940fafc refactor final step of powerfail safe update and add
emergency fallback test
2024-07-10 16:58:23 -04:00
Daniele Lacamera 32d6592e50 Fixed regression on powerfail resume 2024-07-04 18:19:02 +02:00
John Bland f4ea7784bf add double fallback to update powerfail test since
NVM_FLASH_WRITEONCE can powerfail after FLAGS_FINAL and TESTING partition states have been set
2023-10-13 14:30:04 +02:00
John Bland 43453d4d18 fix extra fallback due to non-triggered power fail 2023-10-13 14:30:04 +02:00
John Bland ffc7a435e5 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
2023-10-13 14:30:04 +02:00
John Bland 0361629ded add first sector powerfail to the powerfail-resume
test, this will cause the test to fail since a power failure here means the fw_size of boot will be missing
2023-08-15 14:43:51 -04:00
John Bland a774da4821 fix powerfail test to actually trigger, previously
the test has been doing nothing but trigger the update and then fallback over and over again
2023-08-15 14:03:33 -04:00
Daniele Lacamera bc5831747c Added extra clean round at the end of the powerfail test 2023-05-15 11:42:22 +02:00
John Bland b94249f8f7 correctly identify a forward powerfail vs a revert
powerfail and add an exception to wolfBoot_delta_update when a revert gets
interrupted since the version will change in the middle of the update process
2023-04-22 06:13:53 +02:00
John Bland 14ec346e1c before calling wolfBoot_delta_update, check if the
0th sector has been changed with the update partition still being in
IMG_STATE_UPDATING state. the state still being IMG_STATE_UPDATING means that a
delta update started and that the version may have been switched over, in which
case wolfBoot_current_firmware_version() >= wolfBoot_update_firmware_version()
no longer tells us if we need to perform an inverse operation on it's own.

also removes part of the update powerfail test that does checks for the
previous version without triggering a rollback
2023-04-21 20:31:58 +02:00
Daniele Lacamera 57a8fb30f1 Added test scripts 2023-03-21 18:03:38 +01:00