Commit d6315527 authored by guoyin.chen's avatar guoyin.chen Committed by Jason Liu

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: 's avatarguoyin.chen <guoyin.chen@nxp.com>
parent 4d9eb775
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment