From: Steve Rae Date: Tue, 23 Aug 2016 16:38:51 -0700 Subject: [U-Boot] [PATCH 1/2] fastboot: more support for reboot-bootloader command Message-ID: <1471995532-18649-1-git-send-email-steve.rae@raedomain.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The "fastboot reboot-bootloader" command is defined to re-enter into fastboot mode after rebooting into the bootloader. There is current support for setting the reset flag via the __weak fb_set_reboot_flag() function. This commit adds a generic handler to implement code which could launch fastboot during the boot sequence via this __weak fb_handle_reboot_flag() function. The actual handling this reset flag should be implemented by board/SoC specific code. Signed-off-by: Steve Rae cc: Alexey Firago cc: Paul Kocialkowski cc: Tom Rini cc: Angela Stegmaier cc: Dileep Katta --- common/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/main.c b/common/main.c index 2116a9e..ea3fe42 100644 --- a/common/main.c +++ b/common/main.c @@ -20,6 +20,12 @@ DECLARE_GLOBAL_DATA_PTR; */ __weak void show_boot_progress(int val) {} +/* + * Board-specific Platform code must implement fb_handle_reboot_flag(), if + * this feature is desired + */ +__weak void fb_handle_reboot_flag(void) {} + static void run_preboot_environment_command(void) { #ifdef CONFIG_PREBOOT @@ -63,6 +69,8 @@ void main_loop(void) if (cli_process_fdt(&s)) cli_secure_boot_cmd(s); + fb_handle_reboot_flag(); + autoboot_command(s); cli_loop(); -- 1.8.5