From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Joe Hershberger <joe.hershberger@ni.com>,
Marek Vasut <marex@denx.de>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Maxim Moskalets <maximmosk4@gmail.com>,
Raymond Mao <raymond.mao@linaro.org>,
Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: Re: [PATCH 15/34] image: Add a new type for extlinux
Date: Fri, 18 Oct 2024 12:31:11 -0600 [thread overview]
Message-ID: <20241018183111.GF4959@bill-the-cat> (raw)
In-Reply-To: <CAFLszTjDLNyh5QZpmdgNhxJW=zq=L72fiq_rER5K-PuVtXxXgQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4646 bytes --]
On Fri, Oct 18, 2024 at 12:19:26PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 18 Oct 2024 at 11:54, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Oct 18, 2024 at 11:20:45AM -0600, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Fri, 18 Oct 2024 at 09:17, Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Fri, Oct 18, 2024 at 08:57:02AM -0600, Simon Glass wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Thu, 17 Oct 2024 at 21:14, Tom Rini <trini@konsulko.com> wrote:
> > > > > >
> > > > > > On Thu, Oct 17, 2024 at 05:23:54PM -0600, Simon Glass wrote:
> > > > > >
> > > > > > > Add an image type for the extlinux.cfg file, which U-Boot supports
> > > > > > > reading.
> > > > > > >
> > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > > ---
> > > > > > >
> > > > > > > boot/image.c | 1 +
> > > > > > > include/image.h | 1 +
> > > > > > > 2 files changed, 2 insertions(+)
> > > > > > >
> > > > > > > diff --git a/boot/image.c b/boot/image.c
> > > > > > > index abac254e026..cf16fb7fbf7 100644
> > > > > > > --- a/boot/image.c
> > > > > > > +++ b/boot/image.c
> > > > > > > @@ -183,6 +183,7 @@ static const table_entry_t uimage_type[] = {
> > > > > > > { IH_TYPE_FDT_LEGACY, "fdt_legacy", "legacy Image with Flat Device Tree ", },
> > > > > > > { IH_TYPE_RENESAS_SPKG, "spkgimage", "Renesas SPKG Image" },
> > > > > > > { IH_TYPE_STARFIVE_SPL, "sfspl", "StarFive SPL Image" },
> > > > > > > + { IH_TYPE_EXTLINUX_CFG, "extlinux_cfg", "Extlinux configuration" },
> > > > > > > { -1, "", "", },
> > > > > > > };
> > > > > >
> > > > > > This whole part of the series feels like we're abusing IH_TYPE_ far past
> > > > > > what it's used for. Especially the command line string one. It seems
> > > > > > like the main use is to be able to later on print something human
> > > > > > friendly. Please try and figure out some other way to do that. Thanks.
> > > > >
> > > > > Yes I had the same thought, particularly with cmdline, as you say.
> > > > >
> > > > > The obvious alternative is to just have a string which communicates
> > > > > the type. Then I can use IH_TYPE_INVALID, perhaps, with an extra
> > > > > string indicating what it really is.
> > > > >
> > > > > But one advantage of the approach in this patch is that, for bootmeths
> > > > > which include a cmdline, it can be identified and added as a file.
> > > > > That includes zimage and ChromiumOS, but not EFI. It will allow me to
> > > > > get rid of the cmdline in struct bootflow, perhaps.
> > > >
> > > > Yeah, this all sounds like IH_TYPE is the wrong direction to expand.
> > > > Where you're grabbing these things from is where you might get a hint as
> > > > to what these things are and that's where to take the store the
> > > > knowledge for later.
> > >
> > > They are grabbed from several places:
> > > - extlinux comes from disk, with the extlinux bootmeth, but can also
> > > come from 'include' files within that scripts, also pxe
> > > - EFI apps from from disk with the EFI bootmeth
> > > - kernel, ramdisk and fdt some from most bootmeths
> > > - cmdline comes from extlinux (with zImage only) and ChromeOS,
> > > probably Android but I haven't looked
> > > - logo comes just from script so far, but I suppose UKI and FIT will
> > > have it eventually
> > >
> > > Can you be more specific with your suggestion? I am not seeing an
> > > alternative right now.
> >
> > I'm just saying that this is not what IH_TYPE is. As you said maybe you
> > can store this string information elsewhere? And I'm suggesting that
> > perhaps when you load a thing you'll then also know what the thing is.
>
> Yes, I agree. 'Type' is really about the actual file that you are
> reading, not the data types of the bits within it, for example. That's
> the problem with my approach.
>
> The other idea I had was to add a new thing to image.h (IH_DATA_xxx).
> But I wasn't sure it was worth it. Also, if you look at
> fit_image_load() it reads an image of a certain type out of an
> existing (containing) FIT. So we already have images within images.
>
> How about I just put a data type in bootflow.h ? Then it will be
> separate from image.h and I'm not blurring the line any further
> between an image and its component parts? We can always change it
> later if we find a better way.
Certainly somewhere else, and then lets move this to the part of the
conversion on patch 23 where I suggest another way to handle these
issues.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-10-18 18:31 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 [this message]
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
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=20241018183111.GF4959@bill-the-cat \
--to=trini@konsulko.com \
--cc=ilias.apalodimas@linaro.org \
--cc=joe.hershberger@ni.com \
--cc=marex@denx.de \
--cc=maximmosk4@gmail.com \
--cc=mkorpershoek@baylibre.com \
--cc=raymond.mao@linaro.org \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@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 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.