diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-14 10:08:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-16 09:37:53 +0200 |
commit | 99b591a779432eae6bf1b61272329ccc74011ebe (patch) | |
tree | 58e0212e0f7cde4e898299402738ef71cb673cb0 /scripts | |
parent | d497d04d652e58e8dc4514cb6a20dd2a147d8478 (diff) | |
download | barebox-99b591a779432eae6bf1b61272329ccc74011ebe.tar.gz barebox-99b591a779432eae6bf1b61272329ccc74011ebe.tar.xz |
scripts: imx-image: Do not pad image
We have to pad the load size to the next 4k boundary, but only for the
HAB4 case we actually care what data is loaded in the rest of the image.
This lets the padding depend on the prepare_sign option.
Background for this patch is a new yet-to-be-introduced image loading
mechanism for i.MX. This new mechanism only loads the PBL portion of
the image to memory, and not the whole image anymore. This means that
the image in this case changes from:
i.MX header (with loadsize: whole image), PBL, payload, padding
to:
i.MX header (with loadsize: header + PBL + padding), PBL, padding, payload
With the padding between PBL and payload we are no longer able to find
the payload, so we cannot add the padding there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/imx/imx-image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c index e765c1d3d6..f0e8ca3ecd 100644 --- a/scripts/imx/imx-image.c +++ b/scripts/imx/imx-image.c @@ -825,7 +825,7 @@ int main(int argc, char *argv[]) /* pad until next 4k boundary */ now = 4096 - now; - if (now) { + if (prepare_sign && now) { memset(buf, 0x5a, now); ret = xwrite(outfd, buf, now); |