[PATCH V7 01/15] board: siemens: iot2050: Split the build for PG1 and PG2

Simon Glass sjg at chromium.org
Thu Mar 30 11:17:06 CEST 2023


Hi,

On Thu, 2 Mar 2023 at 08:29, Andrew Davis <afd at ti.com> wrote:
>
> On 3/1/23 1:21 PM, Jan Kiszka wrote:
> > On 01.03.23 19:34, Andrew Davis wrote:
> >> On 3/1/23 12:29 PM, Jan Kiszka wrote:
> >>> On 01.03.23 18:26, Andrew Davis wrote:
> >>>> On 2/28/23 12:19 PM, Jan Kiszka wrote:
> >>>>> From: Su Baocheng <baocheng.su at siemens.com>
> >>>>>
> >>>>> Due to different signature keys, the PG1 and the PG2 boards can no
> >>>>> longer use the same FSBL (tiboot3). This makes it impossible anyway to
> >>>>> maintaine a single flash.bin for both variants, so we can also split
> >>>>> the
> >>>>> build.
> >>>>>
> >>>>
> >>>> Having two defconfigs just to make the small changes needed will be
> >>>> more burden than it saves. Keeping them in sync and having your
> >>>> integration
> >>>> layer do two different builds just adds more work than it is worth IMHO.
> >>>>
> >>>> We (TI) are going in that direction for our HS boards and combining the
> >>>> defconfigs back together now. The solution is to have the one defconfig
> >>>> build both images, one for HS and one for non-HS. For you looks like you
> >>>> are already calling the two PG boot images differently so this should
> >>>> work
> >>>> (seboot_pg1.bin and seboot_pg2.bin). Just add a new full entry in
> >>>> boot-image.dtsi for each (vs that #ifdef check changing the output
> >>>> name).
> >>>
> >>> How should that work? Will we somehow get two flash.bin out of a single
> >>> build then?
> >>>
> >>
> >> Yes if you add two enteries in your image.dtsi file. Then your integration
> >> selects the right named one for the board, instead of selecting the right
> >> defconfig for the board and doing a completely new build.
> >
> > Something like this?
> >
> > binman: binman {
> >       multiple-images;
> > };
> >
> > &binman {
> >       flash-pg1 {
> >               filename = "flash-pg1.bin"
> >               ...
> >       };
> >
> >       flash-pg2 {
> >               filename = "flash-pg2.bin"
> >               ...
> >       };
> > };
> >
>
> Yes.
>
> > How to avoid duplicating the common nodes of flash-pg1/pg2?
> >
>
> We just duplicate the contents for both today in our files.
> Maybe the common content can be put in an include file and
> included inline in both nodes?

Today we don't have a good option:

1. You could put it in a previous image, with a filename, then include
that in the following images. This only works if the contents of the
first image need to be replicated exactly in the second images, i.e.
you only have additions

2. There is a 'collection' entry type where you can provide a list of
other entries to include. However they must be in the same image,
which doesn't help you much

In terms of enhancements, we could allow a collection to pull from a
different image, perhaps with entries to drop and a way to insert new
entries in between those in the collection?

I'm open to ideas on this one.

Regards,
Simon


More information about the U-Boot mailing list