All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wenst@chromium.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	linux-kbuild@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH RFC] kbuild: create a list of all built DTB files
Date: Mon, 4 Mar 2024 12:36:55 +0800	[thread overview]
Message-ID: <CAGXv+5HB7gXJ0x1uVdgbWaRWS8+rN6FwEgyGLObxr_cfyLty6A@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAS8tLuHYcPTb5pJZixn5Hb0yjo0nmbrfSUr5Cd_pc+WMg@mail.gmail.com>

On Thu, Feb 29, 2024 at 11:35 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Thu, Feb 29, 2024 at 11:38 AM Chen-Yu Tsai <wenst@chromium.org> wrote:
> >
> > On Sun, Feb 25, 2024 at 4:21 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > On Fri, Feb 23, 2024 at 6:23 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > >
> > > > It is useful to have a list of all composite *.dtb files, along with
> > > > their individual components, generated from the current build.
> > > >
> > > > With this commit, 'make dtbs' creates arch/*/boot/dts/dtbs-components,
> > > > which lists the composite dtb files created in the current build. It
> > > > maintains the order of the dtb-y additions in Makefiles although the
> > > > order is not important for DTBs.
> > > >
> > > > This compliments the list of all *.dtb and *.dtbo files in dtbs-list,
> > > > which only includes the files directly added to dtb-y.
> > > >
> > > > For example, consider this case:
> > > >
> > > >     foo-dtbs := foo_base.dtb foo_overlay.dtbo
> > > >     dtb-y := bar.dtb foo.dtb
> > > >
> > > > In this example, the new list will include foo.dtb with foo_base.dtb and
> > > > foo_overlay.dtbo on the same line, but not bar.dtb.
> > > >
> > > > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > > > ---
> > > > Hi,
> > > >
> > > > I hacked up this new thing to list out the individual components of each
> > > > composite dtb. I think this information would be useful for FIT image
> > > > generation or other toolchains to consume. For example, instead of
> > > > including each dtb, a toolchain could realize that some are put together
> > > > using others, and if the bootloader supports it, put together commands
> > > > to reassemble the end result from the original parts.
> > > >
> > > > This is based on and complements Masahiro-san's recent dtbs-list work.
> > >
> > >
> > >
> > > This is another format of my previous per-dtb "*.dtlst"
> > > (but I did not pick up 3/4, 4/4 because I did not know what we need after all).
> > >
> > > This should be discussed together with how Simon's script will look like.
> > >
> > > I can understand your Makefile code, but I still do not know
> > > how the entire overlay stuff will work in a big picture.
> >
> > How would you like to proceed? I can through together some changes on top
> > of Simon's patches as an initial proposal if that helps?
> >
> > I can use your format if you prefer.
>
>
> How would you select base+addonX among
> other base+addonY or base+addonZ configurations?

I assume you are alluding to the existing in-tree composite DTs that
share the same board compatible strings?

Under the current FIT image design with compatible strings populated from
the FDTs, I don't think there's any way to automatically select among them.
The FIT image simply does not have the information available. Nor do the
overlays themselves. The toolchain can only either include all of them
and let the bootloader figure things out, or filter out all the duplicates.
With the composite list, at least it will be able to consistently keep
only the base DT and drop the ones with the addons.

In one of my previous replies to v9 I mentioned adding a user provided
mapping between "configuration" compatible string and FDT filename. The
mapping could be maintained in-tree for those base+addonXYZ FDTs if
desired.

Also, Simon's FIT image "extensions" proposal [1] adds more metadata to
the FIT image to cover these addons that currently don't have distinct
compatible strings.


ChenYu

[1] https://lore.kernel.org/u-boot/CAPnjgZ06s64C2ux1rABNAnMv3q4W++sjhNGCO_uPMH_9sTF7Mw@mail.gmail.com/

  reply	other threads:[~2024-03-04  4:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  9:23 [PATCH RFC] kbuild: create a list of all built DTB files Chen-Yu Tsai
2024-02-25  8:20 ` Masahiro Yamada
2024-02-29  2:38   ` Chen-Yu Tsai
2024-02-29 15:34     ` Masahiro Yamada
2024-03-04  4:36       ` Chen-Yu Tsai [this message]
2024-03-05 16:30         ` Masahiro Yamada
2024-03-14  4:44           ` Chen-Yu Tsai

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=CAGXv+5HB7gXJ0x1uVdgbWaRWS8+rN6FwEgyGLObxr_cfyLty6A@mail.gmail.com \
    --to=wenst@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=sjg@chromium.org \
    /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.