aboutsummaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'loader.c')
-rw-r--r--loader.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/loader.c b/loader.c
index 680569271e..575a23a44b 100644
--- a/loader.c
+++ b/loader.c
@@ -456,7 +456,8 @@ static ssize_t gunzip(void *dst, size_t dstlen, uint8_t *src,
}
/* Load a U-Boot image. */
-int load_uboot(const char *filename, target_ulong *ep, int *is_linux)
+int load_uboot(const char *filename, target_ulong *ep, target_ulong *loadaddr,
+ int *is_linux)
{
int fd;
int size;
@@ -533,6 +534,9 @@ int load_uboot(const char *filename, target_ulong *ep, int *is_linux)
cpu_physical_memory_write_rom(hdr->ih_load, data, hdr->ih_size);
+ if (loadaddr)
+ *loadaddr = hdr->ih_load;
+
ret = hdr->ih_size;
out: