From: Tom Rini <trini@konsulko.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Simon Glass <sjg@chromium.org>,
heinrich.schuchardt@canonical.com, ilias.apalodimas@linaro.org,
daniel.schwierzeck@gmail.com, dennis@ausil.us,
jaeckel-floss@eyet-services.de, lukas.auer@aisec.fraunhofer.de,
michal.simek@xilinx.com, u-boot@lists.denx.de
Subject: Re: [PATCH v3 30/31] bootstd: doc: Add documentation
Date: Fri, 21 Jan 2022 13:41:39 -0500 [thread overview]
Message-ID: <20220121184139.GA7004@bill-the-cat> (raw)
In-Reply-To: <d3cbca82c9afac4c@bloch.sibelius.xs4all.nl>
[-- Attachment #1: Type: text/plain, Size: 6725 bytes --]
On Fri, Jan 21, 2022 at 07:22:55PM +0100, Mark Kettenis wrote:
> > From: Simon Glass <sjg@chromium.org>
> > Date: Fri, 21 Jan 2022 09:53:37 -0700
> >
> > Hi Mark,
> >
> > On Fri, 21 Jan 2022 at 09:03, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > >
> > > > From: Simon Glass <sjg@chromium.org>
> > > > Date: Fri, 21 Jan 2022 08:20:17 -0700
> > > >
> > > > Hi,
> > > >
> > > > On Fri, 21 Jan 2022 at 08:08, Tom Rini <trini@konsulko.com> wrote:
> > > > >
> > > > > On Wed, Jan 19, 2022 at 12:39:03PM +0100, Heinrich Schuchardt wrote:
> > > > > > On 1/19/22 02:43, Simon Glass wrote:
> > > > > > > Add documentation for this feature, including the commands and full
> > > > > > > devicetree bindings.
> > > > > > >
> > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > > ---
> > > > > > >
> > > > > > > Changes in v3:
> > > > > > > - Update docs for "bootmeths" and "boot_targets" env vars
> > > > > > >
> > > > > > > MAINTAINERS | 4 +
> > > > > > > doc/develop/bootstd.rst | 638 ++++++++++++++++++++++++++
> > > > > > > doc/develop/distro.rst | 3 +
> > > > > > > doc/develop/index.rst | 1 +
> > > > > > > doc/device-tree-bindings/bootdev.txt | 18 +
> > > > > > > doc/device-tree-bindings/bootmeth.txt | 31 ++
> > > > > > > doc/device-tree-bindings/bootstd.txt | 8 +
> > > > > > > doc/usage/bootdev.rst | 135 ++++++
> > > > > > > doc/usage/bootflow.rst | 427 +++++++++++++++++
> > > > > > > doc/usage/bootmeth.rst | 108 +++++
> > > > > > > doc/usage/index.rst | 3 +
> > > > > > > 11 files changed, 1376 insertions(+)
> > > > > > > create mode 100644 doc/develop/bootstd.rst
> > > > > > > create mode 100644 doc/device-tree-bindings/bootmeth.txt
> > > > > > > create mode 100644 doc/usage/bootdev.rst
> > > > > > > create mode 100644 doc/usage/bootflow.rst
> > > > > > > create mode 100644 doc/usage/bootmeth.rst
> > > > > > >
> > > > > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > > > > index 8ad70d3d968..c2af8ada3c9 100644
> > > > > > > --- a/MAINTAINERS
> > > > > > > +++ b/MAINTAINERS
> > > > > > > @@ -669,6 +669,10 @@ F: boot/bootmeth*.c
> > > > > > > F: boot/bootstd.c
> > > > > > > F: cmd/bootdev.c
> > > > > > > F: cmd/bootflow.c
> > > > > > > +F: doc/develop/bootstd.rst
> > > > > > > +F: doc/usage/bootdev.rst
> > > > > > > +F: doc/usage/bootflow.rst
> > > > > > > +F: doc/usage/bootmeth.rst
> > > > > > > F: drivers/mmc/mmc_bootdev.c
> > > > > > > F: include/bootdev.h
> > > > > > > F: include/bootflow.h
> > > > > > > diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
> > > > > > > new file mode 100644
> > > > > > > index 00000000000..1b65a806efb
> > > > > > > --- /dev/null
> > > > > > > +++ b/doc/develop/bootstd.rst
> > > > > > > @@ -0,0 +1,638 @@
> > > > > > > +.. SPDX-License-Identifier: GPL-2.0+:
> > > > > > > +
> > > > > > > +U-Boot Standard Boot
> > > > > > > +====================
> > > > > > > +
> > > > > > > +Introduction
> > > > > > > +------------
> > > > > > > +
> > > > > > > +Standard boot provides a built-in way for U-Boot to automatically boot
> > > > > > > +an Operating System without custom scripting and other customisation. It
> > > > > > > +introduces the following concepts:
> > > > > > > +
> > > > > > > + - bootdev - a device which can hold or access a distro (e.g. MMC, Ethernet)
> > > > > > > + - bootmeth - a method to scan a bootdev to find bootflows (e.g. distro boot)
> > > > > > > + - bootflow - a description of how to boot (provided by the distro)
> > > > > > > +
> > > > > > > +For Linux, the distro (Linux distribution, e.g. Debian, Fedora) is responsible
> > > > > > > +for creating a bootflow for each kernel combination that it wants to offer.
> > > > > >
> > > > > > This gets it completely wrong. There is one standardized boot flow: UEFI.
> > > > > > All major distros support this. U-Boot has to offer UEFI booting out of the
> > > > > > box.
> > > > >
> > > > > I want to jump up and down and emphasize this part as well. While I
> > > > > believe our UEFI bootmgr is still missing the normal scan code, that's
> > > > > something that has been promised to be implemented. And that turns the
> > > > > bootcmd for platforms that just want to support modern off the shelf
> > > > > distros in to something fairly small.
> > > >
> > > > Sigh...
> > > >
> > > > UEFI is a bootflow in this model, one of many. If we don't support the
> > > > others, then U-Boot is not U-Boot anymore, it is just EFI Boot.
> > > >
> > > > If we get EFI bootmgr going, then are you saying you want to disable
> > > > everything else?
> > > >
> > > > You say 'major distros' but there are many that don't use it,
> > > > particularly in the embedded space. I'll go out on a limb and say that
> > > > the vast majority of embedded devices in the world don't use it. Are
> > > > you really saying we should drop support for everything else? Even the
> > > > distro stuff supports other options.
> > >
> > > And U-Boot supports a wide variety of CPUs and some of those don't
> > > even have official UEFI support.
> > >
> > > However, on arm64 (and possibly riscv64) even the embedded folks
> > > should seriously consider using the UEFI bootflow. Linux now supports
> > > physical address randomization when loaded via the UEFI stub, which is
> > > something that can't really be implemented using the legacy boot path.
> > > Note that you don't have to use a separate UEFI bootloader as U-Boot
> > > can directly boot kernels with the UEFI stub.
> >
> > 'legacy'? Isn't it just a case of relocating the kernel to a random
> > address? I'm pretty sure U-Boot can do that :-)
>
> The problem is that the legacy boot protocol for the Linux arm64
> kernel requires a 2MB aligned kernel base, which reduces the number of
> randomized bits. That also means that virtual addresses are not fully
> randomized as the kernel uses large mappings to map itself. My
> understanding is that the UEFI stub can relocate the kernel to any 64K
> aligned address. I suppose it is possible to add code to achieve the
> same thing for the legacy boot path, but I don't think the arm64
> maintainers are really interested in doing that.
>
> But yes, U-Boot should certainly try to load arm64 kernels at a random
> address instead hardcoding the load address ;)
Well, it sounds like "bootefi" should be used over "booti" directly,
these days on aarch64 kernels.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-01-21 18:41 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 1:42 [PATCH v3 00/31] Initial implementation of standard boot Simon Glass
2022-01-19 1:42 ` [PATCH v3 01/31] str: Move string tests to the string module Simon Glass
2022-01-19 11:15 ` Heinrich Schuchardt
2022-03-06 3:08 ` Simon Glass
2022-01-19 1:42 ` [PATCH v3 02/31] test: Add tests for trailing_strtol() Simon Glass
2022-01-19 11:26 ` Heinrich Schuchardt
2022-01-19 1:42 ` [PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln() Simon Glass
2022-01-31 9:44 ` Rasmus Villemoes
2022-01-31 16:13 ` Simon Glass
2022-01-19 1:42 ` [PATCH v3 04/31] lib: Add a way to find the postiion of a trailing number Simon Glass
2022-01-19 11:27 ` Heinrich Schuchardt
2022-01-19 14:37 ` Simon Glass
2022-01-19 15:11 ` Tom Rini
2022-01-19 17:23 ` Heinrich Schuchardt
2022-01-20 3:16 ` AKASHI Takahiro
2022-03-06 3:08 ` Simon Glass
2022-01-19 1:42 ` [PATCH v3 05/31] dm: core: Rename uclass_get_by_name_len() Simon Glass
2022-01-19 11:28 ` Heinrich Schuchardt
2022-01-19 1:42 ` [PATCH v3 06/31] dm: core: Allow finding a uclass device by partial name Simon Glass
2022-01-19 11:28 ` Heinrich Schuchardt
2022-01-19 1:42 ` [PATCH v3 07/31] test: fastboot: Avoid using mmc1 Simon Glass
2022-01-19 1:42 ` [PATCH v3 08/31] test: dm: Restart USB before assuming it is stopped Simon Glass
2022-01-19 1:42 ` [PATCH v3 09/31] dm: blk: Add a function to return the device type Simon Glass
2022-01-19 11:30 ` Heinrich Schuchardt
2022-01-19 1:42 ` [PATCH v3 10/31] bootstd: Add the concept of a bootflow Simon Glass
2022-01-19 1:42 ` [PATCH v3 11/31] bootstd: Add the bootstd uclass and core implementation Simon Glass
2022-01-19 1:42 ` [PATCH v3 12/31] bootstd: Add the bootdev uclass Simon Glass
2022-01-19 1:42 ` [PATCH v3 13/31] bootstd: Add the bootmeth uclass and helpers Simon Glass
2022-01-19 1:42 ` [PATCH v3 14/31] bootstd: Add support for bootflows Simon Glass
2022-01-19 1:42 ` [PATCH v3 15/31] bootstd: Add a bootdev command Simon Glass
2022-01-19 1:43 ` [PATCH v3 16/31] bootstd: Add a bootflow command Simon Glass
2022-01-19 1:43 ` [PATCH v3 17/31] bootstd: Add a bootmeth command Simon Glass
2022-01-19 1:43 ` [PATCH v3 18/31] bootstd: Add an implementation of distro boot Simon Glass
2022-01-19 1:43 ` [PATCH v3 19/31] bootstd: mmc: Add a bootdev driver Simon Glass
2022-01-19 1:43 ` [PATCH v3 20/31] bootstd: ethernet: " Simon Glass
2022-01-19 1:43 ` [PATCH v3 21/31] bootstd: Add an implementation of distro PXE boot Simon Glass
2022-01-19 1:43 ` [PATCH v3 22/31] bootstd: Add an implementation of EFI boot Simon Glass
2022-01-19 8:08 ` Michael Walle
2022-01-19 11:45 ` Heinrich Schuchardt
2022-03-06 3:08 ` Simon Glass
2022-03-07 9:03 ` Michael Walle
2022-01-19 1:43 ` [PATCH v3 23/31] bootstd: Add a system bootdev for strange boot methods Simon Glass
2022-01-19 1:43 ` [PATCH v3 24/31] bootstd: Add an implementation of EFI bootmgr Simon Glass
2022-01-19 11:47 ` Heinrich Schuchardt
2022-03-06 3:08 ` Simon Glass
2022-03-12 9:36 ` Ilias Apalodimas
2022-03-12 17:58 ` Simon Glass
2022-01-19 1:43 ` [PATCH v3 25/31] bootstd: Add a sandbox bootmeth driver Simon Glass
2022-01-19 1:43 ` [PATCH v3 26/31] bootstd: Add an implementation of script boot Simon Glass
2022-01-19 1:43 ` [PATCH v3 27/31] bootstd: usb: Add a bootdev driver Simon Glass
2022-01-19 1:43 ` [PATCH v3 28/31] bootstd: Add tests for bootstd including all uclasses Simon Glass
2022-01-19 1:43 ` [PATCH v3 29/31] bootstd: Add setup for the bootflow tests Simon Glass
2022-01-19 1:43 ` [PATCH v3 30/31] bootstd: doc: Add documentation Simon Glass
2022-01-19 11:39 ` Heinrich Schuchardt
2022-01-21 15:08 ` Tom Rini
2022-01-21 15:20 ` Simon Glass
2022-01-21 15:31 ` Tom Rini
2022-01-21 16:02 ` Simon Glass
2022-01-21 18:09 ` Tom Rini
2022-01-21 19:14 ` Simon Glass
2022-01-21 19:23 ` Tom Rini
2022-01-21 21:15 ` Simon Glass
2022-01-21 21:46 ` Tom Rini
2022-01-21 22:18 ` Simon Glass
2022-01-30 0:48 ` Ilias Apalodimas
2022-01-21 16:03 ` Mark Kettenis
2022-01-21 16:53 ` Simon Glass
2022-01-21 18:22 ` Mark Kettenis
2022-01-21 18:41 ` Tom Rini [this message]
2022-01-21 19:17 ` Simon Glass
2022-01-21 22:05 ` Heinrich Schuchardt
2022-01-21 22:13 ` Simon Glass
2022-01-22 11:44 ` Mark Kettenis
2022-01-19 1:43 ` [PATCH v3 31/31] RFC: Switch rpi over to use bootstd Simon Glass
2022-01-19 14:04 ` Tom Rini
2022-01-19 14:37 ` Simon Glass
2022-01-19 15:01 ` Tom Rini
2022-01-19 16:09 ` Simon Glass
2022-01-19 16:21 ` Tom Rini
2022-01-19 16:38 ` Mark Kettenis
2022-01-19 23:26 ` Simon Glass
2022-01-20 8:35 ` Michael Walle
2022-01-20 10:28 ` Mark Kettenis
2022-01-20 18:16 ` Simon Glass
2022-01-20 18:30 ` Tom Rini
2022-01-20 18:56 ` Mark Kettenis
2022-01-20 19:56 ` Simon Glass
2022-01-20 19:56 ` Simon Glass
2022-01-20 20:08 ` Tom Rini
2022-01-20 20:47 ` Simon Glass
2022-01-20 23:23 ` Tom Rini
2022-01-21 0:59 ` Simon Glass
2022-01-21 1:08 ` Tom Rini
2022-01-21 3:12 ` Simon Glass
2022-01-21 9:36 ` Mark Kettenis
2022-01-21 15:25 ` Simon Glass
2022-01-21 15:05 ` Tom Rini
2022-01-21 15:23 ` Simon Glass
2022-01-19 23:23 ` Simon Glass
2022-01-19 8:09 ` [PATCH v3 00/31] Initial implementation of standard boot Michael Walle
2022-01-19 14:56 ` Simon Glass
2022-01-20 8:38 ` Michael Walle
2022-01-20 18:16 ` Simon Glass
2022-03-06 3:08 ` Simon Glass
2022-03-06 11:03 ` Michael Walle
2022-03-06 13:24 ` Simon Glass
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=20220121184139.GA7004@bill-the-cat \
--to=trini@konsulko.com \
--cc=daniel.schwierzeck@gmail.com \
--cc=dennis@ausil.us \
--cc=heinrich.schuchardt@canonical.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jaeckel-floss@eyet-services.de \
--cc=lukas.auer@aisec.fraunhofer.de \
--cc=mark.kettenis@xs4all.nl \
--cc=michal.simek@xilinx.com \
--cc=sjg@chromium.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