]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mach-sc5xx: Switch from tftp to wget
authorCaleb Ethridge <caleb.ethridge@analog.com>
Thu, 21 May 2026 13:53:16 +0000 (09:53 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 4 Jun 2026 18:24:18 +0000 (12:24 -0600)
Switch the nfsboot and other relevant commands to use
wget instead of tftp. This also includes the addition of
the httpdstp variable for selecting the wget port.

There is no longer any automatic DHCP configuration. Before
running a command with wget, either 'dhcp' must be run or
the 'ipaddr' and 'serverip' variables must be set. Additionally,
the nfsboot command looks for the file named 'fitImage' on the
server to use to boot.

The default port is set to 8000 instead of the usual 80
to allow for use with an unprivileged web server.

Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/env/adi/adi_boot.env

index b4b725247f7c044344db1731156a3c22190a6fb5..be4d8521ac970658053483171ff9cfa655911418 100644 (file)
@@ -14,6 +14,7 @@
 /* Config options */
 ethaddr=02:80:ad:20:31:e8
 eth1addr=02:80:ad:20:31:e9
+httpdstp=8000
 uart_console=CONFIG_UART_CONSOLE
 #ifdef CONFIG_SC59X_64
 initrd_high=0xffffffffffffffff
@@ -26,15 +27,14 @@ adi_bootargs=EARLY_PRINTK console=ttySC0,CONFIG_BAUDRATE vmalloc=512M
 ramargs=setenv bootargs ${adi_bootargs}
 
 addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off
+rootpath=/romfs
 
 /* Boot modes are selectable and should be defined in the board env before including */
 #if defined(USE_NFS)
-// rootpath is set by CONFIG_ROOTPATH
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfsvers=3 ${adi_bootargs}
-nfsboot=run init_ethernet;
-       tftp ${loadaddr} ${tftp_dir_prefix}${imagefile};
-       run nfsargs;
+nfsboot=run nfsargs;
        run addip;
+       wget ${loadaddr} ${serverip}:/fitImage;
        bootm ${loadaddr}
 #endif
 
@@ -63,8 +63,7 @@ ospiboot=run ospiargs;
 #endif
 
 #if defined(USE_RAM)
-ramboot=run init_ethernet;
-       tftp ${loadaddr} ${tfpt_dir_prefix}${imagefile};
+ramboot=wget ${loadaddr} ${serverip}:/fitImage;
        run ramargs;
        bootm ${loadaddr}
 #endif