1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 08:12:06 +02:00

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 <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt
2020-07-22 17:46:02 +02:00
committed by Marek Vasut
parent 9337037518
commit 73f4ebb659
3 changed files with 7 additions and 5 deletions

View File

@@ -24,6 +24,7 @@
#include <net.h>
#include <net/tftp.h>
#include <malloc.h>
#include <mapmem.h>
#include <dfu.h>
#include <errno.h>
#include <mtd/cfi_flash.h>
@@ -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 "