From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
U-Boot Mailing List <u-boot@lists.denx.de>,
Guillaume La Roque <glaroque@baylibre.com>,
Julien Masson <jmasson@baylibre.com>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Nam Cao <namcao@linutronix.de>,
Quentin Schulz <quentin.schulz@cherry.de>,
Shantur Rathore <i@shantur.com>
Subject: Re: [PATCH 23/34] bootstd: Maintain a list of images
Date: Fri, 18 Oct 2024 15:30:22 -0600 [thread overview]
Message-ID: <20241018213022.GL4959@bill-the-cat> (raw)
In-Reply-To: <CAFLszTjEvoPLiq5iuCRk8q3iA50q-UHGF4GBJJeNNWwqMXD_aw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5305 bytes --]
On Fri, Oct 18, 2024 at 12:48:31PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 18 Oct 2024 at 12:04, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Oct 18, 2024 at 11:20:52AM -0600, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Fri, 18 Oct 2024 at 10:33, Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Fri, Oct 18, 2024 at 09:01:03AM -0600, Simon Glass wrote:
> > > > > Hi Heinrich,
> > > > >
> > > > > On Thu, 17 Oct 2024 at 22:07, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > Am 18. Oktober 2024 01:24:02 MESZ schrieb Simon Glass <sjg@chromium.org>:
> > > > > > >We want to keep track of images which are loaded, or those which could
> > > > > > >perhaps be loaded. This will make it easier to manage memory allocation,
> > > > > > >as well as permit removal of the EFI set_efi_bootdev() hack.
> > > > >
> > > > > I'll change this 'hack' to 'feature'.
> > > > >
> > > > > >
> > > > > > Please, keep in mind that files can be loaded manually, e.g. via the dhcp, the wget, and the loady commands. These are outside bootflows.
> > > > >
> > > > > Yes, this series is only going to help if bootstd is used. For ad-hoc
> > > > > use, EFI will need to rely on the above feature, at least until
> > > > > someone can think of another solution.
> > > >
> > > > Perhaps I need to try and be clearer here than I might have been in the
> > > > past. The consensus among off the shelf free software operating systems
> > > > is "just give me an EFI interface". This simplifies things on their end
> > > > if regardless of architecture it's the same interface. This means that
> > > > in U-Boot we need to treat EFI as one of the primary interfaces. Not a
> > > > novelty. Not a "some people might use". It is a frequent and commonly
> > > > used feature.
> > >
> > > Yes, EFI is everywhere and growing. All the more reason to tidy up
> > > this piece. I would like to see bootmgr use this new API, for example.
> > >
> > > But how does this comment affect this patch?
> >
> > Because at the very high level, I wonder if I made a mistake a few years
> > back. As I understand it, the nominal case is "bootefi bootmgr". I was
> > saying at the time that perhaps bootstd can just fire that off, and move
> > on. Now it seems like we're going along the path of re-inventing that,
> > and not integrating well with it either.
>
> In what way are we re-inventing that? bootstd supports lots of
> different ways of booting, not just EFI.
At the high level, bootflow scan is re-implementing "bootefi bootmgr".
but handling non-EFI payloads.
> Also I hope that one day EFI
> will be implemented more as part of U-Boot than as a bolt-on, so will
> make use of bootflows, etc.
And stuff like that is why I said what I said in here first. To me it
sounds like you keep implying it's a hack that's not well integrated.
When it's honestly at this point gotten more traction than FIT images
have I think (as much as I wish FIT images had "won", it's like VHS vs
Betamax, to bring in another technology metaphor).
> > So, to try and bring things back together. If U-Boot decides to load
> > $FOO from device $BAR, at that common point is where we need to:
> > - Is there an lmb for the location this is supposed to go to (for the if
> > we know it, entire size)?
> > - Note down everything else we know, now.
>
> Yes.
>
> >
> > This means that we can note down enough stuff so that EFI can construct
> > the path it needs. And if we're being told a filesystem, that filename
> > is good enough for the IH_TYPE thing you're wanting, or at least a good
> > chunk of it I hope.
>
> You want me to ignore the type that I know (kernel, ramdisk, logo,
> etc.) and infer the type from a filename? Why?
No, I want you to save and display the filename. That's probably much
more useful when debugging than "kernel". If you actually know some
other type information (ie extlinux.conf says ...) then yes, it too can
be stored as that's useful too.
> For EFI there is only an EFI application. It will always just be a PE
> file. We don't really know what it is, as someone pointed out earlier.
> Maybe one day we will check to see if it is a UKI and pull things out
> of it. But then, it would be component parts (kernel, ramdisk, etc.)
> so I would want to add them as images.
I don't see why yet, honestly.
> > It also means that since it's at the most common point, it doesn't
> > matter if we were in an EFI application, a boot script, a bootmeth or
> > someone at the cmdline doing "load mmc 0:1 /boot/Image $kernel_addr_r".
>
> For that case (at the cmdline), bootstd is not currently running. Are
> you suggesting that bootstd could pick up these things and record
> them? If so, then yes, definitely, I want to do that. This series is
> the starting point for that. If you are suggesting something else,
> then I think I have lost you at this point.
Yes, I think I lost you somewhere, but I'm not sure how. What I am
saying is that since everything at some point calls down to say
fs_read() to read a file, that is the common point to note what
we're doing. Not the load command, not the bootmeth, not the EFI_LOADER
call.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-10-18 21:30 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 23:23 [PATCH 00/34] bootstd: Support recording images Simon Glass
2024-10-17 23:23 ` [PATCH 01/34] alist: Mention the error condition in alist_add_placeholder() Simon Glass
2024-10-17 23:23 ` [PATCH 02/34] alist: Add a comment for alist_init_struct() Simon Glass
2024-10-17 23:23 ` [PATCH 03/34] alist: Expand the comment for alist_get() Simon Glass
2024-10-17 23:23 ` [PATCH 04/34] alist: Add a way to get the next element Simon Glass
2024-10-17 23:23 ` [PATCH 05/34] alist: Add for-loop helpers Simon Glass
2024-10-17 23:23 ` [PATCH 06/34] alist: Add a function to empty the list Simon Glass
2024-10-17 23:23 ` [PATCH 07/34] alist: Add a way to efficiently filter an alist Simon Glass
2024-10-17 23:23 ` [PATCH 08/34] dm: core: Add a function to see if a device exists Simon Glass
2024-10-17 23:23 ` [PATCH 09/34] test: boot: Use a consistent name for the script bootmeth Simon Glass
2024-10-17 23:23 ` [PATCH 10/34] bootstd: Move bootflow-adding to bootstd Simon Glass
2024-10-17 23:23 ` [PATCH 11/34] bootstd: Move bootflow-clearing " Simon Glass
2024-10-17 23:23 ` [PATCH 12/34] bootstd: Add a function to get bootstd only if available Simon Glass
2024-10-17 23:23 ` [PATCH 13/34] bootstd: Drop the bootdev-specific list of bootflows Simon Glass
2024-10-17 23:23 ` [PATCH 14/34] bootstd: Move the bootflow list into an alist Simon Glass
2024-10-17 23:23 ` [PATCH 15/34] image: Add a new type for extlinux Simon Glass
2024-10-18 3:14 ` Tom Rini
2024-10-18 14:57 ` Simon Glass
2024-10-18 15:17 ` Tom Rini
2024-10-18 17:20 ` Simon Glass
2024-10-18 17:54 ` Tom Rini
2024-10-18 18:19 ` Simon Glass
2024-10-18 18:31 ` Tom Rini
2024-10-17 23:23 ` [PATCH 16/34] image: Add a new type for EFI apps Simon Glass
2024-10-18 9:03 ` Mark Kettenis
2024-10-18 14:55 ` Simon Glass
2024-10-17 23:23 ` [PATCH 17/34] image: Add a new type for logo images Simon Glass
2024-10-17 23:23 ` [PATCH 18/34] image: Add a new type for a command-line string Simon Glass
2024-10-17 23:23 ` [PATCH 19/34] test: Expand implementation of ut_list_has_dm_tests() Simon Glass
2024-10-17 23:23 ` [PATCH 20/34] test: Drop the duplicate line in setup_bootmenu_image() Simon Glass
2024-10-17 23:24 ` [PATCH 21/34] test: boot: Update bootflow_iter() for console checking Simon Glass
2024-10-17 23:24 ` [PATCH 22/34] bootstd: cros: Correct the x86-setup address Simon Glass
2024-10-17 23:24 ` [PATCH 23/34] bootstd: Maintain a list of images Simon Glass
2024-10-18 3:14 ` Tom Rini
2024-10-18 4:01 ` Heinrich Schuchardt
2024-10-18 15:01 ` Simon Glass
2024-10-18 16:33 ` Tom Rini
2024-10-18 17:20 ` Simon Glass
2024-10-18 18:04 ` Tom Rini
2024-10-18 18:48 ` Simon Glass
2024-10-18 21:30 ` Tom Rini [this message]
2024-10-19 11:49 ` Simon Glass
2024-10-19 16:30 ` Tom Rini
2024-10-22 12:16 ` Simon Glass
2024-10-22 15:01 ` Tom Rini
2024-10-22 17:00 ` Simon Glass
2024-10-23 18:41 ` Tom Rini
2024-10-31 18:04 ` Simon Glass
2024-10-17 23:24 ` [PATCH 24/34] bootstd: Update bootmeth_alloc_file() to record images Simon Glass
2024-10-17 23:24 ` [PATCH 25/34] boot: pxe: Drop the duplicate comment on get_pxe_file() Simon Glass
2024-10-17 23:24 ` [PATCH 26/34] efi: Simplify reading files by using the common function Simon Glass
2024-10-18 3:14 ` Tom Rini
2024-10-17 23:24 ` [PATCH 27/34] bootmeth: Update the read_file() method to include a type Simon Glass
2024-10-17 23:24 ` [PATCH 28/34] efi: Check the filename-allocation in the network path Simon Glass
2024-10-17 23:24 ` [PATCH 29/34] boot: Update extlinux pxe_getfile_func() to include type Simon Glass
2024-10-17 23:24 ` [PATCH 30/34] boot: Update pxe bootmeth to record images Simon Glass
2024-10-17 23:24 ` [PATCH 31/34] Update bootmeth_alloc_other() " Simon Glass
2024-10-17 23:24 ` [PATCH 32/34] bootstd: Avoid showing an invalid buffer address Simon Glass
2024-10-17 23:24 ` [PATCH 33/34] bootstd: Update cros bootmeth to record images Simon Glass
2024-10-17 23:24 ` [PATCH 34/34] bootstd: Add a simple command to list images 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=20241018213022.GL4959@bill-the-cat \
--to=trini@konsulko.com \
--cc=glaroque@baylibre.com \
--cc=i@shantur.com \
--cc=jmasson@baylibre.com \
--cc=mkorpershoek@baylibre.com \
--cc=namcao@linutronix.de \
--cc=quentin.schulz@cherry.de \
--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.