[PATCH] boot: add support for button commands

Tom Rini trini at konsulko.com
Mon Jan 8 18:36:12 CET 2024


On Fri, Jan 05, 2024 at 04:03:58PM +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.
[snip]
> diff --git a/boot/Kconfig b/boot/Kconfig
> index fbc49c5bca47..9580ef1cfca4 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -20,6 +20,20 @@ config TIMESTAMP
>  	  loaded that does not, the message 'Wrong FIT format: no timestamp'
>  	  is shown.
>  
> +config BUTTON_CMD
> +	bool "Support for running a command if a button is held during boot"
> +	default n

Generally fine, only problem I see is here. "default n" is redundant,
and this should also depend on CMDLINE.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240108/a432243c/attachment.sig>


More information about the U-Boot mailing list