u-boot/doc/usage
Caleb Connolly e761035b64 boot: add support for button commands
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>
2024-02-13 15:38:49 -05:00
..
cmd doc: man-page for smbios command 2024-01-26 14:15:08 +01:00
fit rsa: use pkcs11 uri as defined in rfc7512 2023-12-20 09:48:17 -05:00
os doc: usage: Convert README.plan9 to reST 2022-03-31 19:06:16 +02:00
blkmap.rst doc: harmonize Linux kernel documentation links 2023-07-09 04:00:06 +02:00
cmdline.rst doc: man-page for the env command 2022-04-15 11:23:02 +02:00
dfu.rst doc: dfu: fix a handful of typos 2024-01-17 08:40:19 +01:00
environment.rst boot: add support for button commands 2024-02-13 15:38:49 -05:00
fdt_overlays.rst doc: use .dtso as extension for device tree overlay sources 2023-10-11 13:22:32 -04:00
index.rst doc: man-page for smbios command 2024-01-26 14:15:08 +01:00
measured_boot.rst doc: shorten overlong title underlines 2023-11-11 01:44:08 +01:00
netconsole.rst global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
partitions.rst blk: Rename if_type to uclass_id 2022-09-25 08:30:05 -06:00
semihosting.rst global: Use proper project name U-Boot (next2) 2023-09-21 13:20:11 +02:00
spl_boot.rst doc: describe TPL/VPL/SPL boot 2023-08-27 08:21:08 +02:00