[PATCH] mkimage: fit_image: Make fit header and data align to 512

Rasmus Villemoes rasmus.villemoes at prevas.dk
Fri Mar 13 14:09:32 CET 2020


On 13/03/2020 03.07, Heinrich Schuchardt wrote:
> Am March 13, 2020 1:50:41 AM UTC schrieb Kever Yang <kever.yang at rock-chips.com>:
>> 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 align for FIT header and image data for better performance.

Why not let -B take an integer argument, so the same flag can be used
the day someone needs stuff to be aligned on a 4096 byte boundary?

Rasmus


More information about the U-Boot mailing list