Skip to content

Commit

Permalink
don't boot from ext2fs boot.img if user requested recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
telent authored and alikates committed Mar 27, 2023
1 parent 549b4a2 commit b869a44
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/aboot/aboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -5316,13 +5316,17 @@ void aboot_init(const struct app_descriptor *app)
{
if (target_is_emmc_boot())
{
/* Try to boot from first fs we can find */
ssize_t loaded_file = fsboot_boot_first(target_get_scratch_address(), target_get_max_flash_size());
if(! boot_into_recovery) {
/* Try to boot from first fs we can find */

if (loaded_file > 0)
cmd_boot(NULL, target_get_scratch_address(), target_get_max_flash_size());
ssize_t loaded_file = fsboot_boot_first(target_get_scratch_address(), target_get_max_flash_size());

dprintf(CRITICAL, "Unable to load boot.img from ext2. Continuing legacy boot\n");
if (loaded_file > 0) {
dprintf(INFO, "Booting boot.img from ext2 %x %x\n", target_get_scratch_address(), target_get_max_flash_size());
cmd_boot(NULL, target_get_scratch_address(), loaded_file);
goto fastboot;
}
}

if(emmc_recovery_init())
dprintf(ALWAYS,"error in emmc_recovery_init\n");
Expand Down

0 comments on commit b869a44

Please sign in to comment.