We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e8e3c25 + 5915d40 commit 9ea5002Copy full SHA for 9ea5002
1 file changed
src/update_flash.c
@@ -266,8 +266,18 @@ void RAMFUNCTION wolfBoot_start(void)
266
(wolfBoot_verify_integrity(&boot) < 0) ||
267
(wolfBoot_verify_authenticity(&boot) < 0)) {
268
if (wolfBoot_update(1) < 0) {
269
+ /* panic: no boot option available. */
270
while(1)
- /* panic */;
271
+ ;
272
+ } else {
273
+ /* Emergency update successful, try to re-open boot image */
274
+ if ((wolfBoot_open_image(&boot, PART_BOOT) < 0) ||
275
+ (wolfBoot_verify_integrity(&boot) < 0) ||
276
+ (wolfBoot_verify_authenticity(&boot) < 0)) {
277
+ /* panic: something went wrong after the emergency update */
278
+ while(1)
279
280
+ }
281
}
282
283
hal_prepare_boot();
0 commit comments