diff options
| author | Tom Rini <[email protected]> | 2026-06-30 09:27:19 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-30 09:27:19 -0600 |
| commit | 0acd34228cc71ae76070ae50e6e633ab0201ffe3 (patch) | |
| tree | 7fecbc325d51749f78efbb1664f33ccda813b909 /cmd | |
| parent | 0d8e33717d7e5b2a4034cc88f18bf233f77801e7 (diff) | |
| parent | 865f62483b86b7936c2136d91bbce252b6406330 (diff) | |
Merge tag 'u-boot-dfu-next-20260629' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next
u-boot-dfu-next-20260629:
CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/30562
Fastboot:
- Add support for CMD_FASTBOOT_ABORT_KEYED
- Enable CMD_FASTBOOT_ABORT_KEYED for qualcomm phones
USB Gadget:
- f_mass_storage: Disable eps during disconnect
- f_sdp: Fix spl load failure error handling
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 7 | ||||
| -rw-r--r-- | cmd/fastboot.c | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index d0fb7397067..ca1039f6a03 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1208,6 +1208,13 @@ config CMD_FASTBOOT See doc/android/fastboot.rst for more information. +config CMD_FASTBOOT_ABORT_KEYED + bool "fastboot abort with any key" + depends on CMD_FASTBOOT && USB_FUNCTION_FASTBOOT + help + Allow interruption of USB fastboot mode by any key presses, + rather than just Ctrl-c. + config CMD_FLASH bool "flinfo, erase, protect" default y diff --git a/cmd/fastboot.c b/cmd/fastboot.c index e71f873527b..f3929f88dfa 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -103,8 +103,15 @@ static int do_fastboot_usb(int argc, char *const argv[], while (1) { if (g_dnl_detach()) break; - if (ctrlc()) + if (IS_ENABLED(CONFIG_CMD_FASTBOOT_ABORT_KEYED)) { + if (tstc()) { + getchar(); + puts("\rOperation aborted.\n"); + break; + } + } else if (ctrlc()) { break; + } schedule(); dm_usb_gadget_handle_interrupts(udc); } |
