summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoman Kovalivskyi <roman.kovalivskyi@globallogic.com>2020-07-28 23:35:33 +0300
committerMarek Vasut <marex@denx.de>2020-09-01 14:47:43 +0200
commit2b2a771b40876c3db456705d5dcc5b60249d4075 (patch)
treea9ab46ae3a6769975306d315a431ffb73fe2217a /include
parent851737ab8922742732bea5f70407cb95cafcb3ee (diff)
fastboot: Add support for 'reboot fastboot' command
Android 10 adds support for dynamic partitions and in order to support this userspace fastboot must be used[1]. New tool fastbootd is included into recovery. Userspace fastboot works from recovery and is launched if: 1) - Dynamic partitioning is enabled 2) - Boot control block has 'boot-fastboot' value into command field The bootloader is expected to load and boot into the recovery image upon seeing boot-fastboot in the BCB command. Recovery then parses the BCB message and switches to fastbootd mode[2]. Please note that boot script is expected to handle 'boot-fastboot' command in BCB and load into recovery mode. Bootloader must support 'reboot fastboot' command which should reboot device into userspace fastboot to accomodate those changes[3]. Another command that bootloader must support[3] is 'reboot recovery'. This command should simply reboot device into recovery mode. [1] - https://source.android.com/devices/bootloader/fastbootd [2] - https://source.android.com/devices/bootloader/fastbootd#unified_fastboot_and_recovery [3] - https://source.android.com/devices/bootloader/fastbootd#modifications_to_the_bootloader Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Change-Id: I9d2bdc9a6f6f31ea98572fe155e1cc8341e9af76
Diffstat (limited to 'include')
-rw-r--r--include/fastboot.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fastboot.h b/include/fastboot.h
index 14f4c68868..b86b508e69 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -32,6 +32,8 @@ enum {
FASTBOOT_COMMAND_CONTINUE,
FASTBOOT_COMMAND_REBOOT,
FASTBOOT_COMMAND_REBOOT_BOOTLOADER,
+ FASTBOOT_COMMAND_REBOOT_FASTBOOTD,
+ FASTBOOT_COMMAND_REBOOT_RECOVERY,
FASTBOOT_COMMAND_SET_ACTIVE,
#if CONFIG_IS_ENABLED(FASTBOOT_CMD_OEM_FORMAT)
FASTBOOT_COMMAND_OEM_FORMAT,
@@ -45,6 +47,8 @@ enum {
*/
enum fastboot_reboot_reason {
FASTBOOT_REBOOT_REASON_BOOTLOADER,
+ FASTBOOT_REBOOT_REASON_FASTBOOTD,
+ FASTBOOT_REBOOT_REASON_RECOVERY,
FASTBOOT_REBOOT_REASONS_COUNT
};