[PATCH v4 11/11] doc:bootmenu: add UEFI boot variable and distro boot support
Masahisa Kojima
masahisa.kojima at linaro.org
Thu Mar 24 14:54:43 CET 2022
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 ++++++++++++++++++++++++++++++++++++++++++
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####")
+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
--
2.17.1
More information about the U-Boot
mailing list