diff options
| author | Jerome Forissier <[email protected]> | 2024-10-16 12:04:09 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-16 11:11:56 -0600 |
| commit | 3c656c928bd7c8bd48341b813057db8ed08d6bfb (patch) | |
| tree | 6ffcbe7faee884b1c82d971861f1c3aec2aa4e00 /cmd | |
| parent | 3135b9a9162a51a22447d1e269871c4cacac3a4e (diff) | |
net: lwip: add wget command
Add support for the wget command with NET_LWIP. The command normally
expects a URL: wget [loadaddr] url, but it also accepts the legacy
syntax: wget [loadaddr] [server:]file.
The server IP may alternatively be supplied via ${httpserverip} which
has higher priority than ${serverip}.
Based on code initially developed by Maxim U.
Signed-off-by: Jerome Forissier <[email protected]>
Co-developed-by: Maxim Uvarov <[email protected]>
Cc: Maxim Uvarov <[email protected]>
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 18 | ||||
| -rw-r--r-- | cmd/net-lwip.c | 8 |
2 files changed, 18 insertions, 8 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 2791ad5393c..8c677b1e486 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2001,14 +2001,6 @@ config SYS_DISABLE_AUTOLOAD is complete. Enable this option to disable this behavior and instead require files to be loaded over the network by subsequent commands. -config CMD_WGET - bool "wget" - select PROT_TCP - default y if SANDBOX - help - wget is a simple command to download kernel, or other files, - from a http server over TCP. - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2116,6 +2108,16 @@ config CMD_TFTPBOOT help tftpboot - load file via network using TFTP protocol +config CMD_WGET + bool "wget" + default y if SANDBOX + select PROT_TCP if NET + select PROT_TCP_LWIP if NET_LWIP + select PROT_DNS_LWIP if NET_LWIP + help + wget is a simple command to download kernel, or other files, + from a http server over TCP. + endif # if CMD_NET config CMD_PXE diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index c021da6a674..42f8bd6b259 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -35,3 +35,11 @@ U_BOOT_CMD( "hostname [envvar]" ); #endif + +#if defined(CONFIG_CMD_WGET) +U_BOOT_CMD( + wget, 3, 1, do_wget, + "boot image via network using HTTP protocol", + "[loadAddress] URL" +); +#endif |
