Merge "fastboot: add EDL mode support"
am: 894f3ea7cb
Change-Id: Ibe48ed1e7ae65234226100cb73962abff99e741a
This commit is contained in:
commit
87ebc42750
1 changed files with 10 additions and 1 deletions
|
|
@ -358,7 +358,7 @@ static void usage() {
|
||||||
" devices [-l] List all connected devices [with\n"
|
" devices [-l] List all connected devices [with\n"
|
||||||
" device paths].\n"
|
" device paths].\n"
|
||||||
" continue Continue with autoboot.\n"
|
" continue Continue with autoboot.\n"
|
||||||
" reboot [bootloader] Reboot device [into bootloader].\n"
|
" reboot [bootloader|emergency] Reboot device [into bootloader or emergency mode].\n"
|
||||||
" reboot-bootloader Reboot device into bootloader.\n"
|
" reboot-bootloader Reboot device into bootloader.\n"
|
||||||
" help Show this help message.\n"
|
" help Show this help message.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -1397,6 +1397,7 @@ int main(int argc, char **argv)
|
||||||
bool wants_wipe = false;
|
bool wants_wipe = false;
|
||||||
bool wants_reboot = false;
|
bool wants_reboot = false;
|
||||||
bool wants_reboot_bootloader = false;
|
bool wants_reboot_bootloader = false;
|
||||||
|
bool wants_reboot_emergency = false;
|
||||||
bool skip_reboot = false;
|
bool skip_reboot = false;
|
||||||
bool wants_set_active = false;
|
bool wants_set_active = false;
|
||||||
bool skip_secondary = false;
|
bool skip_secondary = false;
|
||||||
|
|
@ -1648,6 +1649,11 @@ int main(int argc, char **argv)
|
||||||
wants_reboot_bootloader = true;
|
wants_reboot_bootloader = true;
|
||||||
skip(1);
|
skip(1);
|
||||||
}
|
}
|
||||||
|
if (!strcmp(*argv, "emergency")) {
|
||||||
|
wants_reboot = false;
|
||||||
|
wants_reboot_emergency = true;
|
||||||
|
skip(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
require(0);
|
require(0);
|
||||||
} else if(!strcmp(*argv, "reboot-bootloader")) {
|
} else if(!strcmp(*argv, "reboot-bootloader")) {
|
||||||
|
|
@ -1807,6 +1813,9 @@ int main(int argc, char **argv)
|
||||||
} else if (wants_reboot_bootloader) {
|
} else if (wants_reboot_bootloader) {
|
||||||
fb_queue_command("reboot-bootloader", "rebooting into bootloader");
|
fb_queue_command("reboot-bootloader", "rebooting into bootloader");
|
||||||
fb_queue_wait_for_disconnect();
|
fb_queue_wait_for_disconnect();
|
||||||
|
} else if (wants_reboot_emergency) {
|
||||||
|
fb_queue_command("reboot-emergency", "rebooting into emergency download (EDL) mode");
|
||||||
|
fb_queue_wait_for_disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fb_execute_queue(transport) ? EXIT_FAILURE : EXIT_SUCCESS;
|
return fb_execute_queue(transport) ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue