From patchwork Mon Oct 17 07:00:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Liu X-Patchwork-Id: 615684 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1793557pvb; Mon, 17 Oct 2022 00:01:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DNYl8Cam1nrGEcwWEmEl5GXDWdnC991tEzBrye4VdgE3ABJBbMcADiYN3a2d40HEigo4W X-Received: by 2002:a05:6402:380a:b0:451:ae08:7a6c with SMTP id es10-20020a056402380a00b00451ae087a6cmr8693585edb.161.1665990067291; Mon, 17 Oct 2022 00:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665990067; cv=none; d=google.com; s=arc-20160816; b=J5zEHnsMHme+4x6huKaD3B9s4RCo81zATjlMCVk0kwSEnEYF66gl/TWctPVKVNs3mN eG9yKQR+HexnQxVo1nzatuJQ2sA25Bi1aOw96ZLhSVEOIpYkDte4GuVC/IJMULQzjwcg VlFJT7jwfJeY++gEjJ47aWZoDQuwxnj3GrlaGsIOx68S8GqsqS2gRyMQir696B0H2hRM ODQ40F6Dv2HGuqTMsO2GO9+nggMZOUytw8NYRMlQu2DiUxNhOWT1ZHqhTBfwiomVzmdz T3z9aZFQJKEvW8YNCqTCtn4QVkvpBJXROOklLlClhFg8+NELuLlFCtUMfgeRnYbjHBl6 RzNw== 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=GDVnyKyn2bffUd6tBOWPL/1qRZZFVuzRZbpU62IBMWo=; b=vYLWlhcpDlQPaJjpZAtCkj5LnoKFHvSyX4WYTjxdM+d8vKx71BB3VvjJQKfE7+VMoy 3SKvjgasxqi8saQymO6nhLQnghrPSn8LxoRIrlUySi2Y2qaWZNAePXyCtgjTVwV289sZ bx7VhZARD2JBMKXCoQ4Ekp+329AHrnw8N0fIeWraiIWifk+95xqiGc3SZcGHtIfJ0Vwo xhBKaHca0dglYCqVOoWXkPS92xOQ4qkrBTTNbB/epObtjzrJBibRPuv7KGfBXz0bZTSR ZHnWBR2DGv50Bb9roYC6xElCdNARre40L3VkBpcoOUci8QBc1mn7IO1uG0I/YGNxtKWz VarA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F09zkSoU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id g8-20020a056402090800b0045c7611d8ddsi9249567edz.179.2022.10.17.00.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 00:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F09zkSoU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 C917984F58; Mon, 17 Oct 2022 09:00:54 +0200 (CEST) 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="F09zkSoU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE1E884DEE; Mon, 17 Oct 2022 09:00:49 +0200 (CEST) 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-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 11E7684F55 for ; Mon, 17 Oct 2022 09:00:41 +0200 (CEST) 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-x530.google.com with SMTP id r18so9650255pgr.12 for ; Mon, 17 Oct 2022 00:00:40 -0700 (PDT) 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=GDVnyKyn2bffUd6tBOWPL/1qRZZFVuzRZbpU62IBMWo=; b=F09zkSoUgAHIOY7NE/1LVmHj2Tvj16NBZGadTBdgcvCk2dN/7WDJZqpHmiwQlFSt33 FuY7f1viBdGxagywVI3om0htcbPzy1wsm5wKrOINloz4rh4DDzD62UmNj+jS9Vfh2z84 KXk+9MzWaYyoSAhA65pp8YNS/0i8g+f7i1F3Ngns+4wPqT4gKlwHWwejjcDmdmLRWj2c Yr847U4KCCkKtjAj7EQgj3fpWb+8pqkfLtKm6Z2egqjSfome0LDrNj+gjNI6M7OpbcoN istp0GGlfnxOxOzh53VtHPtaSFnZcefozMACtGi8s3XjBNvLGM7gXHfv8nPXywH5POtX fkoQ== 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=GDVnyKyn2bffUd6tBOWPL/1qRZZFVuzRZbpU62IBMWo=; b=cKstCARcOz8ZMryAGFk8NvQNMxQmwJHMgsVWp81dUzTrmuFj1G3zObzPhptm+8WAcn rxWc77RxgM0aOu0ITtFVp5YpLfogghIFjasD+gnbBe4gXeTI1Cr0idcbf2VNDqGFFrni aZb25IbJcYmgplOrpbsFci5uQbGrxGY7dBl2UIxjVzPr1kdJU3+2Zd9peg8QhcvwkubH IGh9M7ofxb6Crh89K7CuDosev95z8dZU/915PZXbPkfW8/lmQYIJ7ES3xDpmvmuDm+Fj M3wQyEDfTGLcBeIIB1Bhs14aUxfeY7iqvE/pg8axj0E0zXWYs9yPWJvcm7Me8SsmDCgv vKcA== X-Gm-Message-State: ACrzQf30Ht32c1BIq1kcb47uAgcLDVx4R9+V1org7wKXU/N/v/jrTISL ejTvSQ7rR3KlFy1/6+pch76dEMWP5CyEMDCu X-Received: by 2002:a65:4bcf:0:b0:460:c57f:9dad with SMTP id p15-20020a654bcf000000b00460c57f9dadmr9481533pgr.18.1665990038833; Mon, 17 Oct 2022 00:00:38 -0700 (PDT) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id z126-20020a623384000000b005289a50e4c2sm6163817pfz.23.2022.10.17.00.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 00:00:38 -0700 (PDT) From: "Ying-Chun Liu (PaulLiu)" To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" , Simon Glass Subject: [PATCH v18 3/3] doc: cmd: wget: add documentation Date: Mon, 17 Oct 2022 15:00:21 +0800 Message-Id: <20221017070021.2019592-4-paul.liu@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221017070021.2019592-1-paul.liu@linaro.org> References: <20221017070021.2019592-1-paul.liu@linaro.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 Add documentation for the wget command. Signed-off-by: Ying-Chun Liu (PaulLiu) 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 90221015ee..11f5fcfaff 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -73,6 +73,7 @@ Shell commands cmd/true cmd/ums cmd/wdt + cmd/wget cmd/xxd Booting OS