blob: 4fcfa0395437833f5e8316c6b136e056a0de28df [file] [log] [blame]
Ying-Chun Liu (PaulLiu)bfce0ca2022-11-08 14:17:30 +08001.. SPDX-License-Identifier: GPL-2.0+:
2
3wget command
4============
5
6Synopsis
7--------
8
9::
10 wget address [[hostIPaddr:]path]
11
12Description
13-----------
14
15The wget command is used to download a file from an HTTP server.
16
17wget command will use HTTP over TCP to download files from an HTTP server.
18Currently it can only download image from an HTTP server hosted on port 80.
19
20address
21 memory address for the data downloaded
22
23hostIPaddr
24 IP address of the HTTP server, defaults to the value of environment
25 variable *serverip*
26
27path
28 path of the file to be downloaded.
29
30Example
31-------
32
33In the example the following steps are executed:
34
35* setup client network address
36* download a file from the HTTP server
37
38::
39
40 => setenv autoload no
41 => dhcp
42 BOOTP broadcast 1
43 *** Unhandled DHCP Option in OFFER/ACK: 23
44 *** Unhandled DHCP Option in OFFER/ACK: 23
45 DHCP client bound to address 192.168.1.105 (210 ms)
46 => wget ${loadaddr} 192.168.1.254:/index.html
47 HTTP/1.0 302 Found
48 Packets received 4, Transfer Successful
49
50Configuration
51-------------
52
53The command is only available if CONFIG_CMD_WGET=y.
54
55CONFIG_PROT_TCP_SACK can be turned on for the TCP SACK options. This will
56help increasing the downloading speed.
57
58Return value
59------------
60
61The return value $? is 0 (true) on success and 1 (false) otherwise.