[U-Boot] [PATCH 19/26] configs: mx6sabresd: Add SPL FIT and DM support

Abel Vesa abel.vesa at nxp.com
Mon Jan 28 15:31:29 UTC 2019


On 19-01-18 10:30:24, Tom Rini wrote:
> On Fri, Jan 18, 2019 at 03:26:42PM +0000, Abel Vesa wrote:
> > On 19-01-18 13:16:07, Fabio Estevam wrote:
> > > Hi Abel,
> > > 
> > > On Fri, Jan 18, 2019 at 12:59 PM Abel Vesa <abel.vesa at nxp.com> wrote:
> > > 
> > > > +CONFIG_OF_CONTROL=y
> > > > +CONFIG_SPL_OF_CONTROL=y
> > > > +CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd"
> > > 
> > > Does this mean that only imx6q-sabresd variant is supported after this
> > > series is applied?
> > > 
> > > We still need to support imx6dl/imx6qp sabresd in the same binary as
> > > we currently do today.
> > 
> > Hmmm, so all the dtbs get built, trouble is we need to specify which dtb gets
> > used by SPL. This is why the DEFAULT_DEVICE_TREE gets set.
> > 
> > A solution to do what you're asking is to have a dtb in SPL that works for
> > all socs (dl/qp/q) for each board (sabreauto/sabresd). I'm afraid it might
> > get too big to fit in sram. I'll give it a try tomorrow.
> > 
> > As for the u-boot proper, in order to have one u-boot.itb file that works
> > on all socs we need to support MULTI_FIT in u-boot proper and make u-boot
> > chose from the fit table the right dtb. I'll try to do that for the next
> > version of this patchset. I'll keep you up to date with the development.
> 
> Please note that this isn't the first family to have this problem.
> Please see the TI Keystone 2 families and CONFIG_DTB_RESELECT as I would
> swear we can go from a "good enough for all" to "correct for what we're
> on" DTB in both SPL and U-Boot.  And then yes, you end up compressing
> the DTBs too so that we can fit things into limited space.  And if we
> still run into problems, which we might well still, lets talk.  And it
> might indeed end up making the most sense to make up a "just enough for
> SPL for everyone" DTB or set of DTBs too.
> 

OK, so I finally managed to get the multi dtb support in SPL. Added all 
three dtbs (for 6q, 6qp and 6dl) but the 6dl doesn't wanna boot anymore.
The 6q and 6qp boot up just fine.

The final SPL is 75K so it obviously doesn't fit in the 64K ocram the 6dl
has.

Once I enable the GZIP options (SPL_GZIP and SPL_MULTI_DTB_FIT_GZIP)
I get this:

	u-boot-spl section `.rodata' will not fit in region `.sram'
	region `.sram' overflowed by 12708 bytes


Same thing happens with LZO:

	u-boot-spl section `.data' will not fit in region `.sram'
	region `.sram' overflowed by 1396 bytes

A solution would be to split the q/qp and dl into two separate defconfigs
(and implicitly two different binaries).


Btw, I don't understand why the dtbs (the fit table to be exact) do not
overflow the ocram limit. I mean, I know why, but I believe that is incorrect.
The fit table gets appended at the end so it builds fine. But I guess it should
fail.

Let me know what you guys think.

> -- 
> Tom



More information about the U-Boot mailing list