Fixed 'backup disabled' case without ELF_SCATTERED

pull/562/head
Daniele Lacamera 2025-04-07 17:41:38 +02:00
parent 386a172587
commit d142426392
1 changed files with 8 additions and 5 deletions

View File

@ -814,11 +814,14 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
* wolfBoot_start*/ * wolfBoot_start*/
wolfBoot_swap_and_final_erase(0); wolfBoot_swap_and_final_erase(0);
#else /* DISABLE_BACKUP */ /* Compute and verify scattered hash */ #else /* DISABLE_BACKUP */
if (wolfBoot_verify_scattered_hash(&boot) != 0) { #ifdef ELF_SCATTERED
wolfBoot_printf("Scattered hash verification failed\n"); /* Compute and verify scattered hash */
return -1; if (wolfBoot_verify_scattered_hash(&boot) != 0) {
} wolfBoot_printf("Scattered hash verification failed\n");
return -1;
}
#endif
/* Direct Swap without power fail safety */ /* Direct Swap without power fail safety */
hal_flash_unlock(); hal_flash_unlock();