From patchwork Wed Oct 19 17:32:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Liu X-Patchwork-Id: 616447 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp446479pvb; Wed, 19 Oct 2022 10:34:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6I0sZm0km4imabBdPz8qpA/phTvd+kGVRTLAcsJa6lzUOMCOzvgUibYH5deoSjPQzQDBCV X-Received: by 2002:a17:902:da91:b0:181:a0e6:5116 with SMTP id j17-20020a170902da9100b00181a0e65116mr9677497plx.57.1666200864021; Wed, 19 Oct 2022 10:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666200864; cv=none; d=google.com; s=arc-20160816; b=0LY6Mdahz93Z44dBnQza6Rqovv6CDKq4hwlsLeuCg+2cIyw/OE0CZKEUxa9kS7h6pc jYtxQHfTBpz8Ab2GLKG+lnqblNlH+T/bN6jNhoRh/iDdCczDgBr53+VQ7NMNtdr6yhq2 Lz1V45zS2D1shs157oi08rddBlmbgEbDpNMqmGRHvWDnSikyCjVk9mo1+IXP2kauvMHa 18LQS6MkgDraaGLWwt9fvkl5NnkR0C2zir+m6BMktDsbtDACU5UwpsLQm1MPRGELgVjn aE8PsHqslpyA8/XSoJdbwf3bJ97IoKZfXcoQ46aumpzW4YebLCn4g8amSeAbPGpT81sT ehjQ== 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=hlxOM7fQyTvu2PhaHbnU3jVMZ7eXZIJpVbiMeKRLjLRYa5HiG8EyEMntVmdG/aBsoj lfyQQkP+LmnukD8Lz2M3eASudn19AbuDd+pq49umF0MCuRiBQapcNqNUPnoz+1NU1KNn DCH4QTQxDrSwvBsEr/R52b4QmqqQXU5Ot3ygLJ41jcPeoUjjVTpH8h08u6KKETc4Pjac vrbdmLYUcckU8twr3icr6I0yjpJs5UyI0QY7HBTT85/sV8Xl8WjsHFgnU13VXFEPzs/y A8JncbO4o4ftWlDUx97UAxxyTZqn+lu7VmisWk6nVviiRxIl2ET8gmCLTbf51Iz7LQ3Z 4sTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVUd6cL+; 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 m20-20020a17090aab1400b0020d48e8ecc5si434447pjq.115.2022.10.19.10.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 10:34:23 -0700 (PDT) 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=rVUd6cL+; 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 34C3E84F9E; Wed, 19 Oct 2022 19:33:46 +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="rVUd6cL+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0CD8A84966; Wed, 19 Oct 2022 19:33:27 +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-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 5DE8F84F87 for ; Wed, 19 Oct 2022 19:33:15 +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-pl1-x635.google.com with SMTP id n7so17939873plp.1 for ; Wed, 19 Oct 2022 10:33:15 -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=rVUd6cL+Tqvl5e+fxMq6bzsaKU51fXaohj2qGDNR01z12Du3qH2S3/o8yGxlJj/Wf1 Ix0txnRlvO5RtfuKpDYbesRswwT8AhWGv/zIkaQYbcuKbmYef6UEv+TYKSziwRvu34uL 3sXhVaYUaWDMBNXssEVqEIXqqoMmsoRiDkBn94GIIn+Y1eSwynGcN7bM0ZqyPT3ENYat rlKSpVxo3fFuFujwChAfYXV5QZsKly8iH+/VeV5CNErRTLiLxv9EIaUwkiFub8Dk49Pi lrPaNsBJoiH33poyTIRAXKFH0FPNAWvW7arFZPCAKgAt1huv0GfSLV0Og/obpdNWuNeW 2Uqw== 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=xG9YoUfAQnYP6kU30tjiAuTM/yaCdMrwrDMpjE2hg0CjZ1Yzr5hS4CYnrrKOg8vEUU JnyMp4eyHnWOAZCvB5va2++X9Xy3/DUwW305fNqdy2WeCpAFa94ICa4vdqCM2BSTolPp 06E4HkD5YWsUBypaUiXSq353E+Q8XjHTO5K5crpGtkerlDiXmwVG+IyZX2Dj382dKX5n xlvaYZAh6MIyG7iaZD+cPq3vo7MIemSTmL2+TjK34phV5retffO7our13TEywL6BEaS0 tVei4OiZLvG7zRjdWX0m1VYjVQMsMncKvrl41m3VKLxlYjvErDzTXQWDMgDq6+g0sK5o d84w== X-Gm-Message-State: ACrzQf2epm00FrvgRMzz2Qfa6iM4VPqYUNo8w3InfcfqEluFDauyC2RL v54WU5/5esGkxd3q3zY1Jl1XSVmjXQ6mQg== X-Received: by 2002:a17:90b:3b4e:b0:20d:5541:3c39 with SMTP id ot14-20020a17090b3b4e00b0020d55413c39mr11169761pjb.229.1666200793454; Wed, 19 Oct 2022 10:33:13 -0700 (PDT) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id d7-20020a170902654700b0017c3776634dsm11069877pln.32.2022.10.19.10.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 10:33:13 -0700 (PDT) From: "Ying-Chun Liu (PaulLiu)" To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" , Simon Glass Subject: [PATCH v19 3/4] doc: cmd: wget: add documentation Date: Thu, 20 Oct 2022 01:32:59 +0800 Message-Id: <20221019173300.1288072-4-paul.liu@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221019173300.1288072-1-paul.liu@linaro.org> References: <20221019173300.1288072-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