u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>,
	 Takahiro Akashi <takahiro.akashi@linaro.org>,
	Francois Ozog <francois.ozog@linaro.org>,
	 Mark Kettenis <mark.kettenis@xs4all.nl>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v4 00/11] enable menu-driven boot device selection
Date: Thu, 28 Apr 2022 16:35:26 +0900	[thread overview]
Message-ID: <CADQ0-X_GH5Hj3Lm-N4EAmjp=a21=5admAPstW+5-115dCj1Ehg@mail.gmail.com> (raw)
In-Reply-To: <774e373c-6cdb-f03c-45c4-49fa476cc4dc@gmx.de>

Hi Heinrich,

On Sat, 16 Apr 2022 at 15:46, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 3/24/22 14:54, Masahisa Kojima wrote:
> > 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
> >
> > [Major changes from RFC v3]
> > - add Kconfig option to disable U-Boot console
> > - add UEFI boot variable maintenance feature
> > - support removable media support and user selection
> > - app bootmenu enhancement documentation
> >
> > [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_v4_upstream_0324 --depth 1
> >
> > 2) prepare 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
>
>
> I applied the series to origin/master and added the two config options.
>
> This is the output if the disk image does not have an EFI partition:
>
> Found 0 disks
> No EFI system partition
> Unable to find TPMv2 device
>
> Even if there is no EFI system partition on virtio 0 I would expect the
> menu to be shown.

This issue is fixed in the next version.

>
> When having an image with an EFI system partition I get:
>
>    *** U-Boot Boot Menu ***
>
>       UEFI BOOT0003 : test3
>       UEFI BOOT00A0 : hello
>       UEFI BOOT0000 : virtio0:1
>       distro_boot   : usb0
>       distro_boot   : scsi0
>       distro_boot   : virtio0
>       distro_boot   : nvme0
>       distro_boot   : dhcp
>       UEFI Boot Manager Maintenance
>       U-Boot console
>
> The entries usb0, scsi0, nvme0 should not exist as there is no such device.

Non-existent devices are filtered out in the next version.

>
> => lsblk
> Block Driver          Devices
> -----------------------------
> efi_blk             : <none>
> nvme-blk            : <none>
> scsi_blk            : <none>
> usb_storage_blk     : <none>
> virtio-blk          : virtio 0
>
>
> When I select "U-Boot console" the prompt is written in the middle of
> the screen. I would expect the screen to be cleared.
>
> If I disable networking, I get
>
> Missing RNG device for EFI_RNG_PROTOCOL
> No EFI system partition
> Unable to find TPMv2 device
> =>
>
> though the disk has an EFI partition.

I fixed the issue that no menu appears if networking is disabled.

But the issue of no EFI system partition found if networking is
disabled seems a fundamental issue of U-Boot, not specific to this
series.
If networking is disabled, "lsblk" also can not find any block device.

o networking disabled
=> lsblk
Block Driver          Devices
-----------------------------
efi_blk             : <none>
nvme-blk            : <none>
scsi_blk            : <none>
usb_storage_blk     : <none>
virtio-blk          : <none>

o networking enabled
=> lsblk
Block Driver          Devices
-----------------------------
efi_blk             : <none>
nvme-blk            : <none>
scsi_blk            : <none>
usb_storage_blk     : <none>
virtio-blk          : virtio 0

Thanks,
Masahisa Kojima

>
> So this series needs some rework.
>
> Best regards
>
> Heinrich
>
> >
> >
> > AKASHI Takahiro (2):
> >    efi_loader: export efi_locate_device_handle()
> >    efi_loader: bootmgr: add booting from removable media
> >
> > Masahisa Kojima (9):
> >    bootmenu: fix menu API error handling
> >    lib/charset: add u16_strlcat() function
> >    test: unit test for u16_strlcat()
> >    menu: always show the menu regardless of the number or entry
> >    bootmenu: add UEFI and disto_boot entries
> >    bootmenu: factor out the user input handling
> >    efi_loader: add menu-driven UEFI Boot Variable maintenance
> >    bootmenu: add removable media entries
> >    doc:bootmenu: add UEFI boot variable and distro boot support
> >
> >   cmd/Kconfig                               |   10 +
> >   cmd/bootmenu.c                            |  678 +++++++----
> >   common/menu.c                             |  139 ++-
> >   doc/usage/bootmenu.rst                    |   65 ++
> >   include/charset.h                         |   15 +
> >   include/config_distro_bootcmd.h           |   14 +-
> >   include/efi_default_filename.h            |   26 +
> >   include/efi_loader.h                      |   63 ++
> >   include/menu.h                            |   20 +
> >   lib/charset.c                             |   21 +
> >   lib/efi_loader/Makefile                   |    1 +
> >   lib/efi_loader/efi_bootmenu_maintenance.c | 1244 +++++++++++++++++++++
> >   lib/efi_loader/efi_bootmgr.c              |   50 +-
> >   lib/efi_loader/efi_boottime.c             |   59 +-
> >   lib/efi_loader/efi_console.c              |   81 ++
> >   lib/efi_loader/efi_disk.c                 |   11 +
> >   lib/efi_loader/efi_file.c                 |   75 +-
> >   test/unicode_ut.c                         |   45 +
> >   18 files changed, 2357 insertions(+), 260 deletions(-)
> >   create mode 100644 include/efi_default_filename.h
> >   create mode 100644 lib/efi_loader/efi_bootmenu_maintenance.c
> >
>

      reply	other threads:[~2022-04-28  7:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 13:54 [PATCH v4 00/11] enable menu-driven boot device selection Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 01/11] bootmenu: fix menu API error handling Masahisa Kojima
2022-03-30  8:55   ` Ilias Apalodimas
2022-03-24 13:54 ` [PATCH v4 02/11] lib/charset: add u16_strlcat() function Masahisa Kojima
2022-04-02  7:14   ` Heinrich Schuchardt
2022-04-04 14:50     ` Masahisa Kojima
2022-04-16  7:32   ` Heinrich Schuchardt
2022-04-18  7:47     ` Masahisa Kojima
2022-04-28  7:45       ` Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 03/11] test: unit test for u16_strlcat() Masahisa Kojima
2022-04-02  7:47   ` Heinrich Schuchardt
2022-04-04 14:54     ` Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 04/11] menu: always show the menu regardless of the number of entry Masahisa Kojima
2022-04-02  7:56   ` Heinrich Schuchardt
2022-03-24 13:54 ` [PATCH v4 05/11] efi_loader: export efi_locate_device_handle() Masahisa Kojima
2022-04-01  5:43   ` Ilias Apalodimas
2022-03-24 13:54 ` [PATCH v4 06/11] efi_loader: bootmgr: add booting from removable media Masahisa Kojima
2022-03-30 19:13   ` Ilias Apalodimas
2022-03-31  0:51     ` Masahisa Kojima
2022-03-31  6:25       ` Ilias Apalodimas
2022-04-02  6:12   ` Heinrich Schuchardt
2022-04-04  6:48     ` Masahisa Kojima
2022-04-04 21:54       ` Heinrich Schuchardt
2022-03-24 13:54 ` [PATCH v4 07/11] bootmenu: add UEFI and disto_boot entries Masahisa Kojima
2022-04-01  6:08   ` Ilias Apalodimas
2022-04-02  6:33   ` Heinrich Schuchardt
2022-04-04  8:10     ` Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 08/11] bootmenu: factor out the user input handling Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 09/11] efi_loader: add menu-driven UEFI Boot Variable maintenance Masahisa Kojima
2022-03-31  8:31   ` Ilias Apalodimas
2022-04-14  9:25     ` Masahisa Kojima
2022-03-24 13:54 ` [PATCH v4 10/11] bootmenu: add removable media entries Masahisa Kojima
2022-03-31  8:48   ` Ilias Apalodimas
2022-03-31 10:18     ` Masahisa Kojima
2022-04-04 22:00     ` Heinrich Schuchardt
2022-03-24 13:54 ` [PATCH v4 11/11] doc:bootmenu: add UEFI boot variable and distro boot support Masahisa Kojima
2022-04-02  5:51   ` Heinrich Schuchardt
2022-03-25  1:20 ` [PATCH v4 00/11] enable menu-driven boot device selection Takahiro Akashi
2022-03-25  6:57   ` Masahisa Kojima
2022-04-02  5:48 ` Heinrich Schuchardt
2022-04-04  6:10   ` Masahisa Kojima
2022-04-16  6:46 ` Heinrich Schuchardt
2022-04-28  7:35   ` Masahisa Kojima [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='CADQ0-X_GH5Hj3Lm-N4EAmjp=a21=5admAPstW+5-115dCj1Ehg@mail.gmail.com' \
    --to=masahisa.kojima@linaro.org \
    --cc=francois.ozog@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mark.kettenis@xs4all.nl \
    --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;
as well as URLs for NNTP newsgroup(s).