app: aboot: Fail over to next bootable slot, in case of failure.
Fail over to next bootable slot in case of failure to boot current,
bootable boot partition.
Change-Id: I4876d52eaa226e9bdb2f715f4987bd0c3385292f
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 693357c..3a32f7d 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -4443,11 +4443,18 @@
case ERR_INVALID_PAGE_SIZE:
case ERR_DT_PARSE:
case ERR_ABOOT_ADDR_OVERLAP:
+ case ERR_INVALID_BOOT_MAGIC:
if(partition_multislot_is_supported())
+ {
+ /*
+ * Deactivate current slot, as it failed to
+ * boot, and retry next slot.
+ */
+ partition_deactivate_slot(boot_slot);
goto retry_boot;
+ }
else
break;
- case ERR_INVALID_BOOT_MAGIC:
default:
break;
/* going to fastboot menu */