[PATCH v4 11/11] doc:bootmenu: add UEFI boot variable and distro boot support

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Apr 2 07:51:45 CEST 2022


On 3/24/22 14:54, Masahisa Kojima wrote:
> The bootmenu enumerates the UEFI boot variable and distro boot
> (boot_targets) for boot device selection.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima at linaro.org>
> ---
> Newly created in v4
>
>   doc/usage/bootmenu.rst | 65 ++++++++++++++++++++++++++++++++++++++++++

In origin/master the file is called doc/usage/cmd/bootmenu.rst.

>   1 file changed, 65 insertions(+)
>
> diff --git a/doc/usage/bootmenu.rst b/doc/usage/bootmenu.rst
> index 1f094ad6ed..dc1d22062b 100644
> --- a/doc/usage/bootmenu.rst
> +++ b/doc/usage/bootmenu.rst
> @@ -93,3 +93,68 @@ When you intend to use the bootmenu on a color frame buffer console,
>   make sure to additionally define::
>
>       CONFIG_CFB_CONSOLE_ANSI=y
> +
> +UEFI boot variable enumeration
> +==============================
> +
> +The bootmenu automatically generates the UEFI boot variable("BOOT####")

How do you ensure that those variables that are autogenerated are not saved?

> +in order of "BootOrder". When the user selects the UEFI boot
> +variable entry, bootmenu sets the selected boot variable index
> +to "BootNext", then call the uefi boot manager with the command
> +"bootefi bootmgr".
> +
> +The bootmenu automatically enumerates the possible bootable
> +media devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.
> +
> +The bootmenu prints the EFI_LOAD_OPTION.Description[] as title
> +of the entry together with "UEFI" prefix and BOOT#### variable name.
> +
> +Example bootmenu is as below::
> +
> +    *** U-Boot Boot Menu ***
> +
> +       UEFI BOOT0000 : mmc0:1
> +       UEFI BOOT0001 : mmc0:2
> +       UEFI BOOT0002 : debian
> +       UEFI BOOT0003 : nvme0:1
> +       UEFI BOOT0004 : ubuntu
> +       UEFI BOOT0005 : nvme0:2
> +       UEFI BOOT0006 : usb0:2
> +
> +To scan the discoverable devices connected to the buses such as
> +USB and PCIe prior to bootmenu showing up, CONFIG_PREBOOT can be
> +used to run the command before showing the bootmenu, i.e.::
> +
> +    CONFIG_USE_PREBOOT=y
> +    CONFIG_PREBOOT="pci enum; usb start; scsi scan; nvme scan; virtio scan"
> +
> +distro boot command enumeration
> +===============================
> +
> +The bootmenu also automatically generates the entries for
> +distro boot command. The bootmenu shows the devices in boot_targets
> +environment variable.
> +When the user selects the distro boot command entry, the bootmenu
> +runs the command defined in "bootcmd_xxx" environment variable.
> +As an example, if user selects "usb0" entry, bootmenu runs the
> +command defined in "bootcmd_usb0".
> +
> +Example boot_targets::
> +
> +    usb0, scsi0, nvme0, dhcp
> +
> +Example bootmenu is as below::
> +
> +    *** U-Boot Boot Menu ***
> +
> +       distro_boot   : usb0
> +       distro_boot   : scsi0
> +       distro_boot   : nvme0
> +       distro_boot   : dhcp
> +
> +Disable to enter the U-Boot console
> +===================================
> +
> +To improve the product security, U-Boot console can be disabled by::
> +
> +    CONFIG_CMD_BOOTMENU_ENTER_UBOOT_CONSOLE=n

The man page should have a section 'Configuration' which lists all
relevant configuration options for the bootmenu command.


More information about the U-Boot mailing list