Browse Source

MA-10217 bootloader mode not function if there is a unknown cmd in misc

System cannot run into bootloader/recovery mode once there is unknown cmd
in misc partition as:
1. uboot will never clean the unknown cmd.
2. init will never overwrite the unknown cmd.

arm2_8q:/ # reboot bootloader
init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
init: reboot-bootloader: Error writing bootloader_message: Bootloader command pending.
init: Reboot start, reason: reboot,bootloader, rebootTarget: bootloader

Change-Id: I51043e7cbde3f3e508c5fe99e9dba27e5f99f443
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
guoyin.chen 3 years ago
parent
commit
e6735aa507
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      drivers/usb/gadget/f_fastboot.c

+ 5
- 4
drivers/usb/gadget/f_fastboot.c View File

@ -1909,17 +1909,18 @@ static FbBootMode fastboot_get_bootmode(void)
return boot_mode;
}
if (!strcmp(command, FASTBOOT_BCB_CMD)) {
memset(command, 0, 32);
bcb_write_command(command);
boot_mode = BOOTMODE_FASTBOOT_BCB_CMD;
}
#ifdef CONFIG_ANDROID_RECOVERY
else if (!strcmp(command, RECOVERY_BCB_CMD)) {
memset(command, 0, 32);
bcb_write_command(command);
boot_mode = BOOTMODE_RECOVERY_BCB_CMD;
}
#endif
/* Clean the mode once its read out,
no matter what in the mode string */
memset(command, 0, 32);
bcb_write_command(command);
return boot_mode;
}


Loading…
Cancel
Save