From 0f6b4086971708ea48334079c243792d8816a656 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 16 Jun 2017 15:13:40 +0200 Subject: [PATCH] Set also fileaddr env variable after successful load{b,s,y} --- u-boot/common/cmd_load.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/u-boot/common/cmd_load.c b/u-boot/common/cmd_load.c index b8be6ee..4c2588b 100644 --- a/u-boot/common/cmd_load.c +++ b/u-boot/common/cmd_load.c @@ -209,6 +209,9 @@ static ulong load_serial(ulong offset) sprintf(buf, "0x%lX", size); setenv("filesize", buf); + sprintf(buf, "0x%lX", addr); + setenv("fileaddr", buf); + return addr; case SREC_START: break; @@ -518,6 +521,9 @@ int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) sprintf(buf, "0x%X", size_dl); setenv("filesize", buf); + + sprintf(buf, "0x%lX", address); + setenv("fileaddr", buf); } else { puts("\n"); printf_err("downloaded data size is zero!\n"); -- 2.25.1