Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60764C4332F for ; Tue, 8 Nov 2022 06:18:34 +0000 (UTC) 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) 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-Google-Smtp-Source: AMsMyM6MnNe4wpbIzi/J/XL0wdQbmh0i3TxeTOGH1XbwKSzyPHO0FasytCJDy5ebGEp1vmXw1ofvKA== 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 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.35.1