public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/2] enable menu-driven boot device selection
@ 2022-03-08 14:07 Masahisa Kojima
  2022-03-08 14:07 ` [RFC PATCH v3 1/2] efi_loader: introduce "bootefi bootindex" command Masahisa Kojima
  2022-03-08 14:07 ` [RFC PATCH v3 2/2] bootmenu: add UEFI and disto_boot entries Masahisa Kojima
  0 siblings, 2 replies; 14+ messages in thread
From: Masahisa Kojima @ 2022-03-08 14:07 UTC (permalink / raw)
  To: u-boot
  Cc: Heinrich Schuchardt, Ilias Apalodimas, Simon Glass,
	Takahiro Akashi, Francois Ozog, Mark Kettenis, Masahisa Kojima

This patch series adds the menu-driven boot device selection,
by extending the existing "bootmenu" to include UEFI and distro_boot
related entries.

The menu example shown with this patch series is as follows.


  *** U-Boot Boot Menu ***

     Boot 1. kernel (bootmenu_0)
     Boot 2. kernel (bootmenu_1)
     Reset board (bootmenu_2)
     debian (BOOT0000)
     ubuntu (BOOT0001)
     UEFI Boot Manager
     usb0
     scsi0
     virtio0
     dhcp
     UEFI Boot Manager Maintenance
     U-Boot console

  Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit


This example shows three "bootmenu_0..2" entries, UEFI "Boot0000" and "Boot0001"
entries, distro_boot "boot_targets" entries(usb0, scici0, virtio0 and dhcp)
and some pre-defined entries(UEFI Boot Manager, UEFI Boot Manager Maintenance
and U-Boot console).

Note that this patch series aims to propose the above menu structure,
the code quality is very low and requires much cleanup/refactoring.


[How to run on QEMU(arm64)]
1) clone source code
 $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git \
-b kojima/efibootmenu_v3_upstream --depth 2

2) update U-Boot .config
 $ make qemu_arm64_menuconfig
  then, enable CONFIG_CMD_BOOTMENU and CONFIG_AUTOBOOT_MENU_SHOW

3) run on QEMU(arm64) example
 $ qemu-system-aarch64 -machine virt,gic-version=3 -cpu cortex-a57 -m 4G -nographic \
   -no-acpi -bios ./u-boot.bin -hda xxx.img

[Changes in v3]

- Major difference from previous version is that this version
  extends the existing bootmenu capability instead of updating
  efi bootmgr.
- include distro_boot entries
- "bootefi bootindex" command is newly added


Masahisa Kojima (2):
  efi_loader: introduce "bootefi bootindex" command
  bootmenu: add UEFI and disto_boot entries

 cmd/bootefi.c                |  42 ++++++
 cmd/bootmenu.c               | 268 +++++++++++++++++++++++++++++++++--
 include/efi_loader.h         |   1 +
 lib/efi_loader/efi_bootmgr.c |   7 +-
 4 files changed, 305 insertions(+), 13 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-03-10  6:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 14:07 [RFC PATCH v3 0/2] enable menu-driven boot device selection Masahisa Kojima
2022-03-08 14:07 ` [RFC PATCH v3 1/2] efi_loader: introduce "bootefi bootindex" command Masahisa Kojima
2022-03-08 14:17   ` Takahiro Akashi
2022-03-09  0:47     ` Masahisa Kojima
2022-03-09  2:35       ` Takahiro Akashi
2022-03-09 13:50         ` Ilias Apalodimas
2022-03-10  0:21           ` Masahisa Kojima
2022-03-08 14:07 ` [RFC PATCH v3 2/2] bootmenu: add UEFI and disto_boot entries Masahisa Kojima
2022-03-09 14:34   ` Ilias Apalodimas
2022-03-10  1:50     ` Takahiro Akashi
2022-03-10  2:41       ` Takahiro Akashi
2022-03-10  5:05         ` Masahisa Kojima
2022-03-10  2:42     ` Masahisa Kojima
2022-03-10  6:36       ` Ilias Apalodimas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox