From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, xypron.glpk@gmx.de,
ilias.apalodimas@linaro.org, sjg@chromium.org,
takahiro.akashi@linaro.org, francois.ozog@linaro.org,
masahisa.kojima@linaro.org
Subject: Re: [PATCH v5 00/17] enable menu-driven boot device selection
Date: Fri, 29 Apr 2022 10:45:49 +0200 (CEST) [thread overview]
Message-ID: <d3cd306544daca77@bloch.sibelius.xs4all.nl> (raw)
In-Reply-To: <20220428080950.23509-1-masahisa.kojima@linaro.org> (message from Masahisa Kojima on Thu, 28 Apr 2022 17:09:33 +0900)
> From: Masahisa Kojima <masahisa.kojima@linaro.org>
> Date: Thu, 28 Apr 2022 17:09:33 +0900
>
> This patch series adds the menu-driven boot device selection,
> by extending the existing "bootmenu" to include UEFI and distro_boot
> related entries, and supports menu-driven UEFI boot variable
> maintenance.
>
> This patch series also includes the removable media support
> that UEFI specification requires to support.
>
> The menu example is as follows.
>
> *** U-Boot Boot Menu ***
>
> bootmenu_00 : Boot 1. kernel
> bootmenu_01 : Boot 2. kernel
> bootmenu_02 : Reset board
> UEFI BOOT0000 : debian
> UEFI BOOT0001 : ubuntu
> UEFI BOOT0002 : mmc0:1
> UEFI BOOT0003 : mmc0:2
> UEFI BOOT0004 : nvme0:1
> UEFI BOOT0005 : nvme0:2
> UEFI BOOT0006 : usb0:2
> UEFI BOOT0007 : usb1:1
> UEFI BOOT0008 : usb1:2
> distro_boot : usb0
> distro_boot : scsi0
> distro_boot : virtio0
> distro_boot : dhcp
>
> Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit
>
> [How to run on QEMU(arm64)]
> 1) clone source code
> $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git \
> -b kojima/bootmenu_v5_upstream_0428 --depth 1
>
> 2) prepare U-Boot .config
> $ make qemu_arm64_menuconfig
> then, enable CONFIG_CMD_BOOTMENU and CONFIG_AUTOBOOT_MENU_SHOW
So when I do this on a Apple M1 system it ends up doing something
weird. With CONFIG_AUTOBOOT_MENU_SHOW=y, it shows the boot menu and
then automaticaly selects the "UEFI Boot Manager Maintenance" option
after the boot delay expires. That is a bit weird. Initially I
expected it to fall through into the normal distro_bootcmd script by
executing bootcmd.
Now this happens because NVMe isn't probed automatically. So no
viable boot options are found. But distro_boot explicitly probes NVMe
if CONFIG_NVME is enabled (see include/config_distro_bootcmd.h). So
falling through into the distro boot would actually have worked.
Another surprise is that the default boot order seems to depend on the
order in which devices are probed. With:
CONFIG_PREBOOT="nvme scan; usb start"
it boots from NVMe by default, and with:
CONFIG_PREBOOT="usb start; nvme scan"
it boots from USB by default, despite the fact that in
include/configs/apple.h I have:
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_NVME(func) \
BOOT_TARGET_USB(func)
If I change the boot order through the "UEFI Boot Manager Maintenance"
option, it seems that the new boot order only persists if I actually
boot into the OS. When I reset the board before doing that it keeps
the old boot order.
Last but not least, it seems that
CONFIG_CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is disabled by default despite
the fact that doc/usage/cmd/bootmenu.rst suggests the opposite. I
think the default for that option should be "y" otherwise I fear a lot
of boards will end up with shipping with a U-Boot with no way for
users to get at the u-boot prompt.
All in all, I don't think any of this is a show-stopper. It just
needs some further polishing, which probably is best done after this
lands (except for the CMD_BOOTMENU_ENTER_UBOOT_CONSOLE thing). It
does make it possible for me to use the EFI bootmgr on Apple M1
systems and it definitely improves the user interface for naive users.
prev parent reply other threads:[~2022-04-29 8:45 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 8:09 [PATCH v5 00/17] enable menu-driven boot device selection Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 01/17] lib/charset: add u16_strlcat() function Masahisa Kojima
2022-04-29 19:36 ` Heinrich Schuchardt
2022-04-28 8:09 ` [PATCH v5 02/17] test: unit test for u16_strlcat() Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 03/17] menu: always show the menu regardless of the number of entry Masahisa Kojima
2022-05-01 15:37 ` Heinrich Schuchardt
2022-04-28 8:09 ` [PATCH v5 04/17] menu: menu_get_choice() return -ENOENT if menu item is empty Masahisa Kojima
2022-04-29 19:38 ` Heinrich Schuchardt
2022-04-28 8:09 ` [PATCH v5 05/17] efi_loader: export efi_locate_device_handle() Masahisa Kojima
2022-05-01 18:53 ` Heinrich Schuchardt
2022-05-04 9:17 ` Ilias Apalodimas
2022-04-28 8:09 ` [PATCH v5 06/17] efi_loader: bootmgr: add booting from removable media Masahisa Kojima
2022-04-29 17:03 ` Heinrich Schuchardt
2022-05-05 12:05 ` Mark Kettenis
2022-05-05 12:20 ` Heinrich Schuchardt
2022-05-05 12:35 ` Heinrich Schuchardt
2022-05-05 13:25 ` Mark Kettenis
2022-05-05 12:47 ` Mark Kettenis
2022-05-12 9:12 ` AKASHI Takahiro
2022-05-12 10:34 ` Heinrich Schuchardt
2022-04-28 8:09 ` [PATCH v5 07/17] bootmenu: flush input buffer before waiting user key input Masahisa Kojima
2022-04-29 19:46 ` Heinrich Schuchardt
2022-05-09 8:33 ` Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 08/17] bootmenu: update bootmenu_entry structure Masahisa Kojima
2022-04-29 19:51 ` Heinrich Schuchardt
2022-05-01 20:54 ` Heinrich Schuchardt
2022-05-09 8:54 ` Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 09/17] bootmenu: add UEFI boot entry into bootmenu Masahisa Kojima
2022-05-01 21:44 ` Heinrich Schuchardt
2022-05-09 8:59 ` Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 10/17] bootmenu: add distro boot entry Masahisa Kojima
2022-05-01 21:48 ` Heinrich Schuchardt
2022-05-12 8:44 ` Takahiro Akashi
2022-05-12 10:39 ` Heinrich Schuchardt
2022-05-12 11:42 ` Mark Kettenis
2022-04-28 8:09 ` [PATCH v5 11/17] bootmenu: add Kconfig option not to enter U-Boot console Masahisa Kojima
2022-04-29 8:50 ` Mark Kettenis
2022-04-28 8:09 ` [PATCH v5 12/17] bootmenu: factor out the user input handling Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 13/17] efi_loader: menu-driven addition of UEFI boot option Masahisa Kojima
2022-04-28 16:33 ` Heinrich Schuchardt
2022-04-29 10:56 ` Heinrich Schuchardt
2022-04-30 12:49 ` Heinrich Schuchardt
2022-05-06 17:30 ` Heinrich Schuchardt
2022-05-06 18:10 ` Mark Kettenis
2022-05-06 18:16 ` Heinrich Schuchardt
2022-05-09 9:27 ` Masahisa Kojima
2022-05-09 12:56 ` Heinrich Schuchardt
2022-04-28 8:09 ` [PATCH v5 14/17] efi_loader: menu-driven deletion of UEFI boot variable Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 15/17] efi_loader: menu-driven update of UEFI bootorder variable Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 16/17] bootmenu: add removable media entries Masahisa Kojima
2022-04-28 16:53 ` Heinrich Schuchardt
2022-05-09 8:23 ` Masahisa Kojima
2022-05-09 13:01 ` Heinrich Schuchardt
2022-05-16 9:20 ` Masahisa Kojima
2022-04-28 8:09 ` [PATCH v5 17/17] doc:bootmenu: add UEFI boot and distro boot support description Masahisa Kojima
2022-04-28 16:31 ` [PATCH v5 00/17] enable menu-driven boot device selection Heinrich Schuchardt
2022-04-28 16:58 ` Heinrich Schuchardt
2022-04-29 8:45 ` Mark Kettenis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3cd306544daca77@bloch.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=francois.ozog@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=masahisa.kojima@linaro.org \
--cc=sjg@chromium.org \
--cc=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox