提交 7946a814 编写于 作者: T Tom Rini

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 20a154f9.
Reported-by: NAlex Kiernan <alex.kiernan@gmail.com>
Reported-by: NMichael Walle <michael@walle.cc>
Tested-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NTom Rini <trini@konsulko.com>
上级 653f7c44
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册