]> git.baikalelectronics.ru Git - uboot.git/commit
mkimage: fit_image: Add option to make fit header align
authorKever Yang <kever.yang@rock-chips.com>
Mon, 30 Mar 2020 03:56:24 +0000 (11:56 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 14:10:01 +0000 (10:10 -0400)
commit55f5847577f5d6d8a3a06a5943f38457c69aa0c6
treed8d41efeafbbb876a8b3a2cb8aad66e365d81821
parentd23f4213a543010d7ea4d59e77aac1ab180e9f7d
mkimage: fit_image: Add option to make fit header align

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 size'to specify the align size in hex for better performance.

example usage:
  ./tools/mkimage -E -f u-boot.its -B 0x200 u-boot.itb

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Reviewed-by: Tom Rini <trini@konsulko.com>
doc/uImage.FIT/source_file_format.txt
tools/fit_image.c
tools/imagetool.h
tools/mkimage.c