Set also fileaddr env variable after successful load{b,s,y}
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 16 Jun 2017 13:13:40 +0000 (15:13 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Fri, 16 Jun 2017 17:31:48 +0000 (19:31 +0200)
u-boot/common/cmd_load.c

index b8be6eebf25635ed23ca48d66278528053991e6e..4c2588b6df4e6a2f42ba40705ce56ef542d7cadd 100644 (file)
@@ -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");