From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 27 Mar 2020 14:16:47 -0400 Subject: [PATCH v3 8/8] mkimage: fit_image: Add option to make fit header align In-Reply-To: <20200326100916.22532-8-kever.yang@rock-chips.com> References: <20200326100916.22532-1-kever.yang@rock-chips.com> <20200326100916.22532-8-kever.yang@rock-chips.com> Message-ID: <20200327181647.GR5793@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: