diff mbox series

[v20,3/4] doc: cmd: wget: add documentation

Message ID 20221108061731.1589327-4-paulliu@debian.org
State New
Headers show
Series add TCP and HTTP for downloading images | expand

Commit Message

Paul Liu Nov. 8, 2022, 6:17 a.m. UTC
From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>

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>
---
 doc/usage/cmd/wget.rst | 61 ++++++++++++++++++++++++++++++++++++++++++
 doc/usage/index.rst    |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 doc/usage/cmd/wget.rst

Comments

Simon Glass Nov. 8, 2022, 8:15 p.m. UTC | #1
On Mon, 7 Nov 2022 at 23:17, Ying-Chun Liu (PaulLiu)
<paul.liu@linaro.org> wrote:
>
> From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
>
> 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>
> ---
>  doc/usage/cmd/wget.rst | 61 ++++++++++++++++++++++++++++++++++++++++++
>  doc/usage/index.rst    |  1 +
>  2 files changed, 62 insertions(+)
>  create mode 100644 doc/usage/cmd/wget.rst
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Ramon Fried Nov. 9, 2022, 8:25 a.m. UTC | #2
On Tue, Nov 8, 2022 at 10:15 PM Simon Glass <sjg@chromium.org> wrote:
>
> On Mon, 7 Nov 2022 at 23:17, Ying-Chun Liu (PaulLiu)
> <paul.liu@linaro.org> wrote:
> >
> > From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
> >
> > 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>
> > ---
> >  doc/usage/cmd/wget.rst | 61 ++++++++++++++++++++++++++++++++++++++++++
> >  doc/usage/index.rst    |  1 +
> >  2 files changed, 62 insertions(+)
> >  create mode 100644 doc/usage/cmd/wget.rst
> >
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tom Rini Nov. 28, 2022, 7:52 p.m. UTC | #3
On Tue, Nov 08, 2022 at 02:17:30PM +0800, Ying-Chun Liu (PaulLiu) wrote:

> From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
> 
> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/doc/usage/cmd/wget.rst b/doc/usage/cmd/wget.rst
new file mode 100644
index 0000000000..4fcfa03954
--- /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 df50746c34..13ade7dffc 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -75,6 +75,7 @@  Shell commands
    cmd/true
    cmd/ums
    cmd/wdt
+   cmd/wget
    cmd/xxd
 
 Booting OS