From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Sam Day via B4 Relay <devnull+me.samcday.com@kernel.org>,
u-boot@lists.denx.de, Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io
Cc: Tom Rini <trini@konsulko.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Quentin Schulz <quentin.schulz@cherry.de>,
Jerome Forissier <jerome.forissier@arm.com>,
"Kory Maincent (TI.com)" <kory.maincent@bootlin.com>,
Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Heiko Schocher <hs@nabladev.com>,
Andrew Goodbody <andrew.goodbody@linaro.org>,
Peter Robinson <pbrobinson@gmail.com>,
Casey Connolly <casey.connolly@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Sam Day <me@samcday.com>
Subject: Re: [PATCH 1/2] cmd: fastboot: Add keyed abort option
Date: Mon, 15 Jun 2026 14:16:53 +0200 [thread overview]
Message-ID: <87zf0wgfre.fsf@kernel.org> (raw)
In-Reply-To: <20260602-fastboot-abort-keyed-v1-1-414aac5a06b8@samcday.com>
Hi Sam,
Thank you for the patch.
On Tue, Jun 02, 2026 at 18:45, Sam Day via B4 Relay <devnull+me.samcday.com@kernel.org> wrote:
> From: Sam Day <me@samcday.com>
>
> Works the same as CONFIG_CMD_UMS_ABORT_KEYED does: any keypress will
> abort fastboot mode (rather than only ctrl-c).
>
> Signed-off-by: Sam Day <me@samcday.com>
> ---
> cmd/Kconfig | 6 ++++++
> cmd/fastboot.c | 9 ++++++++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index c71c6824a19..439409d6f2c 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -1208,6 +1208,12 @@ 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 with any key pressed.
> +
It seems that checkpatch is unhappy about this:
$ ./scripts/checkpatch.pl --git master..
-------------------------------------------------------------
Commit 9b68236a90bc ("cmd: fastboot: Add keyed abort option")
-------------------------------------------------------------
WARNING: please write a help paragraph that fully describes the config symbol with at least 2 lines
#26: FILE: cmd/Kconfig:1211:
+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 with any key pressed.
+
total: 0 errors, 1 warnings, 0 checks, 28 lines checked
I'd suggest the following edit:
+ Allow interruption of USB fastboot mode with any key pressed
+ instead of just Ctrl-c.
If you wish, I can do this edit while applying.
With the above change included:
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
> 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);
> }
>
> --
> 2.54.0
next prev parent reply other threads:[~2026-06-15 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 8:45 [PATCH 0/2] Fastboot abort key support Sam Day via B4 Relay
2026-06-02 8:45 ` [PATCH 1/2] cmd: fastboot: Add keyed abort option Sam Day via B4 Relay
2026-06-14 11:49 ` Simon Glass
2026-06-15 12:30 ` Mattijs Korpershoek
2026-06-15 12:16 ` Mattijs Korpershoek [this message]
2026-06-02 8:45 ` [PATCH 2/2] board: qualcomm: phone: enable CMD_FASTBOOT_ABORT_KEYED Sam Day via B4 Relay
2026-06-14 11:50 ` Simon Glass
2026-06-03 12:51 ` [PATCH 0/2] Fastboot abort key support Casey Connolly
2026-06-15 12:11 ` Mattijs Korpershoek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zf0wgfre.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=andrew.goodbody@linaro.org \
--cc=casey.connolly@linaro.org \
--cc=devnull+me.samcday.com@kernel.org \
--cc=hs@nabladev.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@arm.com \
--cc=kory.maincent@bootlin.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=me@samcday.com \
--cc=mikhail.kshevetskiy@iopsys.eu \
--cc=neil.armstrong@linaro.org \
--cc=pbrobinson@gmail.com \
--cc=quentin.schulz@cherry.de \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox