From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH] efidebug: Introduce bootmgr command
Date: Wed, 10 Feb 2021 16:59:30 +0200 [thread overview]
Message-ID: <YCP00qWekh/86zoR@apalos.home> (raw)
In-Reply-To: <20210210125033.GA66649@laputa>
Hi Akashi,
On Wed, Feb 10, 2021 at 09:50:33PM +0900, AKASHI Takahiro wrote:
> On Wed, Feb 10, 2021 at 01:53:55PM +0200, Ilias Apalodimas wrote:
> > Hi Wolfgang,
> >
> > Thanks for having a look,
> >
> > On Wed, Feb 10, 2021 at 12:23:47PM +0100, Wolfgang Denk wrote:
> > > Dear Ilias,
> > >
> > > In message <20210210105425.356131-1-ilias.apalodimas@linaro.org> you wrote:
> > > > Up to now we've been adding all the efi related configuration to
> > > > 'efidebug' command. The command name feels a bit weird to configure boot
> > > > manager related commands. Since the bootmanager is growing and we intend
>
> I developed the command as a poorman's "efishell" as, at that time,
> EDK2's shell didn't work well on U-Boot UEFI subsystem.
>
> As far as I remember, Alex (ex-maintainer) didn't like to take this
> command, including "efidebug boot" subcommand, as a standard U-Boot command.
>
UEFI has grown substantially since then though and we can now use it to
install full distros. Having a command named 'efidebug' is the last place some
would look to configure boot options. Does it only feel weird to me?
> > > > to extend it with features like defining the initrd we want to expose to
> > > > the kernel, it would make sense to split it on a command of it's own.
> > > >
> > > > So let's introduce a new command called bootmgr and move all of the
> > > > existing Boot manager functionality there.
> > >
> > > As this is EFI specific, I would appreciate to have "efi" in the
> > > command name, too.
> > >
> > > Maybe all EFi related commands should be collected as "efi <subcommand>"
> > > like we did it with the "env" commands long ago.
> >
> > We could, I'll discuss this with Heinrich and see what he thinks.
> >
> > >
> > > For backward compatibility e. g. 'efidebug' could be kept, but the
> > > new name would be 'efi debug'; likewise, your new command would be
> > > 'efi bootmgr' [or just 'efi boot' ?]
>
> As a matter of fact, "efi" is even now recognized as "efidebug" thanks to
> command name completion as there is no other "efi*" command.
>
> Then,
> efidebug boot ..., and
> [efi]bootmgr boot ...
> can be invoked literally as
> efi boot ...
>
> So I don't see much advantage to Ilias' proposal.
>
Breaking the code in smaller, readable files, looked like a better option.
I'd much prefer it over a single huge file implementing a variety of
commands completely unrelated to each other, just because 'everything belongs
to the efi spec'.
It would also make our life and readability a lot easier in case we want to
include specific commands on a built. The alternative you propose implies a
file full of ifdefs, while we could just control them with Kconfig options
and makefiles.
> My suggestions are:
> * alias "efi" to "efidebug" (if preferred),
> * add new configuration options for efidebug's subcommands,
> * only enable "boot"-related options by default (if needed)
>
> Personally, I don't like to move the portion of code from one file
> to another since it will break git history.
>
How? The commit message clearly says "move the bootmgr functions to a diffrent file"
and the git log on efidebug will clear that up. It will even show the file that was
moved to.
> In addition, I have proposed to make "bootefi bootmgr" a standalone
> command/application, but Heinrich rejected it.
That's a different discussion, but if you go down that road you'd have to move
the 'bootefi selftest' as well?
> Given Ilias' concern(?), I still believe that the change is logical
> and makes more sense.
My concern here is to help people wanting to use the bootmgr. I don't have a
strong opinion on how that eventually can be implemented and that's why I am
open to suggestions. For the record I do prefer seperate commands, maybe even
prefixed by efi to make the distinction clear between u-boot native and EFI
related commands.
Cheers
/Ilias
>
> -Takahiro Akashi
>
> >
> > The efidebug for boot options wasn't introduced that long ago and I don't
> > think anyone uses it in production. If someone would want to have it backwards
> > compatible, please shout and we'll see what we can do, but I'd strongly prefer
> > replacing it overall. If we truly want backwards compatibility though we must keep
> > efidebug, changing the name to something like 'efi debug' just for the name
> > similarity wouldn't help much as it would break things regardless.
> >
> > Heinrich feel free to ignore the followup patch fixing the documentation of
> > efidebug. I'll change the name to something we all agree and fold in the doc
> > changes in v2.
> >
> > Thanks
> > /Ilias
> > >
> > > Thanks!
> > >
> > > Wolfgang Denk
> > >
> > > --
> > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> > > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> > > In my experience the best way to get something done is to give it to
> > > someone who is busy. - Terry Pratchett, _Going_Postal_
next prev parent reply other threads:[~2021-02-10 14:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 10:54 [PATCH] efidebug: Introduce bootmgr command Ilias Apalodimas
2021-02-10 11:23 ` Wolfgang Denk
2021-02-10 11:53 ` Ilias Apalodimas
2021-02-10 12:26 ` Wolfgang Denk
2021-02-10 12:46 ` Ilias Apalodimas
2021-02-10 16:10 ` Wolfgang Denk
2021-02-10 12:50 ` AKASHI Takahiro
2021-02-10 14:59 ` Ilias Apalodimas [this message]
2021-02-10 12:53 ` Heinrich Schuchardt
2021-02-10 16:17 ` Wolfgang Denk
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=YCP00qWekh/86zoR@apalos.home \
--to=ilias.apalodimas@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