Skip to contentSkip to conversation

mkimage: fit: fix import of external data

PATCH New patrick.oppenlander at gmail.com 2 participants 2 messages Jul 30, 2020 – Aug 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkimage: fit: fix import of external data

From: Patrick Oppenlander <[email protected]>

The external data is located after the mmapped FDT pointed to by 'old_fdt', not in the newly created FDT we are importing into at 'fdt'.

---
 tools/fit_image.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/fit_image.c +2 -2
index df310b53da..793df54449 100644
@@ -606,8 +606,8 @@ static int fit_import_data(struct image_tool_params *params, const char *fname)
 			continue;
 		debug("Importing data size %x\n", len);
 
-		ret = fdt_setprop(fdt, node, "data", fdt + data_base + buf_ptr,
-				  len);
+		ret = fdt_setprop(fdt, node, "data",
+				  old_fdt + data_base + buf_ptr, len);
 		if (ret) {
 			debug("%s: Failed to write property: %s\n", __func__,
 			      fdt_strerror(ret));
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/1 mkimage: fit: fix import of external data

Quoted 6 lines · patrick.oppenlander at gmail.com

From: Patrick Oppenlander <[email protected]>

The external data is located after the mmapped FDT pointed to by 'old_fdt', not in the newly created FDT we are importing into at 'fdt'.

Applied to u-boot/master, thanks!

Signature · 8 lines
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/20200808/6e0d1c0c/attachment.sig>