All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Cc: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	Dennis Gilmore <dennis@ausil.us>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Lukas Auer <lukas.auer@aisec.fraunhofer.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Michal Simek <michal.simek@xilinx.com>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Steffen Jaeckel <jaeckel-floss@eyet-services.de>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Marek Vasut <marex@denx.de>,
	Pavel Herrmann <morpheus.ibis@gmail.com>,
	Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v4 00/33] Initial implementation of standard boot
Date: Wed, 23 Mar 2022 16:07:03 -0400	[thread overview]
Message-ID: <20220323200703.GN2226424@bill-the-cat> (raw)
In-Reply-To: <CAOf5uwkas7m9rvrCPUi8-jdaOknBFMZGU--6f2M6FAN_V9QaXQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7652 bytes --]

On Wed, Mar 23, 2022 at 08:57:36PM +0100, Michael Nazzareno Trimarchi wrote:
> Hi Tom
> 
> On Wed, Mar 23, 2022 at 8:30 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Mar 23, 2022 at 08:21:22PM +0100, Michael Nazzareno Trimarchi wrote:
> > > Hi Tom
> > >
> > > On Wed, Mar 23, 2022 at 7:46 PM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi Tom,
> > > >
> > > > On Wed, 23 Mar 2022 at 08:05, Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Sun, Mar 06, 2022 at 05:49:43AM -0700, Simon Glass wrote:
> > > > > >
> > > > > > The bootflow feature provide a built-in way for U-Boot to automatically
> > > > > > boot an Operating System without custom scripting and other customisation.
> > > > > > This is called 'standard boot' since it provides a standard way for
> > > > > > U-Boot to boot a distro, without scripting.
> > > > > >
> > > > > > It introduces the following concepts:
> > > > > >
> > > > > >    - bootdev - a device which can hold a distro
> > > > > >    - bootmeth - a method to scan a bootdev to find bootflows (owned by
> > > > > >                 U-Boot)
> > > > > >    - bootflow - a description of how to boot (owned by the distro)
> > > > > >
> > > > > > This series provides an implementation of these, enabled to scan for
> > > > > > bootflows from MMC, USB and Ethernet. It supports the existing distro
> > > > > > boot as well as the EFI loader flow (bootefi/bootmgr). It works
> > > > > > similiarly to the existing script-based approach, but is native to
> > > > > > U-Boot.
> > > > > >
> > > > > > With this we can boot on a Raspberry Pi 3 with just one command:
> > > > > >
> > > > > >    bootflow scan -lb
> > > > > >
> > > > > > which means to scan, listing (-l) each bootflow and trying to boot each
> > > > > > one (-b). The final patch shows this.
> > > > > >
> > > > > > With a standard way to identify boot devices, booting become easier. It
> > > > > > also should be possible to support U-Boot scripts, for backwards
> > > > > > compatibility only.
> > > > > >
> > > > > > This series relies on the PXE clean-up series, posted here:
> > > > > >
> > > > > >    https://patchwork.ozlabs.org/project/uboot/list/?series=267078
> > > > > >
> > > > > > For documentation, see the 'doc' patch.
> > > > > >
> > > > > > For version 2, a new naming scheme is used as above:
> > > > > >
> > > > > >    - bootdev is used instead of bootdevice, because 'device' is overused,
> > > > > >        is everywhere in U-Boot, can be confused with udevice
> > > > > >    - bootmeth - because 'method' is too vanilla, appears 1300 times in
> > > > > >        U-Boot
> > > > > >
> > > > > > Also in version 2, drivers are introduced for the boot methods, to make
> > > > > > it more extensible. Booting a custom OS is simply a matter of creating a
> > > > > > bootmeth for it and implementing the read_file() and boot() methods.
> > > > > >
> > > > > > Version 4 makes some minor improvements and leaves out the RFC patch for
> > > > > > rpi conversion, in the hope of getting the base support applied sooner
> > > > > > rather than later.
> > > > > >
> > > > > > The design is described in these two documents:
> > > > > >
> > > > > > https://drive.google.com/file/d/1ggW0KJpUOR__vBkj3l61L2dav4ZkNC12/view?usp=sharing
> > > > > >
> > > > > > https://drive.google.com/file/d/1kTrflO9vvGlKp-ZH_jlgb9TY3WYG6FF9/view?usp=sharing
> > > > >
> > > > > I keep putting off commenting more here, but, I still feel this is the
> > > > > wrong direction.  What problems do we have today with distro boot?
> > > > > Well, we haven't figured out how to move configuring it out of the board
> > > > > config.h file.  But that's just one of a half dozen or so examples of
> > > > > how we haven't figured out a good solution to configuring the default
> > > > > environment.  And only some of those other examples are boot related
> > > > > (the NXP chain of trust booting stuff is another boot example, ETHPRIME,
> > > > > HOSTNAME, etc, are non-boot examples).
> > > > >
> > > > > We also aren't improving testing of "can we boot" here, because what
> > > > > THAT needs is setting up LAVA and booting some installers on some
> > > > > hardware (and some QEMU).  That's testing that Linux boot works.  Today
> > > > > we have tests for hush parsing, and if distro boot makes use of
> > > > > something we don't have a test for, we need a test for it.  This adds
> > > > > tests for itself, which is good.
> > > > >
> > > > > And I still don't see an example of where this demonstrates that
> > > > > existing non-UEFI boot cases are now easier to handle or cleaner to
> > > > > handle or otherwise better.
> > > > >
> > > > > In that this is an attempt to tackle one of the long standing needed
> > > > > migrations (be able to drop board config.h files), something here needs
> > > > > doing.  But I don't see this as the right direction, sorry.
> > > >
> > > > Does anyone have a better idea for all of this? This is a solid base
> > > > we can build on but we can't make any progress while this is just
> > > > patches. What not apply it and we can move forward?
> > > >
> > >
> > > I agree with Simon. Having a well documented flow, help to integrate
> > > products and have a standard
> > > way to handle the booting flow
> > >
> > > > - solves the env problem for distro boot in that we don't need the scripts
> > > > - gets rid of the scripts which are a confusing mess
> > > > - provides proper high-level concepts of boot device and boot method
> > > > - allows testing of the U-Boot part of 'can we boot' because we have
> > > > tests for all the cases - we can expand this over time
> > > > - allows non-UEFI boot cases like Chrome OS, which is currently just a
> > > > hack for one board[1]
> > > > - provides a programmatic base for A/B boot, etc.
> > > >
> > > > I feel the same way with Takahiro's series, which has been out-of-tree
> > > > for too long.
> > >
> > > I don't see the problem in having it merged. I'm dealing every day
> > > with crazy script
> > > to handle situation like [1] and I think that company that integrates
> > > their product can
> > > benefits on those changes. They can be improved with other people
> > > wants to use it
> > > in their products.
> > >
> > > Michael
> > >
> > > >
> > > > Please reconsider this. What do we have to lose?
> > > >
> > > > Regards,
> > > > Simon
> > > >
> > > > [1] CONFIG_BOOTCOMMAND="tpm init; tpm startup TPM2_SU_CLEAR; read mmc
> > > > 0:2 100000 0 80; setexpr loader *001004f0; setexpr size *00100518;
> > > > setexpr blocks $size / 200; read mmc 0:2 100000 80 $blocks; setexpr
> > > > setup $loader - 1000; setexpr cmdline_ptr $loader - 2000; setexpr.s
> > > > cmdline *$cmdline_ptr; setexpr cmdline gsub %U \\\\${uuid}; if part
> > > > uuid mmc 0:2 uuid; then zboot start 100000 0 0 0 $setup cmdline; zboot
> > > > load; zboot setup; zboot dump; zboot go;fi"
> >
> > OK, and what does your example here look like on top of Simon's series?
> > Or do you just mean ChromeOS boot?
> 
> I can use some of our boards and move on to the Simon patchset. In
> that case, are you happy with it?

No, I'm not saying I'll take this if someone uses it somewhere.  But
I've been asking for in previous iterations for showing that it makes
some existing use case easier.  And I don't see any implementations of
that in v4.  Adding UEFI boot to this isn't a good example since that's
already being re-done via the UEFI boot manager series that implements
what the spec says to do for that.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-03-23 20:07 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 12:49 [PATCH v4 00/33] Initial implementation of standard boot Simon Glass
2022-03-06 12:49 ` [PATCH v4 01/33] lib: Move string tests to the string module Simon Glass
2022-03-06 12:49 ` [PATCH v4 02/33] test: Add tests for trailing_strtol() Simon Glass
2022-03-06 12:49 ` [PATCH v4 03/33] lib: Correct comment formatting to avoid sphinx problems Simon Glass
2022-03-06 12:49 ` [PATCH v4 04/33] lib: Fix a few bugs in trailing_strtoln() Simon Glass
2022-03-06 12:49 ` [PATCH v4 05/33] lib: Add a way to find the postiion of a trailing number Simon Glass
2022-03-06 12:49 ` [PATCH v4 06/33] dm: core: Rename and fix uclass_get_by_name_len() Simon Glass
2022-03-06 12:49 ` [PATCH v4 07/33] dm: core: Allow finding a uclass device by partial name Simon Glass
2022-03-06 12:49 ` [PATCH v4 08/33] test: fastboot: Avoid using mmc1 Simon Glass
2022-03-06 12:49 ` [PATCH v4 09/33] test: dm: Restart USB before assuming it is stopped Simon Glass
2022-03-06 12:49 ` [PATCH v4 10/33] dm: blk: Add a function to return the device type Simon Glass
2022-03-06 12:49 ` [PATCH v4 11/33] fs: Add a function to set the filesystem type Simon Glass
2022-03-06 12:49 ` [PATCH v4 12/33] bootstd: Add the concept of a bootflow Simon Glass
2022-03-06 12:49 ` [PATCH v4 13/33] bootstd: Add the bootstd uclass and core implementation Simon Glass
2022-03-12 14:35   ` Ilias Apalodimas
2022-03-12 17:58     ` Simon Glass
2022-03-06 12:49 ` [PATCH v4 14/33] bootstd: Add the bootdev uclass Simon Glass
2022-03-06 12:49 ` [PATCH v4 15/33] bootstd: Add the bootmeth uclass and helpers Simon Glass
2022-03-06 12:49 ` [PATCH v4 16/33] bootstd: Add support for bootflows Simon Glass
2022-03-06 12:50 ` [PATCH v4 17/33] bootstd: Add a bootdev command Simon Glass
2022-03-06 12:50 ` [PATCH v4 19/33] bootstd: Add a bootmeth command Simon Glass
2022-03-06 12:50 ` [PATCH v4 21/33] bootstd: mmc: Add a bootdev driver Simon Glass
2022-03-06 12:50 ` [PATCH v4 22/33] bootstd: ethernet: " Simon Glass
2022-03-06 12:50 ` [PATCH v4 23/33] bootstd: Add an implementation of distro PXE boot Simon Glass
2022-03-06 12:50 ` [PATCH v4 24/33] bootstd: Add an implementation of EFI boot Simon Glass
2022-03-06 12:50 ` [PATCH v4 25/33] bootstd: Add a system bootdev for strange boot methods Simon Glass
2022-03-06 12:50 ` [PATCH v4 27/33] bootstd: Add a sandbox bootmeth driver Simon Glass
2022-03-06 12:50 ` [PATCH v4 28/33] bootstd: sandbox: Add a hostfs bootdev Simon Glass
2022-03-06 12:50 ` [PATCH v4 30/33] bootstd: usb: Add a bootdev driver Simon Glass
2022-03-06 12:50 ` [PATCH v4 31/33] bootstd: Add tests for bootstd including all uclasses Simon Glass
2022-03-06 12:50 ` [PATCH v4 32/33] bootstd: Add setup for the bootflow tests Simon Glass
2022-03-06 12:50 ` [PATCH v4 33/33] bootstd: doc: Add documentation Simon Glass
2022-03-13 15:47 ` [PATCH v4 00/33] Initial implementation of standard boot Mark Kettenis
2022-03-13 22:23   ` Simon Glass
2022-03-23 14:05 ` Tom Rini
2022-03-23 18:45   ` Simon Glass
2022-03-23 19:21     ` Michael Nazzareno Trimarchi
2022-03-23 19:30       ` Tom Rini
2022-03-23 19:57         ` Michael Nazzareno Trimarchi
2022-03-23 20:07           ` Tom Rini [this message]
2022-03-25 14:36             ` Michael Nazzareno Trimarchi
2022-03-25 14:50               ` Tom Rini
2022-03-26 19:56                 ` Simon Glass
2022-03-26 19:58                   ` Tom Rini
2022-03-26 20:51                     ` Simon Glass
2022-03-27 11:00                       ` Michael Nazzareno Trimarchi
2022-03-29  1:36                       ` Tom Rini
2022-03-23 23:15       ` Mark Kettenis
2022-03-24  2:18         ` Simon Glass
2022-03-23 20:09     ` Tom Rini
2022-03-24  2:13       ` Simon Glass
2022-03-24 14:46         ` Tom Rini
2022-03-24 18:33           ` Simon Glass
2022-03-24 19:27             ` Tom Rini
2022-03-24 20:04               ` Simon Glass
2022-03-24 21:16                 ` Tom Rini

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=20220323200703.GN2226424@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=dennis@ausil.us \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jaeckel-floss@eyet-services.de \
    --cc=jh80.chung@samsung.com \
    --cc=lukas.auer@aisec.fraunhofer.de \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=michal.simek@xilinx.com \
    --cc=morpheus.ibis@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=sjg@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.