From: Tom Rini <trini@konsulko.com>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: Simon Glass <sjg@chromium.org>,
Sumit Garg <sumit.garg@linaro.org>,
u-boot@lists.denx.de, Svyatoslav Ryhel <clamor95@gmail.com>
Subject: Re: [PATCH v2] boot: add support for button commands
Date: Tue, 13 Feb 2024 17:32:54 -0500 [thread overview]
Message-ID: <20240213223254.GT3040305@bill-the-cat> (raw)
In-Reply-To: <20240109115310.1917139-1-caleb.connolly@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
On Tue, Jan 09, 2024 at 11:51:09AM +0000, Caleb Connolly wrote:
> With the relatively new button API in U-Boot, it's now much easier to
> model the common usecase of mapping arbitrary actions to different
> buttons during boot - for example entering fastboot mode, setting some
> additional kernel cmdline arguments, or booting with a custom recovery
> ramdisk, to name a few.
>
> Historically, this functionality has been implemented in board code,
> making it fixed for a given U-Boot binary and requiring the code be
> duplicated and modified for every board.
>
> Implement a generic abstraction to run an arbitrary command during boot
> when a specific button is pressed. The button -> command mapping is
> configured via environment variables with the following format:
>
> button_cmd_N_name=<button label>
> button_cmd_N=<command to run>
>
> Where N is the mapping number starting from 0. For example:
>
> button_cmd_0_name=vol_down
> button_cmd_0=fastboot usb 0
>
> This will cause the device to enter fastboot mode if volume down is held
> during boot.
>
> After we enter the cli loop the button commands are no longer valid,
> this allows the buttons to additionally be used for navigating a boot
> menu.
>
> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Tegra30
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-02-13 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 11:51 [PATCH v2] boot: add support for button commands Caleb Connolly
2024-01-10 18:08 ` Dragan Simic
2024-01-10 20:09 ` Caleb Connolly
2024-01-11 9:38 ` Michael Walle
2024-01-18 6:57 ` Dragan Simic
2024-01-18 7:59 ` Michael Walle
2024-01-18 14:33 ` Dragan Simic
2024-01-18 15:11 ` Michael Walle
2024-01-18 15:14 ` Dragan Simic
2024-02-13 22:32 ` Tom Rini [this message]
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=20240213223254.GT3040305@bill-the-cat \
--to=trini@konsulko.com \
--cc=caleb.connolly@linaro.org \
--cc=clamor95@gmail.com \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=u-boot@lists.denx.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