]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
doc: cmd: wget: add documentation
authorYing-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Tue, 8 Nov 2022 06:17:30 +0000 (14:17 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 28 Nov 2022 18:06:39 +0000 (13:06 -0500)
Add documentation for the wget command.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
doc/usage/cmd/wget.rst [new file with mode: 0644]
doc/usage/index.rst

diff --git a/doc/usage/cmd/wget.rst b/doc/usage/cmd/wget.rst
new file mode 100644 (file)
index 0000000..4fcfa03
--- /dev/null
@@ -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.
index d6283fab8ebb84b42a25565e8d1126eb8d4ec1c2..0bc82887e9e2fa0727067c49e168cf1e1bf0e8d1 100644 (file)
@@ -79,6 +79,7 @@ Shell commands
    cmd/ums
    cmd/ut
    cmd/wdt
+   cmd/wget
    cmd/xxd
 
 Booting OS