[PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx

Tom Rini trini at konsulko.com
Fri Dec 30 17:06:49 CET 2022


On Fri, Dec 30, 2022 at 09:49:08AM -0600, Simon Glass wrote:
> Hi Pali,
> 
> On Fri, 30 Dec 2022 at 09:44, Pali Rohár <pali at kernel.org> wrote:
> >
> > On Friday 30 December 2022 10:41:47 Tom Rini wrote:
> > > On Fri, Dec 30, 2022 at 04:24:43PM +0100, Pali Rohár wrote:
> > > > On Friday 30 December 2022 10:21:04 Tom Rini wrote:
> > > > > > In this case it would be better to build u-boot-dts.bin only by binman
> > > > > > (for all platforms) instead of cat-ing rules in Makefile.
> > > > >
> > > > > This would also be an easier path forward perhaps for making sure that
> > > > > the dtb is always 8 byte aligned?
> > > >
> > > > Well, no. With DTB the problem is that it is not put to the correct
> > > > offset as can be specified in linker script. So moving this code from
> > > > Makefile to binman also moves this problem to another location.
> > > > 8 byte alignment is just subset of the "correct offset" problem.
> > >
> > > Right, the high level answer is binman is intended to be the tool to
> > > assemble binaries, and has to deal with "make sure binary X is at offset
> > > Y, which also has a linker symbol for run-time references".
> >
> > Ok, if this tool has access to ELF/linker symbols (or will have in
> > future in case it does not have yet) then this problem could be solved
> > here.
> 
> It does have this access and already updates symbols in some cases.
> See [1]. I am a little nervous about a complete move to binman in this
> area even for simple things like u-boot.bin, since it would set off
> yet another migration. But perhaps most boards don't actually use
> u-boot.bin anyway?

Well, we should just convert everyone at once since we should get
identical binaries before / after.

> Part of me thinks we should solve this in the .lds files, since
> otherwise we are blurring the line between building and packaging.

I thought the thread about fixing the alignment of the dtb noted
problems with that approach?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221230/43dff46b/attachment.sig>


More information about the U-Boot mailing list