aboutsummaryrefslogtreecommitdiff
path: root/tools/fit_image.c
diff options
context:
space:
mode:
authorPatrick Oppenlander2020-07-30 14:31:48 +1000
committerTom Rini2020-08-07 11:47:18 -0400
commitc995d854efcbf54ebd99a41f9a3c918340f16376 (patch)
treef5ee64f5bb7063bbd6450379d67359e4ad996286 /tools/fit_image.c
parentef40129c33396d90a42e10f4a772390ac5b2ba05 (diff)
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 f7d2f560294..06faeda7c26 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));