Hi Tom,
On 2020/3/28 上午2:16, Tom Rini wrote:
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!
I use hex input because all of other parameters for mkimage tool are using
hex format instead of decimal format.
I will update ot use 0x200.
Thanks,
- Kever