]> git.baikalelectronics.ru Git - uboot.git/commit
bootmenu: add removable media entries
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Mon, 12 Sep 2022 08:33:54 +0000 (17:33 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 14 Sep 2022 06:43:32 +0000 (08:43 +0200)
commit9235032ba0111745a4476e2dc4a1f88e0c6b030b
tree6726880fc8688317436dcfd255a1763ea98ff5f8
parentd7046180b14d51588a5fc17bcf124bc10f8fe940
bootmenu: add removable media entries

UEFI specification requires booting from removal media using
a architecture-specific default image name such as BOOTAA64.EFI.
This commit adds the removable media entries into bootmenu,
so that user can select the removable media and boot with
default image.

The bootmenu automatically enumerates the possible bootable
media devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL,
add it as new UEFI boot option(BOOT####) and update BootOrder
variable. This automatically generated UEFI boot option
has the dedicated guid in the optional_data to distinguish it from
the UEFI boot option user adds manually. This optional_data is
removed when the efi bootmgr loads the selected UEFI boot option.

This commit also provides the BOOT#### variable maintenance feature.
Depending on the system hardware setup, some devices
may not exist at a later system boot, so bootmenu checks the
available device in each bootmenu invocation and automatically
removes the BOOT#### variable corrensponding to the non-existent
media device.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
cmd/bootmenu.c
cmd/eficonfig.c
include/efi_config.h
include/efi_loader.h
lib/efi_loader/efi_bootmgr.c