public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/6] efi: make efi and bootmgr more usable
Date: Thu, 18 Oct 2018 14:24:30 +0900	[thread overview]
Message-ID: <20181018052428.GH32578@linaro.org> (raw)
In-Reply-To: <74acb30e-7225-eff3-22c4-22dae5bb4de4@suse.de>

On Wed, Oct 17, 2018 at 10:06:58AM +0200, Alexander Graf wrote:
> 
> 
> On 17.10.18 09:32, AKASHI Takahiro wrote:
> > This patch set is a collection of patches to enhance efi user interfaces
> > /commands. It will help improve user experience on efi boot and make it
> > more usable without edk2's shell utility.
> 
> That's amazing, thanks a lot :)
> 
> > Patch#1 to #4 are for efishell.
> > Patch#5 and #6 are for bootmgr.
> > 
> > Let's see how it works:
> > => efishell boot add 1 SHELL mmc 0:1 /Shell.efi ""
> > => efishell boot add 2 HELLO mmc 0:1 /hello.efi ""
> > => efishell boot dump
> 
> IMHO those 3 belong semantically to the "bootmgr" command. I can see how
> "bootefi bootmgr add 1 SHELL ..." is terrible UX. But then again it's
> not too much more to type than "efishell boot", right? ;)
> 
> So at the end of the day, these should probably be
> 
>  => bootefi bootmgr add 1 SHELL mmc 0:1 /Shell.efi ""
>  => bootefi bootmgr add 2 HELLO mmc 0:1 /hello.efi ""
>  => bootefi bootmgr dump

To be frank, I hesitate to agree with you for several reasons.
* Boot manager is a sort of boot loader application while adding/showing
  BootXXXX variables can be part of more generic system utility.
  (My interface here mimics uefi shell's bcfg command with slightly
   different syntax.)
* In future, we may want to have another sub command, "driver," to support
  driver loading, namely DriverOrder/DriverXXXX.
* Anyhow, we need another command for "setvar"( and "dumpvar").

> > Boot0001:
> > 	attributes: A-- (0x00000001)
> > 	label: SHELL
> > 	file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\\Shell.efi
> > 	data: 
> > Boot0002:
> > 	attributes: A-- (0x00000001)
> > 	label: HELLO
> > 	file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x086246ba,0x800,0x40000)/\\hello.efi
> > 	data: 
> > 
> > => efishell boot order 1 2
> > => efishell boot order
> 
> Same thing here :).
> 
> >  1: Boot0001: SHELL
> >  2: Boot0002: HELLO
> > 
> > => bootefi bootmgr -2
> > WARNING: booting without device tree
> > Booting: HELLO
> > ## Starting EFI application at 000000007db8b040 ...
> > Hello, world!
> > ## Application terminated, r = 0
> > 
> > => efishell setvar PlatformLang en        <--- important!
> 
> That one is slightly more complicated. How about we introduce a -e flag
> to all the env operations? Then this would become
> 
>  => setenv -e PlatformLang en
> 
> and you could print only EFI variables using
> 
>  => printenv -e
> 
> maybe one day we could then also just implement partial variable storage
> for UEFI variables:
> 
>  => saveenv -e
> 
> which we could then reuse in the ExitBootServices() call to persist EFI
> variables?

I didn't get your point. Can you please elaborate it?

> > => efishell bootmgr -1 or efishell bootmgr
> > 
> >    (shell ...)
> > 
> > # The only drawback is that it can be confusing to type
> >   "bootefi ..." and "efi(shell) boot ..." :)
> 
> Yes :).

The compromise I can imagine is that efishell be also aliased
to bootefi so that we can do:
 => efi(shell) boot add 1 ...
 => efi(shell) bootmgr -1 ( in my current syntax)
Yet we still maintain an old/boot*-style interface:
 => bootefi bootmgr or <appl addr>

Thanks,
-Takahiro Akashi

> 
> Alex

  reply	other threads:[~2018-10-18  5:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  7:32 [U-Boot] [PATCH 0/6] efi: make efi and bootmgr more usable AKASHI Takahiro
2018-10-17  7:32 ` [U-Boot] [PATCH 1/6] fs: update fs_dev_part in fs_set_blk_dev_with_part() AKASHI Takahiro
2018-10-17  7:32 ` [U-Boot] [PATCH 2/6] efi_loader: add efi_dp_from_name() AKASHI Takahiro
2018-10-17 10:46   ` [U-Boot] [U-Boot,2/6] " Heinrich Schuchardt
2018-10-17 10:48     ` Heinrich Schuchardt
2018-10-17  7:32 ` [U-Boot] [PATCH 3/6] efi_loader: bootmgr: add load option helper functions AKASHI Takahiro
2018-10-17  8:40   ` Alexander Graf
2018-10-18  7:57     ` AKASHI Takahiro
2018-10-18  8:39       ` Alexander Graf
2018-10-22  5:48         ` AKASHI Takahiro
2018-10-17  7:32 ` [U-Boot] [PATCH 4/6] cmd: add efishell command AKASHI Takahiro
2018-10-17  7:32 ` [U-Boot] [PATCH 5/6] bootefi: carve out fdt parameter handling AKASHI Takahiro
2018-10-17  7:32 ` [U-Boot] [PATCH 6/6] efi_loader: bootmgr: run an EFI application of a given load option AKASHI Takahiro
2018-10-17  8:43   ` Alexander Graf
2018-10-18  5:48     ` AKASHI Takahiro
2018-10-18  8:46       ` Alexander Graf
2018-10-22  5:37         ` AKASHI Takahiro
2018-10-22  6:58           ` Alexander Graf
2018-10-23  3:18             ` AKASHI Takahiro
2018-10-17  8:06 ` [U-Boot] [PATCH 0/6] efi: make efi and bootmgr more usable Alexander Graf
2018-10-18  5:24   ` AKASHI Takahiro [this message]
2018-10-18  9:03     ` Alexander Graf

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=20181018052428.GH32578@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.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