[PATCH v3 8/8] mkimage: fit_image: Add option to make fit header align

Tom Rini trini at konsulko.com
Fri Mar 27 19:16:47 CET 2020

On Thu, Mar 26, 2020 at 06:09:16PM +0800, Kever Yang wrote:

> The image is usually stored in block device like emmc, SD card, make the
> offset of image data aligned to block(512 byte) can avoid data copy
> during boot process.
> eg. SPL boot from FIT image with external data:
> - SPL read the first block of FIT image, and then parse the header;
> - SPL read image data separately;
> - The first image offset is the base_offset which is the header size;
> - The second image offset is just after the first image;
> - If the offset of imge does not aligned, SPL will do memcpy;
> The header size is a ramdon number, which is very possible not aligned, so
> add '-B' to specify the align size in hex for better performance.
> example usage:
>   ./tools/mkimage -E -f u-boot.its -B 200 u-boot.itb

OK, so we're taking a hex input, and that's not clear in the
documentation.  The example should also be 0x200 for clarity.  In fact,
being user-space, we need to make this user friendly and sanity check
the input and if we're going to take hex in, enforce '0x' as a prefix
even I think.  Thanks!

-------------- 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/20200327/44876c39/attachment.sig>

More information about the U-Boot mailing list