From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7F25C00144 for ; Wed, 27 Jul 2022 01:56:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04979803C7; Wed, 27 Jul 2022 03:56:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NpY3utIJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E45A9810E8; Wed, 27 Jul 2022 03:56:12 +0200 (CEST) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E63F8036F for ; Wed, 27 Jul 2022 03:56:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x1030.google.com with SMTP id 15-20020a17090a098f00b001f305b453feso703948pjo.1 for ; Tue, 26 Jul 2022 18:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc; bh=p519MPuQq8yZMrx8seA4vG7zBQ4jjoHrNfyzon263uw=; b=NpY3utIJN18I1cwyhG4tstdYbDQG5d5a3QlrrnjD/vRRpJwZccE6YrgEb5NAA7SWB8 vKQkkmL+ffDZbCUU+5JKLmDahbp4yvpHqftrVHQubHH0H+gDOAo12QgaaWdC6bhIq/4V vnmaFbwBPrSkJD8g0WN25lAlHpT1+FY5IjZ+pTYRT3jQsbUp8LVQlFBEhNaPUHuAah00 XLI3jcv5GwFhm256va7PDFQSZxD/pE03RgaHM0obhIyovroIeYuqZiIgCcqlR7FnzVGo M+HY6Q30XjsMkfSW8HTuYJYzx0xNUO1DHWnodglFq+kD7wOfdm66Y9RyPKqbDXu3Zmt2 ZVuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc; bh=p519MPuQq8yZMrx8seA4vG7zBQ4jjoHrNfyzon263uw=; b=IhnBKL/unNlTcjs35J/L4n6xM1R6JqVjj2hYotCFsF+1upAlazpSKOsTZpsdxGgvmu VKxCw/uzs4A3ckkNAIWDloVCsFT6KT/yDOEjQf3mjdlo6fW00gErKxdFhgCwQzgtsCKT ZzIwJOaKl+E2Wdghg2T+myHb3ONlnZgdgtbFZ4BNSThKnUBclMo3PchYc9HfIxpiZnJ7 Kfk0CjvN0Nsv6w5+vv4ECKMDVxImLZVqWVJqn9iXtK3uy6FPD6B840z14ZURJajVSYS4 scmJEx0opZ/WqmHfxtQsScdxBurhafDW4iF/X5GBQ+UDW/DuJ8Zulv9hxJ8RjA2XEV3V 699Q== X-Gm-Message-State: AJIora+EZ/9j+bAyI/ydJ4mlmn5GkWM1/4I3DpXgpOdgbns8eRzLx8de shxISAdssqRPdxLLeuY2TFd+eQ== X-Google-Smtp-Source: AGRyM1srXEc+N33sh1+lR96CU5311/eGr2KZNDfIuJ3PYfCJ04F25NTBZgCYpNE8XURO+4mRAvqVZg== X-Received: by 2002:a17:90a:b703:b0:1dd:1e2f:97d7 with SMTP id l3-20020a17090ab70300b001dd1e2f97d7mr1936917pjr.62.1658886967228; Tue, 26 Jul 2022 18:56:07 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:a854:710e:4f94:a11]) by smtp.gmail.com with ESMTPSA id i24-20020a17090ae81800b001f30d70aa3csm15366pjy.31.2022.07.26.18.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 18:56:06 -0700 (PDT) Date: Wed, 27 Jul 2022 10:56:02 +0900 From: Takahiro Akashi To: Ilias Apalodimas , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Mark Kettenis Subject: Re: [PATCH v10 00/10] enable menu-driven UEFI variable maintenance Message-ID: <20220727015602.GB45744@laputa> Mail-Followup-To: Takahiro Akashi , Ilias Apalodimas , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Mark Kettenis References: <20220722023919.19676-1-masahisa.kojima@linaro.org> <20220727010800.GA45744@laputa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220727010800.GA45744@laputa> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 > > 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 > > >