From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 15 Jul 2015 09:54:42 +0200 Subject: [U-Boot] [PATCH 4/5] tools: mkimage: fix imximage header size In-Reply-To: <55A6099B.6050908@denx.de> References: <1434716311-26189-1-git-send-email-albert.aribaud@3adev.fr> <1434716311-26189-2-git-send-email-albert.aribaud@3adev.fr> <1434716311-26189-3-git-send-email-albert.aribaud@3adev.fr> <1434716311-26189-4-git-send-email-albert.aribaud@3adev.fr> <1434716311-26189-5-git-send-email-albert.aribaud@3adev.fr> <559F7EC8.6020605@denx.de> <874a6782a666faec3520e1e9a58f7092@agner.ch> <55A6099B.6050908@denx.de> Message-ID: <20150715095442.3e2504ad@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Stefano, On Wed, 15 Jul 2015 09:19:55 +0200, Stefano Babic 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.