summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLuo Ji <ji.luo@nxp.com>2019-01-24 10:23:16 +0800
committerLuo Ji <ji.luo@nxp.com>2019-01-24 12:13:50 +0800
commitaccea7eb043ef41010ab39d026adf04d710d1bc7 (patch)
treef01c5baecd36052eed6ebba25da0c573ee21537f /drivers
parente448aa707c950c9e9b556b5b112549a196126a4b (diff)
MA-13980 [Auto] Reboot when slot is marked as unbootable
For dual bootloader, slot selection is made at spl stage, go to fastboot when current slot is marked as unbootable in AVB will give the user a chance to recover current slot with fastboot commands. But in this scenario, the device can't switch to another bootable slot automatically when a slot is marked as unbootable. Reboot the board when current slot is marked as unbootable to make the slot switch happen in spl. Test: Slot switch to 'b' automatically when 'a' is marked as unbootable on imx8qxp_mek. Change-Id: I94237965970d0c17ed564cf76e08d353f7b9c047 Signed-off-by: Luo Ji <ji.luo@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_fastboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index a10070171b..f06cd6dc1c 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -2285,10 +2285,10 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
avb_result = avb_flow_dual_uboot(&fsl_avb_ab_ops, requested_partitions_boot, allow_fail,
AVB_HASHTREE_ERROR_MODE_RESTART_AND_INVALIDATE, &avb_out_data);
- /* Goto fail early if current slot is not bootable. */
+ /* Reboot if current slot is not bootable. */
if (avb_result == AVB_AB_FLOW_RESULT_ERROR_NO_BOOTABLE_SLOTS) {
printf("boota: slot verify fail!\n");
- goto fail;
+ do_reset(NULL, 0, 0, NULL);
}
#endif /* !CONFIG_DUAL_BOOTLOADER */