From 0ebf9842e56c5b8cb7cb1f990bb452cc14af6225 Mon Sep 17 00:00:00 2001 From: Roman Kovalivskyi Date: Tue, 28 Jul 2020 23:35:34 +0300 Subject: fastboot: Add default fastboot_set_reboot_flag implementation Default implementation of fastboot_set_reboot_flag function that depends on "bcb" commands could be used in general case if there are no need to make any platform-specific implementation, otherwise it could be disabled via Kconfig option FASTBOOT_USE_BCB_SET_REBOOT_FLAG. Please note that FASTBOOT_USE_BCB_SET_REBOOT_FLAG is mutually exclusive with some platforms which already have their own implementation of this function. Signed-off-by: Roman Kovalivskyi --- include/fastboot.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/fastboot.h b/include/fastboot.h index b86b508e69f..8e9ee80907d 100644 --- a/include/fastboot.h +++ b/include/fastboot.h @@ -52,6 +52,15 @@ enum fastboot_reboot_reason { FASTBOOT_REBOOT_REASONS_COUNT }; +/** + * BCB boot commands + */ +static const char * const fastboot_boot_cmds[] = { + [FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader", + [FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot", + [FASTBOOT_REBOOT_REASON_RECOVERY] = "boot-recovery" +}; + /** * fastboot_response() - Writes a response of the form "$tag$reason". * -- cgit v1.2.3