From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
Simon Glass <sjg@chromium.org>,
Takahiro Akashi <takahiro.akashi@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
Michal Simek <michal.simek@amd.com>,
Ovidiu Panait <ovidiu.panait@windriver.com>,
Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>,
Kever Yang <kever.yang@rock-chips.com>,
Chris Morgan <macromorgan@hotmail.com>,
Roland Gaudig <roland.gaudig@weidmueller.com>,
Huang Jianan <jnhuang95@gmail.com>
Subject: Re: [RESEND v9 2/9] eficonfig: menu-driven addition of UEFI boot option
Date: Tue, 19 Jul 2022 08:06:17 +0900 [thread overview]
Message-ID: <CADQ0-X9PmgHzcwHkaFG=a0CNjJJxctCgDn57Zjj-nP=RvM+T2A@mail.gmail.com> (raw)
In-Reply-To: <CAC_iWjLq9fFsEiE1=CZEQwh+6veAAWehmH0wDiQLkQ2=UpSUmg@mail.gmail.com>
Hi Ilias,
On Mon, 18 Jul 2022 at 22:31, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> Hi Kojima-san
>
>
> On Fri, 15 Jul 2022 at 17:45, Masahisa Kojima
> <masahisa.kojima@linaro.org> wrote:
> >
> > This commit add the "eficonfig" command.
> > The "eficonfig" command implements the menu-driven UEFI boot option
> > maintenance feature. This commit implements the addition of
> > new boot option. User can select the block device volume having
> > efi_simple_file_system_protocol and select the file corresponding
> > to the Boot#### variable. User can also enter the description and
> > optional_data of the BOOT#### variable in utf8.
> >
> > This commit adds "include/efi_config.h", it contains the common
> > definition to be used from other menus such as UEFI Secure Boot
> > key management.
> >
> > Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
> > ---
> > Changes in v9:
> > - move "efi_guid_bootmenu_auto_generated definition" into efi_bootmgr.c
> > to address build error when CMD_EFICONFIG is disabled
> > - fix typos and comment
> > - remove file system information from error message
> > - remove unreachable code in eficonfig_choice_entry()
> > - single printf() call as much as possible
> > - call only getchar() in eficonfig_print_msg()
> > - filter out '.' entry from file selection
> > - update the efi_disk_get_device_name() implementation
> > - add function comment
> >
> > Changes in v8:
> > - command name is change from "efimenu" to "eficonfig"
> > - function and struct prefixes is changed to "eficonfig"
> > - fix menu header string
> >
> > Changes in v7:
> > - add "efimenu" command and uefi variable maintenance code
> > moved into cmd/efimenu.c
> > - create include/efimenu.h to define the common definition for
> > the other menu such as UEFI Secure Boot key management
> > - update boot option edit UI, user can select description, file,
> > and optional_data to edit in the same menu like following.
> >
> > ** Edit Boot Option **
> >
> > Description: debian
> > File: virtio 0:1/EFI\debian\grubaa64.efi
> > Optional Data: test
> > Save
> > Quit
> >
> [...]
>
> I'll have a look at the code as well, but something weird is happening
> on QEMU. I got an ESP partition and I can save EFI variables in a
> ubootefi.var file. However every time I start QEMU the options I add
> via the menu are missing although the efi variables seem to be stored
> properly.
>
> => printenv -e
> [...]
> Boot0001:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x9d
> 00000000: 01 00 00 00 8b 00 67 00 72 00 75 00 62 00 00 00 ......g.r.u.b...
> 00000010: 01 04 14 00 b9 73 1d e6 84 a3 cc 4a ae ab 82 e8 .....s.....J....
> 00000020: 28 f3 62 8b 01 04 15 00 92 37 29 63 f5 ad 25 93 (.b......7)c..%.
> 00000030: b9 9f 4e 0e 45 5c 1b 1e 00 04 01 2a 00 01 00 00 ..N.E\.....*....
> 00000040: 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 ................
> 00000050: 00 10 56 ae bd 31 33 4d 4e 94 66 ac b5 ca f0 b4 ..V..13MN.f.....
> 00000060: a6 02 02 04 04 34 00 45 00 46 00 49 00 5c 00 64 .....4.E.F.I.\.d
> 00000070: 00 65 00 62 00 69 00 61 00 6e 00 5c 00 67 00 72 .e.b.i.a.n.\.g.r
> 00000080: 00 75 00 62 00 61 00 61 00 36 00 34 00 2e 00 65 .u.b.a.a.6.4...e
> 00000090: 00 66 00 69 00 00 00 7f ff 04 00 00 00 .f.i.........
> Boot0002:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x9d
> 00000000: 01 00 00 00 8b 00 67 00 72 00 75 00 62 00 00 00 ......g.r.u.b...
> 00000010: 01 04 14 00 b9 73 1d e6 84 a3 cc 4a ae ab 82 e8 .....s.....J....
> 00000020: 28 f3 62 8b 01 04 15 00 92 37 29 63 f5 ad 25 93 (.b......7)c..%.
> 00000030: b9 9f 4e 0e 45 5c 1b 1e 00 04 01 2a 00 01 00 00 ..N.E\.....*....
> 00000040: 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 ................
> 00000050: 00 10 56 ae bd 31 33 4d 4e 94 66 ac b5 ca f0 b4 ..V..13MN.f.....
> 00000060: a6 02 02 04 04 34 00 45 00 46 00 49 00 5c 00 64 .....4.E.F.I.\.d
> 00000070: 00 65 00 62 00 69 00 61 00 6e 00 5c 00 67 00 72 .e.b.i.a.n.\.g.r
> 00000080: 00 75 00 62 00 61 00 61 00 36 00 34 00 2e 00 65 .u.b.a.a.6.4...e
> 00000090: 00 66 00 69 00 00 00 7f ff 04 00 00 00 .f.i.........
> Boot0003:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x9d
> 00000000: 01 00 00 00 8b 00 67 00 72 00 75 00 62 00 00 00 ......g.r.u.b...
> 00000010: 01 04 14 00 b9 73 1d e6 84 a3 cc 4a ae ab 82 e8 .....s.....J....
> 00000020: 28 f3 62 8b 01 04 15 00 92 37 29 63 f5 ad 25 93 (.b......7)c..%.
> 00000030: b9 9f 4e 0e 45 5c 1b 1e 00 04 01 2a 00 01 00 00 ..N.E\.....*....
> 00000040: 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 ................
> 00000050: 00 10 56 ae bd 31 33 4d 4e 94 66 ac b5 ca f0 b4 ..V..13MN.f.....
> 00000060: a6 02 02 04 04 34 00 45 00 46 00 49 00 5c 00 64 .....4.E.F.I.\.d
> 00000070: 00 65 00 62 00 69 00 61 00 6e 00 5c 00 67 00 72 .e.b.i.a.n.\.g.r
> 00000080: 00 75 00 62 00 61 00 61 00 36 00 34 00 2e 00 65 .u.b.a.a.6.4...e
> 00000090: 00 66 00 69 00 00 00 7f ff 04 00 00 00 .f.i.........
> Boot0004:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x9f
> 00000000: 01 00 00 00 8d 00 67 00 72 00 75 00 62 00 00 00 ......g.r.u.b...
> 00000010: 01 04 14 00 b9 73 1d e6 84 a3 cc 4a ae ab 82 e8 .....s.....J....
> 00000020: 28 f3 62 8b 01 04 15 00 92 37 29 63 f5 ad 25 93 (.b......7)c..%.
> 00000030: b9 9f 4e 0e 45 5c 1b 1e 00 04 01 2a 00 01 00 00 ..N.E\.....*....
> 00000040: 00 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 ................
> 00000050: 00 10 56 ae bd 31 33 4d 4e 94 66 ac b5 ca f0 b4 ..V..13MN.f.....
> 00000060: a6 02 02 04 04 36 00 2f 00 45 00 46 00 49 00 5c .....6./.E.F.I.\
> 00000070: 00 64 00 65 00 62 00 69 00 61 00 6e 00 5c 00 73 .d.e.b.i.a.n.\.s
> 00000080: 00 68 00 69 00 6d 00 61 00 61 00 36 00 34 00 2e .h.i.m.a.a.6.4..
> 00000090: 00 65 00 66 00 69 00 00 00 7f ff 04 00 00 00 .e.f.i.........
> Boot0000:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x6e
> 00000000: 01 00 00 00 62 00 6c 00 61 00 00 00 04 01 2a 00 ....b.l.a.....*.
> 00000010: 01 00 00 00 00 08 00 00 00 00 00 00 00 00 10 00 ................
> 00000020: 00 00 00 00 10 56 ae bd 31 33 4d 4e 94 66 ac b5 .....V..13MN.f..
> 00000030: ca f0 b4 a6 02 02 04 04 34 00 45 00 46 00 49 00 ........4.E.F.I.
> 00000040: 5c 00 64 00 65 00 62 00 69 00 61 00 6e 00 5c 00 \.d.e.b.i.a.n.\.
> 00000050: 67 00 72 00 75 00 62 00 61 00 61 00 36 00 34 00 g.r.u.b.a.a.6.4.
> 00000060: 2e 00 65 00 66 00 69 00 00 00 7f ff 04 00 ..e.f.i.......
> BootOrder:
> 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID)
> NV|BS|RT, DataSize = 0x2
> 00000000: 00 00
>
Does the above log mean that BootOrder variable is not updated?
>
> Is that reproducible on your tests? I can try real hardware as well
> or resetting the EFI variables
I can not reproduce the issue. Do you test with the RPMB on QEMU?
I usually test on qemu_arm64.
Thanks,
Masahisa Kojima
>
> Regards
> /Ilias
next prev parent reply other threads:[~2022-07-18 23:06 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 14:47 [RESEND v9 0/9] enable menu-driven UEFI variable maintenance Masahisa Kojima
2022-07-15 14:47 ` [RESEND v9 1/9] efi_loader: move udevice pointer into struct efi_object Masahisa Kojima
2022-07-17 8:09 ` Heinrich Schuchardt
2022-07-17 11:23 ` Heinrich Schuchardt
2022-07-20 5:23 ` Takahiro Akashi
2022-07-20 7:37 ` Heinrich Schuchardt
2022-07-22 2:00 ` Masahisa Kojima
2022-07-19 23:56 ` Takahiro Akashi
2022-07-20 7:44 ` Heinrich Schuchardt
2022-07-22 2:42 ` Takahiro Akashi
2022-07-15 14:47 ` [RESEND v9 2/9] eficonfig: menu-driven addition of UEFI boot option Masahisa Kojima
2022-07-18 13:31 ` Ilias Apalodimas
2022-07-18 23:06 ` Masahisa Kojima [this message]
2022-07-19 7:33 ` Ilias Apalodimas
2022-07-19 10:11 ` Ilias Apalodimas
2022-07-22 2:01 ` Masahisa Kojima
2022-07-15 14:47 ` [RESEND v9 3/9] eficonfig: add "Edit Boot Option" menu entry Masahisa Kojima
2022-07-15 14:47 ` [RESEND v9 4/9] menu: add KEY_PLUS and KEY_MINUS handling Masahisa Kojima
2022-07-18 12:39 ` Ilias Apalodimas
2022-07-15 14:47 ` [RESEND v9 5/9] eficonfig: add "Change Boot Order" menu entry Masahisa Kojima
2022-07-19 13:09 ` Ilias Apalodimas
2022-07-15 14:47 ` [RESEND v9 6/9] eficonfig: add "Delete Boot Option" " Masahisa Kojima
2022-07-15 14:47 ` [RESEND v9 7/9] bootmenu: add removable media entries Masahisa Kojima
2022-07-20 14:07 ` Ilias Apalodimas
2022-07-15 14:47 ` [RESEND v9 8/9] doc:bootmenu: add description for UEFI boot support Masahisa Kojima
2022-07-18 13:05 ` Ilias Apalodimas
2022-07-15 14:47 ` [RESEND v9 9/9] doc:eficonfig: add documentation for eficonfig command Masahisa Kojima
2022-07-19 8:03 ` Ilias Apalodimas
2022-07-19 10:15 ` Masahisa Kojima
2022-07-19 12:52 ` Ilias Apalodimas
2022-07-22 2:03 ` 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='CADQ0-X9PmgHzcwHkaFG=a0CNjJJxctCgDn57Zjj-nP=RvM+T2A@mail.gmail.com' \
--to=masahisa.kojima@linaro.org \
--cc=ashok.reddy.soma@xilinx.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jnhuang95@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=macromorgan@hotmail.com \
--cc=mark.kettenis@xs4all.nl \
--cc=michal.simek@amd.com \
--cc=ovidiu.panait@windriver.com \
--cc=roland.gaudig@weidmueller.com \
--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).