From patchwork Mon Nov 6 11:39:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 741379 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1036462wrr; Mon, 6 Nov 2023 03:42:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZ7gSnL7uaDD3yXIwDHfSGie4oblcJWhg9TYu3UvvIjZ1L6tIohP2krlwUXB8fj3gLO4tR X-Received: by 2002:a17:907:a687:b0:9db:df62:fd82 with SMTP id vv7-20020a170907a68700b009dbdf62fd82mr10136163ejc.31.1699270978032; Mon, 06 Nov 2023 03:42:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699270978; cv=none; d=google.com; s=arc-20160816; b=uh4AswLhX9s4EPCDbOwOeyq5yGoDLzLBfM4WpaUOklfiZ7eiG4BH7Vt1d61Duou7vD yvvQe3o3xJqu+CFstT4j1kClux0bNDcCbF4umwE8uriN279mzuaVOERs/TnLRUlbcUAR 0uFh6NC0AOa3ilECntSQHMNJaDgvrxonXrAMTlfCG61T6D+wwYP+b+ZqscfUeCU+f/qm sewblE43Jk5zlSNbx+vO6qmnyRSzeBcp5vGqjICqzydPOWnsbxTjME9H1i4IrhdP6GfV dfnKzc4B04Mp/Hw0VVUGkVH2AROCpj8jQW2HkTYn51Ef0Hcp+N2yEKy6YcgcCyAvMJmc F7zg== 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=9yfAtkx/MLAaC2e3oTVCEdGrlnmIaFPaJzkqM3lqaYU=; fh=I7E+BwgHMByijVVN/pPHsLSpz7oP4y4e73noHEekrEE=; b=KvKJyHfeLjKYZwtu9z6Wn3ZFUA0T9SzYq6XU9FmsDEH8+083Q2HFLwKBvSvflMOxR0 8HpKqXE0H21NVvJiFlJ8NM4Yip+x+4masxS2zjB+LtHQdgue/rRtYTY8+aqvMVg+oI6H I0fFTJ3bZ4xNs+vXmeUOG6n8zgBBbVNeHTX4ACyohDdGAKICqNdliW/vE1b5Ce5o6nvR h2PzVasgKUqBK+wPEXAHknkghICxl8rK2IBx1L9O1YWra2cTYqhjjU4SuNaNw1WXqwAM DzJIKAE/SLOM+vSHA7mY1IKMkqGE3ub37ihvw0BjX/hepqSOopnLIDQjFn59yqLaj/d7 myKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z8g0G9IR; 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 ds5-20020a170907724500b0099bcc4d1c97si4086731ejc.745.2023.11.06.03.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:42:58 -0800 (PST) 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=z8g0G9IR; 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 2CC3D87049; Mon, 6 Nov 2023 12:41:34 +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="z8g0G9IR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B0B7387026; Mon, 6 Nov 2023 12:41:24 +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=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NUMERIC_HTTP_ADDR,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 EAAE587049 for ; Mon, 6 Nov 2023 12:41:16 +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=masahisa.kojima@linaro.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1ccce410660so6050855ad.3 for ; Mon, 06 Nov 2023 03:41:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699270859; x=1699875659; darn=lists.denx.de; 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=9yfAtkx/MLAaC2e3oTVCEdGrlnmIaFPaJzkqM3lqaYU=; b=z8g0G9IREQIGeBV1KgbA2jvNobm+Gq3DjDh+NUwkZIrp6znUanRj3gFLMnS6XRxqZd Qr+ankKla3fpvwpU8yqzXu2W4jr0Vrp3DAOPJSJKBcp2RPhv/5lAcVHyua0no2TKE5DA PNMthT+hfM47g/oyG9uWDNq9GgET3LPqjSKB4FgcCx6q9M2knG5RlXj48S+7u0M+AtKO HtfvsYVzjQDFDoIbb8EzbVTUZcg7jD/JlCG6Uak+FlEVxP43lcQ5IsRkNnr48/WRKOij bMngA4nAsKRE6yPPtpFEtvR8SZs6mN8map/QCMIAb3uQ7zgUdEggH+s4ckPR3Gnw7bet Jv1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699270859; x=1699875659; 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=9yfAtkx/MLAaC2e3oTVCEdGrlnmIaFPaJzkqM3lqaYU=; b=j8zUUCuL8sUHHQiX0Ftq2RrumD9jxDOtyljcnD001lZwIbhEkrf2RBtD824byMaXqU jMjzUKzfDMChrkNqbM3U0+N7JeFIgIquCXwBOzxUX9SBiv/QAVQzQW1L0QOzzBf81zZT nqet1UX0IgMTNgi8k0cM1DfOZQx8uktYhX4cj3sSYeHPpYxLayOjp/EdjOCcj2h31rqi Jhosp5+zUGRai3PeL0n9FjviFdxcb5cnJCgrE8JahURDschvX5oFs36snIIfUmeK7NNM FukCxlgs2mI+JxEdYivdcs9GgGQcYYxAPVclV1+3Rpat/iTYSRyJddblPb2YtBzElh41 SRtA== X-Gm-Message-State: AOJu0YzgB/BQ16fQZgTLIXJXfJTngYHphuNZnbquhW0Rpz6jSlj2H2gV 7yQdRwUsCkLT6U6VnISrJHn5forL+Gv3I0Fj/IQ= X-Received: by 2002:a17:902:d512:b0:1cc:4b1b:2759 with SMTP id b18-20020a170902d51200b001cc4b1b2759mr21325036plg.63.1699270859514; Mon, 06 Nov 2023 03:40:59 -0800 (PST) Received: from localhost ([164.70.16.189]) by smtp.gmail.com with ESMTPSA id s10-20020a170902988a00b001c60c3f9508sm5729506plp.230.2023.11.06.03.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:40:59 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Michal Simek , Masahisa Kojima Subject: [RESEND PATCH v10 9/9] doc: uefi: add HTTP Boot support Date: Mon, 6 Nov 2023 20:39:20 +0900 Message-Id: <20231106113920.3631591-10-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231106113920.3631591-1-masahisa.kojima@linaro.org> References: <20231106113920.3631591-1-masahisa.kojima@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.8 at phobos.denx.de X-Virus-Status: Clean This adds the description about HTTP Boot. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- doc/develop/uefi/uefi.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index fb16ac743a..ca9a573669 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -642,6 +642,36 @@ UEFI variables. Booting according to these variables is possible via:: As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot command 'efidebug' can be used to set the variables. +UEFI HTTP Boot +~~~~~~~~~~~~~~ + +HTTP Boot provides the capability for system deployment and configuration +over the network. HTTP Boot can be activated by specifying:: + + CONFIG_CMD_DNS + CONFIG_CMD_WGET + CONFIG_BLKMAP + +Set up the load option specifying the target URI:: + + efidebug boot add -u 1 netinst http://foo/bar + +When this load option is selected as boot selection, resolve the +host ip address by dns, then download the file with wget. +If the downloaded file extension is .iso or .img file, efibootmgr tries to +mount the image and boot with the default file(e.g. EFI/BOOT/BOOTAA64.EFI). +If the downloaded file is PE-COFF image, load the downloaded file and +start it. + +The current implementation tries to resolve the IP address as a host name. +If the uri is like "http://192.168.1.1/foobar", +the dns process tries to resolve the host "192.168.1.1" and it will +end up with "host not found". + +We need to preset the "httpserverip" environment variable to proceed the wget:: + + setenv httpserverip 192.168.1.1 + Executing the built in hello world application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~