All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Akashi <takahiro.akashi@linaro.org>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Masahisa Kojima <masahisa.kojima@linaro.org>,
	u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Simon Glass <sjg@chromium.org>,
	Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: [PATCH v10 00/10] enable menu-driven UEFI variable maintenance
Date: Wed, 27 Jul 2022 10:56:02 +0900	[thread overview]
Message-ID: <20220727015602.GB45744@laputa> (raw)
In-Reply-To: <20220727010800.GA45744@laputa>

On Wed, Jul 27, 2022 at 10:08:00AM +0900, Takahiro Akashi wrote:
> On Fri, Jul 22, 2022 at 11:45:49AM +0300, Ilias Apalodimas wrote:
> > Hi Kojima-san,
> > 
> > On Fri, 22 Jul 2022 at 05:36, Masahisa Kojima
> > <masahisa.kojima@linaro.org> wrote:
> > >
> > > This series adds the menu-driven UEFI boot variable maintenance
> > > through the "eficonfig" new command.
> > > This series also adds the removable media support in bootmenu.
> > >
> > > Initrd file selection and python based unit test are added in v10.
> > >
> > > Source code can be cloned with:
> > > $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b eficonfig_upstream_v10
> > >
> > > [Major Changes]
> > > - rebased v2022.07
> > > - add initrd file selection
> > 
> > I tried to load an initrd, which on typical distros is not part of the
> > ESP.  While
> > => ls virtio 0:2
> > 
> > reads the filesystem contents fine, whenI try to navigate to that
> > virtio (and ext4 filesystem) device through the menu I am getting:
> > "Reading volume failed!"
> > 
> > Any ideas?
> 
> eficonfig_select_file()
>   efi_file_open_int()
>     file_open()
>       exists = fs_exists(fh->path);
>       ...
> 
> It seems that fat and ext4 work in a different way against a *directory* here.
> For instance, try this both on fat and ext4
> ("test -e" internally uses fs_exists().)
> => test -e virtio X:Y /
> => echo $?
> 
> I think eficonfig_select_file() can be rewritten with fs_opendir()/fs_readdir().

Correction:
Not all file systems support fs_opendir/fs_readdir interfaces, so this is not
a viable solution in general.
(Please note that UEFI spec says nothing about file systems other than fat, though.)

-Takahiro Akashi

> (Or much more preferably, efi_open(), and essentially fs_exists(), should be fixed.)
> 
> -Takahiro Akashi
> 
> > Regards
> > /Ilias
> > > - add python based unit test
> > > - there is detailed changelog in each commit
> > >
> > > Masahisa Kojima (10):
> > >   efi_loader: move udevice pointer into struct efi_object
> > >   eficonfig: menu-driven addition of UEFI boot option
> > >   eficonfig: add "Edit Boot Option" menu entry
> > >   menu: add KEY_PLUS and KEY_MINUS handling
> > >   eficonfig: add "Change Boot Order" menu entry
> > >   eficonfig: add "Delete Boot Option" menu entry
> > >   bootmenu: add removable media entries
> > >   doc:bootmenu: add description for UEFI boot support
> > >   doc:eficonfig: add documentation for eficonfig command
> > >   test: unit test for eficonfig
> > >
> > >  cmd/Kconfig                                   |    7 +
> > >  cmd/Makefile                                  |    1 +
> > >  cmd/bootmenu.c                                |  106 +-
> > >  cmd/eficonfig.c                               | 2103 +++++++++++++++++
> > >  common/menu.c                                 |    6 +
> > >  configs/sandbox_defconfig                     |    1 +
> > >  doc/usage/cmd/bootmenu.rst                    |   74 +
> > >  doc/usage/cmd/eficonfig.rst                   |   63 +
> > >  doc/usage/index.rst                           |    1 +
> > >  include/efi_config.h                          |   91 +
> > >  include/efi_loader.h                          |   67 +
> > >  include/menu.h                                |    2 +
> > >  lib/efi_driver/efi_block_device.c             |    3 +-
> > >  lib/efi_loader/efi_bootmgr.c                  |    7 +
> > >  lib/efi_loader/efi_boottime.c                 |   52 +-
> > >  lib/efi_loader/efi_console.c                  |   70 +
> > >  lib/efi_loader/efi_disk.c                     |   65 +-
> > >  lib/efi_loader/efi_file.c                     |   75 +-
> > >  lib/efi_loader/efi_helper.c                   |   13 +
> > >  test/py/tests/test_eficonfig/conftest.py      |   40 +
> > >  .../py/tests/test_eficonfig/test_eficonfig.py |  325 +++
> > >  21 files changed, 3109 insertions(+), 63 deletions(-)
> > >  create mode 100644 cmd/eficonfig.c
> > >  create mode 100644 doc/usage/cmd/eficonfig.rst
> > >  create mode 100644 include/efi_config.h
> > >  create mode 100644 test/py/tests/test_eficonfig/conftest.py
> > >  create mode 100644 test/py/tests/test_eficonfig/test_eficonfig.py
> > >
> > > --
> > > 2.17.1
> > >

  reply	other threads:[~2022-07-27  1:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22  2:39 [PATCH v10 00/10] enable menu-driven UEFI variable maintenance Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 01/10] efi_loader: move udevice pointer into struct efi_object Masahisa Kojima
2022-08-02 14:53   ` Heinrich Schuchardt
2022-07-22  2:39 ` [PATCH v10 02/10] eficonfig: menu-driven addition of UEFI boot option Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 03/10] eficonfig: add "Edit Boot Option" menu entry Masahisa Kojima
2022-08-02  7:38   ` Heinrich Schuchardt
2022-08-17  9:02     ` Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 04/10] menu: add KEY_PLUS and KEY_MINUS handling Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 05/10] eficonfig: add "Change Boot Order" menu entry Masahisa Kojima
2022-08-02  7:43   ` Heinrich Schuchardt
2022-08-17  8:48     ` Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 06/10] eficonfig: add "Delete Boot Option" " Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 07/10] bootmenu: add removable media entries Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 08/10] doc:bootmenu: add description for UEFI boot support Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 09/10] doc:eficonfig: add documentation for eficonfig command Masahisa Kojima
2022-07-22  2:39 ` [PATCH v10 10/10] test: unit test for eficonfig Masahisa Kojima
2022-07-22  8:45 ` [PATCH v10 00/10] enable menu-driven UEFI variable maintenance Ilias Apalodimas
2022-07-27  1:08   ` Takahiro Akashi
2022-07-27  1:56     ` Takahiro Akashi [this message]
2022-08-04  8:26       ` Masahisa Kojima

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=20220727015602.GB45744@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=masahisa.kojima@linaro.org \
    --cc=sjg@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.