AnsweredAssumed Answered

IVT alignment requirement when booting from NAND

Question asked by Stefan Agner on May 8, 2015
Latest reply on Jun 3, 2015 by Stefan Agner



Some time ago I hit an issue regarding alignment requirements of the IVT header when booting from NAND. It seems that Vybrid requires the IVT header to be 8-byte alignment in RAM in order to boot successfully. This requirement however, is not documented anywhere, hence I'm not sure if I miss something here. To illustrate the issue better, I attached a PNG which draws the picture better.


Current U-Boot versions generate an IVT header which are likely odd regarding this 8-byte alignment. I tested the drawn variants using U-Boot and manually altered the headers. In all variants I stripped the DCD completely, hence the header only consisted of the IVT header and the boot data header. All images with the headers worked fine when using the serial loader, however, the non-8-byte aligned IVT header failed to boot from NAND flash.


00000000  d1 00 20 40 00 80 40 3f  00 00 00 00 00 00 00 00  |.. @..@?........|

00000010  f4 7f 40 3f d4 7f 40 3f  00 00 00 00 00 00 00 00  |..@?..@?........|

00000020  d4 7b 40 3f 00 c0 05 00  00 00 00 00 be 00 00 ea  |.{@?............|

00000030  14 f0 9f e5 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |................|


Verified this behavior on a Toradex Colibri VF61 as well as on a Vybrid Tower Module Rev. G. I guess it requires knowledge of the internal boot ROM to understand if this is really an alignment requirement. Note that the U-Boot version which Timesys provides generates an IVT header which aligns on a 8-byte boundary, hence the problem does not appear with that U-Boot version.


There has been a discussion on the U-Boot mailing list about this: [U-Boot] [PATCH] tools: make imxheader size align on page size