public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 8/8] mkimage: fit_image: Add option to make fit header align
Date: Fri, 27 Mar 2020 14:16:47 -0400	[thread overview]
Message-ID: <20200327181647.GR5793@bill-the-cat> (raw)
In-Reply-To: <20200326100916.22532-8-kever.yang@rock-chips.com>

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: <https://lists.denx.de/pipermail/u-boot/attachments/20200327/44876c39/attachment.sig>

  reply	other threads:[~2020-03-27 18:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 10:09 [PATCH v3 1/8] tool: Move ALIGN_MASK to header as common MACRO Kever Yang
2020-03-26 10:09 ` [PATCH v3 2/8] tool: aisimage: use ALIGN instead of self defiend macro Kever Yang
2020-03-27 18:16   ` Tom Rini
2020-03-26 10:09 ` [PATCH v3 3/8] tools: mkimage: use common ALIGN to do the size align Kever Yang
2020-03-27 18:16   ` Tom Rini
2020-03-26 10:09 ` [PATCH v3 4/8] tools: kwbimage: " Kever Yang
2020-03-26 10:12   ` Stefan Roese
2020-03-27 18:16   ` Tom Rini
2020-03-26 10:09 ` [PATCH v3 5/8] tools: imx8mimage: remove redundant code Kever Yang
2020-03-27 18:16   ` Tom Rini
2020-03-26 10:09 ` [PATCH v3 6/8] tool: use ALIGN() to align the size Kever Yang
2020-03-26 11:39   ` Heinrich Schuchardt
2020-03-27 18:16   ` Tom Rini
2020-03-26 10:09 ` [PATCH v3 7/8] libfdt: Make fdtdec_get_child_count() available for HOST Kever Yang
2020-03-28 20:04   ` Simon Glass
2020-03-26 10:09 ` [PATCH v3 8/8] mkimage: fit_image: Add option to make fit header align Kever Yang
2020-03-27 18:16   ` Tom Rini [this message]
2020-03-30  2:35     ` Kever Yang
2020-03-27  3:27 ` [PATCH v3 1/8] tool: Move ALIGN_MASK to header as common MACRO Punit Agrawal
2020-03-27 18:16 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327181647.GR5793@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox