From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Simon Glass <sjg@chromium.org>, me@samcday.com
Cc: u-boot@lists.denx.de, Sumit Garg <sumit.garg@kernel.org>,
u-boot-qcom@groups.io, 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>
Subject: Re: [PATCH 1/2] cmd: fastboot: Add keyed abort option
Date: Mon, 15 Jun 2026 14:30:43 +0200 [thread overview]
Message-ID: <87wlw0gf4c.fsf@kernel.org> (raw)
In-Reply-To: <CAFLszTgX3x2hoFTWVy2WCuKRuZAB_T+QLAp13YTkhbM8wpkZRg@mail.gmail.com>
Hi Simon,
On Sun, Jun 14, 2026 at 05:49, Simon Glass <sjg@chromium.org> wrote:
> Hi Sam,
>
> On 2026-06-02T08:45:46, Sam Day via B4 Relay
> <devnull+me.samcday.com@kernel.org> wrote:
>> cmd: fastboot: Add keyed abort option
>>
>> 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/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;
>> + }
>
> I wonder if you could create a shared function (gadget_abort_check()
> ?) to keep this and the code in usb_mass_storage.c in sync?
While I usually advocate to avoid code duplication, I don't think it's
needed to create a new function here. It's only a couple of very simple
lines.
To me this can stay as is.
>
>> diff --git a/cmd/fastboot.c b/cmd/fastboot.c
>> @@ -103,8 +103,15 @@ static int do_fastboot_usb(int argc, char *const argv[],
>> + if (IS_ENABLED(CONFIG_CMD_FASTBOOT_ABORT_KEYED)) {
>> + if (tstc()) {
>> + getchar();
>> + puts("\rOperation aborted.\n");
>> + break;
>> + }
>
> Can you please update doc/android/fastboot.rst to mention the new
> Kconfig and the abort behaviour. There is currently nothing in that
> file about how to leave fastboot mode at all.
For the current behaviour, I have send:
https://lore.kernel.org/all/20260615-fastboot-doc-ctrl-c-v1-1-f932dea17c0a@kernel.org/
>
> Regards,
> Simon
next prev parent reply other threads:[~2026-06-15 12:30 UTC|newest]
Thread overview: 12+ 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 ` Sam Day
2026-06-02 8:45 ` [PATCH 1/2] cmd: fastboot: Add keyed abort option Sam Day via B4 Relay
2026-06-02 8:45 ` Sam Day
2026-06-14 11:49 ` Simon Glass
2026-06-15 12:30 ` Mattijs Korpershoek [this message]
2026-06-15 12:16 ` Mattijs Korpershoek
2026-06-02 8:45 ` [PATCH 2/2] board: qualcomm: phone: enable CMD_FASTBOOT_ABORT_KEYED Sam Day via B4 Relay
2026-06-02 8:45 ` Sam Day
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=87wlw0gf4c.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=andrew.goodbody@linaro.org \
--cc=casey.connolly@linaro.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=sjg@chromium.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.