summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
authorYing-Chun Liu (PaulLiu) <[email protected]>2022-11-08 14:17:30 +0800
committerTom Rini <[email protected]>2022-11-28 13:06:39 -0500
commitbfce0ca9d48dbee7c06526db808ae20759545db5 (patch)
tree5032c0ddf1a00601124ea7f6b93633e086f97077 /doc/usage
parentcfbae48219fd81f6c9e1a7b5ee160cdd3005f958 (diff)
doc: cmd: wget: add documentation
Add documentation for the wget command. Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]> Cc: Christian Gmeiner <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ramon Fried <[email protected]> Cc: Simon Glass <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/wget.rst61
-rw-r--r--doc/usage/index.rst1
2 files changed, 62 insertions, 0 deletions
diff --git a/doc/usage/cmd/wget.rst b/doc/usage/cmd/wget.rst
new file mode 100644
index 00000000000..4fcfa039543
--- /dev/null
+++ b/doc/usage/cmd/wget.rst
@@ -0,0 +1,61 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+wget command
+============
+
+Synopsis
+--------
+
+::
+ wget address [[hostIPaddr:]path]
+
+Description
+-----------
+
+The wget command is used to download a file from an HTTP server.
+
+wget command will use HTTP over TCP to download files from an HTTP server.
+Currently it can only download image from an HTTP server hosted on port 80.
+
+address
+ memory address for the data downloaded
+
+hostIPaddr
+ IP address of the HTTP server, defaults to the value of environment
+ variable *serverip*
+
+path
+ path of the file to be downloaded.
+
+Example
+-------
+
+In the example the following steps are executed:
+
+* setup client network address
+* download a file from the HTTP server
+
+::
+
+ => setenv autoload no
+ => dhcp
+ BOOTP broadcast 1
+ *** Unhandled DHCP Option in OFFER/ACK: 23
+ *** Unhandled DHCP Option in OFFER/ACK: 23
+ DHCP client bound to address 192.168.1.105 (210 ms)
+ => wget ${loadaddr} 192.168.1.254:/index.html
+ HTTP/1.0 302 Found
+ Packets received 4, Transfer Successful
+
+Configuration
+-------------
+
+The command is only available if CONFIG_CMD_WGET=y.
+
+CONFIG_PROT_TCP_SACK can be turned on for the TCP SACK options. This will
+help increasing the downloading speed.
+
+Return value
+------------
+
+The return value $? is 0 (true) on success and 1 (false) otherwise.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index d6283fab8eb..0bc82887e9e 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -79,6 +79,7 @@ Shell commands
cmd/ums
cmd/ut
cmd/wdt
+ cmd/wget
cmd/xxd
Booting OS