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 6097BC00144 for ; Wed, 27 Jul 2022 01:08:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02114817E6; Wed, 27 Jul 2022 03:08:12 +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="vY/0mHW6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5115E8171B; Wed, 27 Jul 2022 03:08:10 +0200 (CEST) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 2398E80E94 for ; Wed, 27 Jul 2022 03:08:06 +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-pf1-x429.google.com with SMTP id d10so14740796pfd.9 for ; Tue, 26 Jul 2022 18:08:06 -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:cc:to:from:date:from:to:cc; bh=+DHq+5dh/UMU4G9WJBqlEYqMI7GGwa71mrffFWxAcBk=; b=vY/0mHW64FGEMNzYMYS8cQHndnlKYTldCvotDeALyN288+pJbahk1FK0Z4fIjjior4 Ik0dV2Gg5GVFe3VjLFL0kZ0XGs7gGz2vrDsIntM66/COj743xQDDr0vikDrgZR2kfgh2 xU1cGMyjjCy+/hnwKhrOaJddPQSSmXC2OlMkdHEWJyvk/MqDl0gyJaZZ8uRaQc+5mp/U p5DNA2uqFakASv2Xwy7FEOZ9tbdbaUohHTLZFP1vJGLzz2ZIKN9NQkbSDlQ6o1OKA46d dL3CckUoomcKF0398H18Ny1b5HrAoX7ZRWNtK70W7oZ6PCs2rEBLLozkkw6att1bUxNo ckfg== 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:cc:to:from:date :x-gm-message-state:from:to:cc; bh=+DHq+5dh/UMU4G9WJBqlEYqMI7GGwa71mrffFWxAcBk=; b=UU930HvtMWN/sW/och6iN/zWupYZ071lkDmMmYHmW7meKoCKYnmJnrTeP4vOyGBAJ+ 6DdH7Kt+d6y2OcjhWC9Q8U4Wd2ndhhFqF4PO4Nv6+CwO4nZaXgKxPoPba77kbw7n01X2 hnP8iHZq7dJsCyNEVu/kG+JLpZzi9AAxR2MiLmA0hjCMlkSdONlln4jNeysZfbkHHdKb xBuQReQDolKuH/dm9RIUwthQ/mrbZO8lZcaG6R+eSoQLwvc1J3w7RTrzF620Ek6meae+ 50I8m3l68VLLDSIjmo9qb9QsNFS+DtvgXmDIZTwyzZaXyaeBgHaTSUyRnlcekZuMkAGd 5dAg== X-Gm-Message-State: AJIora9W2iso945ND7grw+XsIFo4RPG5lid/u3FvKggqte1qgy+zzBZv tS5As60QFs4icr5IsSUy40X3qA== X-Google-Smtp-Source: AGRyM1s0gt4ulh7gQyosbDsTz/KpcaaLwiKpHl+lH734s0SWXBFyEAjlRepFG0CDI6wqk+PdsFpjHw== X-Received: by 2002:a63:cd4d:0:b0:41a:f9b8:e221 with SMTP id a13-20020a63cd4d000000b0041af9b8e221mr10159163pgj.321.1658884085041; Tue, 26 Jul 2022 18:08:05 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:a854:710e:4f94:a11]) by smtp.gmail.com with ESMTPSA id b19-20020a62a113000000b0052ba88f2de0sm12277392pff.131.2022.07.26.18.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 18:08:04 -0700 (PDT) Date: Wed, 27 Jul 2022 10:08:00 +0900 From: Takahiro Akashi To: Ilias Apalodimas Cc: 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: <20220727010800.GA45744@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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(). (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 > >