[PATCH 1/1] net/wget: set filesize

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Oct 9 00:52:28 CEST 2024


Environment variable filesize is needed for man use cased, e.g.

* write file to device
* calculate hash

Let wget set the variable.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 net/wget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wget.c b/net/wget.c
index f978adc9f0a..635f82efbb3 100644
--- a/net/wget.c
+++ b/net/wget.c
@@ -400,6 +400,7 @@ static void wget_handler(uchar *pkt, u16 dport,
 		efi_set_bootdev("Net", "", image_url,
 				map_sysmem(image_load_addr, 0),
 				net_boot_file_size);
+		env_set_hex("filesize", net_boot_file_size);
 		break;
 	}
 }
-- 
2.45.2



More information about the U-Boot mailing list