diff options
author | Tom Rini <trini@konsulko.com> | 2020-05-06 11:05:17 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-07 09:01:42 -0400 |
commit | 7946a814a31989998120b4b4aa417222ba21b2fa (patch) | |
tree | 9f7eb5b5839e35993da9f4cf6850d694f263d1b2 /tools | |
parent | 653f7c44677cd13bb106673bb7c46542e217fa13 (diff) | |
download | u-boot-7946a814a31989998120b4b4aa417222ba21b2fa.tar.gz |
Revert "mkimage: fit: Do not tail-pad fitImage with external data"
This has been reported to break booting of U-Boot from SPL on a number
of platforms due to a lack of alignment of the external data. The
issues this commit is addressing will need to be resolved another way.
Re-introduce a data leak in the padding for now.
This reverts commit 20a154f95bfe0a3b5bfba90bea7f001c58217536.
Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Reported-by: Michael Walle <michael@walle.cc>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/fit_image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c index 1e0f1e9fce..88ff093d05 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -435,7 +435,7 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname) int image_number; int align_size; - align_size = params->bl_len ? params->bl_len : 1; + align_size = params->bl_len ? params->bl_len : 4; fd = mmap_fdt(params->cmdname, fname, 0, &fdt, &sbuf, false, false); if (fd < 0) return -EIO; @@ -493,6 +493,7 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname) fdt_pack(fdt); new_size = fdt_totalsize(fdt); + new_size = ALIGN(new_size, align_size); fdt_set_totalsize(fdt, new_size); debug("Size reduced from %x to %x\n", fit_size, fdt_totalsize(fdt)); debug("External data size %x\n", buf_ptr); |