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