[PATCH] lds: align u-boot-nodtb with 8 bytes boundary
Pali Rohár
pali at kernel.org
Wed Dec 21 23:06:36 CET 2022
On Wednesday 21 December 2022 14:47:48 Eugen.Hristev at microchip.com wrote:
> On the other hand , what you are saying Pali, that objcopy trims
> trailing zeros, and your platform is broken, hence you are aligning to 4
> bytes, I do not think that alignment to 4 bytes is the solution.
Yes, it is not the proper solution but at that time binary was already
broken and I did not find at that time better fix for it to have again
working u-boot build.
> So I would be against what you did , to align to 4 bytes. If the DTB is
> appended at the wrong position (somehow this is happening in my case as
> well), we should have U-boot (and your platform) look up the DTB at the
> right position , where it's supposed to be placed. And not move the DTB
> to a 4 byte alignment just because Uboot searches the DTB there.
> In the future if the DTC requires all DTBs to be aligned to 8 bytes as a
> hard rule, your solution is again not right. We would have to have the
> DTB aligned to 8 and the code to lookup the DTB in the right position.
>
> So looking up the _end and placing the DTB directly there might be a
> better way to solve all the problems we are facing (as you actually
> suggested )
Yes, for me it looks like a better solution which fixes both problems.
And allows to put DTB at any position or alignment. Then alignment
could be changed also for mpc85xx to 8 or 128 bytes...
More information about the U-Boot
mailing list