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>
diff --git a/include/dfu.h b/include/dfu.h
index 6fa4505..84abdc7 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -79,7 +79,7 @@
};
struct ram_internal_data {
- void *start;
+ unsigned long start;
unsigned int size;
};