[U-Boot] [PATCH 4/5] tools: mkimage: fix imximage header size
Albert ARIBAUD
albert.u.boot at aribaud.net
Wed Jul 15 09:54:42 CEST 2015
Hello Stefano,
On Wed, 15 Jul 2015 09:19:55 +0200, Stefano Babic <sbabic at denx.de>
wrote:
> > I think my patch back then solves the issue nicer. The struct dcd_v2_t
> > is not the reason the whole header is not aligned by 8-byte, it is a
> > problem of the boot_data_t header which is 12 bytes long. So inserting
> > the padding just after struct boot_data_t (or inside of struct
> > boot_data_t) seems to be more appropriate.
>
> I see. Albert, can you test on your board if Stefan's patch solves your
> issue, too ? I could then revert this one and apply Stefan's.
I can test it, but I'm sure that boot data does not need size alignment
since in my case there is no such alignment and Vybrid boots. To me
this means aligning boot_data_t size would introduce a constraint that
is not really there.
If Stefan would test my patch as well, I reckon he would find it to
work as well as his.
So we have two patches which fix Vybrid booting:
- one which aligns the boot_data_t /size/ but keeps its /offset/
unaligned;
- one which aligns the the boot_data_t /offset/ but keeps its /size/
unaligned.
Seems to me that the conclusion is that the actual alignment of
boot_data_t does not matter and that only the alignment of the
whole imx_header_v2_t size (and, consequently, offset) matters.
How about just adding an attribute((align(8))) to imx_header_v2_t?
> It remains doubious how the ROMs on Freescale are interpretating the
> header, but we can only test it.
See my other answer. We could prove it by disassembling the ROM code.
Any volunteer? :)
> Best regards,
> Stefano
Amicalement,
--
Albert.
More information about the U-Boot
mailing list