From patchwork Tue Nov 8 06:17:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Liu X-Patchwork-Id: 622631 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2726568pvb; Mon, 7 Nov 2022 22:18:34 -0800 (PST) X-Google-Smtp-Source: AMsMyM7IZoRM+M0YsOXI/ueeGa0n7D1MbutYEdmkzve5UqrpXkO+6ulZxxaoY6wPs06DFmvvuHst X-Received: by 2002:a17:906:8a57:b0:7ad:69fb:3a with SMTP id gx23-20020a1709068a5700b007ad69fb003amr50125994ejc.179.1667888314656; Mon, 07 Nov 2022 22:18:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667888314; cv=none; d=google.com; s=arc-20160816; b=ce2nSCwrOLT3j0IC/4MhCXq9dqhRgWpyCKVXn+HMnCWAZSdPtc5PDuznVKiDPAMiR2 U8RQ0j0AF0WIa29kvRXnSarE62ettdRKs2x4VE32z4APd8MvG81bpTVRlst2CqT8du7r ZOW4Vx+ueqxMHbkiDxde+sAUi3RhMH/GmXce0NrjPppJMLo8/RRV0bCPu7Kz0pGA8HOC Oq9AronxXDv7i1fLDQeJjsGguO2yrYyRwWPrtvUzSbOJ+hr/lopw0ag/OGL4yzHx7jq5 lYulMaL0SbZZPmmyIM+046zaEw8OSJfERoqVXx487a42ufDLRsA9DnmLICvCdqeKIVo1 dZ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=40mplljDytwTyxWKCndOvIaAtcyAOBGXuf9/MaR+Cbc=; b=lyIYjNxcKEwK+nG8A8dS/xVnOOaOkEFq+0ru58uT5Y1CgXQckMWJoa+HGOnoN4NnjL xMpjL5wzUHtpRaEbu/kAGIDSemLiPJWg53TFGQI1dWOjaH/1CrH+Tr3igRf6LrXjDxWB vpI4UYGsYEhxSIhMjiwq1j/k5ylY1wHgpB9eGNehu/2/lQaH9YAEgFIN8H0HE6/9H4RY dgUosNbX3Sv7ZvMVIFoWh83LMgtyHNHvs4YzNGZWI3u6tllNH5jJyUf1htfnW3u3TsdB wIOQjT53u/wSoWATeuZ7SAMqtQE3WazfhP7VxxhHSLfBLQjvoSyum9et+3n/LXXca7IE 5PlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oHc+Gd/q"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id x16-20020a05640226d000b0045dacc047fcsi14578876edd.559.2022.11.07.22.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 22:18:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oHc+Gd/q"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEF088501C; Tue, 8 Nov 2022 07:18:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="oHc+Gd/q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FE1E85031; Tue, 8 Nov 2022 07:17:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4596F8501C for ; Tue, 8 Nov 2022 07:17:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paul.liu@linaro.org Received: by mail-pg1-x52f.google.com with SMTP id v3so12554526pgh.4 for ; Mon, 07 Nov 2022 22:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=40mplljDytwTyxWKCndOvIaAtcyAOBGXuf9/MaR+Cbc=; b=oHc+Gd/qF6n015R2QYNpIpFYXGoJjUAB6vK4RZsavzV/BxGDfqk7DuS4jpyWmddcRO CnEy04v7QK9z1bOUxk4RoJ8QOu8SeNr2fcLhrTQu7irVNirZ5TigkhJWWrLqPqKnvM2t 28lM3vl+T39KLFLVRW6zBpPCGlQZWtueQhZ1ilvG3AcXfhi5+lKuRegKrQuOJDIwtk4V juB994a9/v1T8qgMv4n8akC/79VAFTxj5GYbjShrn/4sq2NVqsukIxP27B5NYRUJ4Qox /QiqVIpmhiQEtxD8LNLBidHKfZ4FsLDqERvrRKftWjXGKnx5bfad7aW6g9RKqZSOVHEL Ii2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=40mplljDytwTyxWKCndOvIaAtcyAOBGXuf9/MaR+Cbc=; b=oatJ91DkJMODi/M3/q/wVUZdxHH0prESQNAHa8lzEgVcgHdZMNhliJtfUlQWvyAEiN EUe6X7dI1UdOvOCSDWOumCuPXj1tURqKpa62zG9MGNOpkOgGaklVE1FjMcaV6j80w1fM 0o7mjXPVBjdhkSoMLadtid+QrvG8uzx6SgciwnMrypxNZLl2f+b2/8XfbSZ5NOY5UG3p D9mkztZ+i9M0hLvSQ+Jq33R68yAiKVIkfGi65GkxaIirNCAHoHbFYfsgzk6OlSxDNQtd kHOirDQe03DN9hrRggt9Q6bCbDklJoDxPdJeTbBz/Ca5qQZvVB3xPJl8U+M9feGxx689 KQhQ== X-Gm-Message-State: ACrzQf2j9i70vdnbi3XrCauo9fb+Wt4lMrk7io/gCdA7azuu2W9Z0xgS UFih2ad3jEVdT+Cb6FIxwa0xXu1f8dRKXERc X-Received: by 2002:a62:7b0f:0:b0:56b:e472:9e81 with SMTP id w15-20020a627b0f000000b0056be4729e81mr54312415pfc.13.1667888266180; Mon, 07 Nov 2022 22:17:46 -0800 (PST) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id o24-20020aa79798000000b0056a7486da77sm5704820pfp.13.2022.11.07.22.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 22:17:45 -0800 (PST) From: "Ying-Chun Liu (PaulLiu)" X-Google-Original-From: "Ying-Chun Liu (PaulLiu)" To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" , Christian Gmeiner , Joe Hershberger , Michal Simek , Ramon Fried , Simon Glass Subject: [PATCH v20 3/4] doc: cmd: wget: add documentation Date: Tue, 8 Nov 2022 14:17:30 +0800 Message-Id: <20221108061731.1589327-4-paulliu@debian.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108061731.1589327-1-paulliu@debian.org> References: <20221108061731.1589327-1-paulliu@debian.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: "Ying-Chun Liu (PaulLiu)" Add documentation for the wget command. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried Cc: Simon Glass Reviewed-by: Simon Glass Reviewed-by: Ramon Fried --- doc/usage/cmd/wget.rst | 61 ++++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 2 files changed, 62 insertions(+) create mode 100644 doc/usage/cmd/wget.rst 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