summaryrefslogtreecommitdiff
path: root/tools/fit_image.c
diff options
context:
space:
mode:
authorPatrick Oppenlander <patrick.oppenlander@gmail.com>2020-07-30 07:31:48 +0300
committerTom Rini <trini@konsulko.com>2020-08-07 18:47:18 +0300
commitc995d854efcbf54ebd99a41f9a3c918340f16376 (patch)
treef5ee64f5bb7063bbd6450379d67359e4ad996286 /tools/fit_image.c
parentef40129c33396d90a42e10f4a772390ac5b2ba05 (diff)
downloadu-boot-c995d854efcbf54ebd99a41f9a3c918340f16376.tar.xz
mkimage: fit: fix import of external data
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'. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
Diffstat (limited to 'tools/fit_image.c')
-rw-r--r--tools/fit_image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c
index f7d2f56029..06faeda7c2 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -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));