From 73f4ebb659df4996e154b17f14866fb166447be0 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 22 Jul 2020 17:46:02 +0200 Subject: dfu: fix dfu tftp on sandbox The environment variable loadaddr is in the virtual address space of the sandbox. To get the actual memory address where the FIT image has been loaded we have to convert this address according to the memory mapping of the sandbox. Equally the addresses in the *.its file have to be converted when used in the dfu_ram driver. Signed-off-by: Heinrich Schuchardt --- common/update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/update.c') diff --git a/common/update.c b/common/update.c index d8854791d2..36b6b7523d 100644 --- a/common/update.c +++ b/common/update.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -280,7 +281,7 @@ int update_tftp(ulong addr, char *interface, char *devstring) } got_update_file: - fit = (void *)addr; + fit = map_sysmem(addr, 0); if (!fit_check_format((void *)fit)) { printf("Bad FIT format of the update file, aborting " -- cgit v1.2.3