[PATCH v5 4/7] mach-snapdragon: enter fastboot on bootloader reboot reason

Aswin Murugan aswin.murugan at oss.qualcomm.com
Thu May 21 20:05:46 CEST 2026


Update preboot to check the reboot-mode environment variable
and automatically enter fastboot mode when the reboot reason
is "bootloader". This enables 'adb reboot bootloader'
functionality on Qualcomm platforms.

The reboot-mode variable is set by the reboot-mode uclass
via EVT_LAST_STAGE_INIT before preboot runs.

Signed-off-by: Aswin Murugan <aswin.murugan at oss.qualcomm.com>
---
 board/qualcomm/default.env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/qualcomm/default.env b/board/qualcomm/default.env
index dbf6f4e7260..429d71d57f3 100644
--- a/board/qualcomm/default.env
+++ b/board/qualcomm/default.env
@@ -1,7 +1,7 @@
 stdin=serial,button-kbd
 stdout=serial,vidconsole
 stderr=serial,vidconsole
-preboot=scsi scan; usb start
+preboot=scsi scan; usb start; if test "${reboot-mode}" = "bootloader"; then run fastboot; fi
 fastboot=fastboot -l $fastboot_addr_r usb 0
 do_boot=bootefi bootmgr
 bootmenu_0=Boot first available device=run do_boot
-- 
2.34.1



More information about the U-Boot mailing list