From patchwork Sun Nov 10 08:28:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 842369 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2452220wru; Sun, 10 Nov 2024 00:32:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUF0XJEIvCeoIBRL8B6Wi/UDqLobH2bAaJKrQIGDMRU/aKnwxfLL8naMy500FmTBJe7/XCfTw==@linaro.org X-Google-Smtp-Source: AGHT+IGhCOLewG9p0qQADEKyYSdRKHoNxlwuS4c11KgNYqgTqstlq+cqY1qXnS9tNcqnan0xHHLQ X-Received: by 2002:a17:907:6092:b0:a9a:1e4d:856d with SMTP id a640c23a62f3a-a9eeff0e3e1mr765612266b.22.1731227561518; Sun, 10 Nov 2024 00:32:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731227561; cv=none; d=google.com; s=arc-20240605; b=GDrajpMk/pd7h0GXPGy8qG+Oa2VXVBXnES+yguZ4z+hP9DpXgGPmnTI+2XznmzHohw kqWNMjaTJ7Rl0SLsRfP6Ul1L+nzwLiECatrGzNSAQiS4/7/rH1fW128lqUpsvxntpSz3 Oxc4oCnFZ/Geu2SaGC9sKmw9W+5DMkLbP67cp+bQ+u+aD+uv73hp2PGbs330bp2Cg5sJ vSUVuwkdlHvM9H3RdZguTVSPLk/lBUKzVDlD5xiK/OQsQAgn1EvfoywU9T31mY6sk/a5 5pEyaZJ/LzeRWHR0T5wESiyxr04IEyk+y3bjb83BKTsj9XK3MZsS3TUN3pqydN5C9TSr MWBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=MTO0Kxk0iggDXXIa3ZiQy7xO/LXQRz1tP65CoYNYwig=; fh=8PtuKUlfbsx2RLLsK9luj1ZmmOpxOjoUEJOuUkbXq+g=; b=JMP8gV4MCIHNc4JIobvRJC/YtVIr+7afgtGWPGvWxyh/njLShIwBL0nwl5fTWBay8D 3McdnjVVmd9YSxfIQtrysh70WWWQqWbXXzwlCq2w3FAgfkQD5urd7gIQeOgxFB40bjfk ROtewXTo1w7viLrF9aw0Mx4PpuZsmX9NjwfSmOH9e3JHu+7QML7UooCvB2wT7bQXBhIA 78wleIB2JzeLLFgZQHVpeKaMQjl0mMxIjiyww/1ogN7RI/AG1S0DXy/6yZkBJlX5GgMe sVm98Z6sSr4uL6PrNuCl6ZAxab5Sy71YfZz64h5iqK4d7JnCVBga95EzA17X3SoJ0/C3 C/WA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WH70mPS5; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a9ee0a0bb63si490763366b.188.2024.11.10.00.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2024 00:32:41 -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=WH70mPS5; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 44AD688A37; Sun, 10 Nov 2024 09:32:39 +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="WH70mPS5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4FFE388E1C; Sun, 10 Nov 2024 09:32:38 +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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 5970B87E30 for ; Sun, 10 Nov 2024 09:32:36 +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=ilias.apalodimas@linaro.org Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a9a0ef5179dso611857866b.1 for ; Sun, 10 Nov 2024 00:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731227556; x=1731832356; 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=MTO0Kxk0iggDXXIa3ZiQy7xO/LXQRz1tP65CoYNYwig=; b=WH70mPS5Q6HNMdplE7heda/vpJ5wGz0oJ57/vJtS53224hbYw+udskzycc6ngxdL2O dQiOgRZ7V9Mxl7ZuZP/JuwZyM7iMVuWC26KW+LDdkzIiSqWLgwhwsvX3f5MSRc83z+Hh hV5IqgIjdKRa/xrroooalRRi8iSRKxM4FV+T9l/XZXw/har2wzsRTTXvI9FryRLeAlPo DI1kd6SROyXNkq4vYRXAshMj4sRWObyYf8/NrhQIbxNplWM+glYiqEVYwZC63/KFQUx8 M0SjIdBbZJL98aCZek4d6ueWtOEu+Z/YVao/a7hZ31MB+wDSPiOwA/bSZMXzVZ79SleC pHdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731227556; x=1731832356; 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=MTO0Kxk0iggDXXIa3ZiQy7xO/LXQRz1tP65CoYNYwig=; b=BV+WKExB4+sNf5taVSNu/gNBxIlrhmRMZRIcqltP2f605q86l0KCIzwcHn0fBMTLAI 05O7RA6qWLsVXGWg7uIC7fDBSHc6PFiVbppvNI0QYyiAWxM7PbaJ7dyZRQVcFVZ8EJzQ yjmzGPQsNHuyYOjF7SoOuFeYL1mbOEN8Lr/XA3jU6prEoNaprs7yLgwAWFowevJdjsH9 bSiL5FF6ajucpcaMFmtHdNR0Ntlbqg4ObOGOj4mw9bBbyuWPG6AxOe0B6tTywIWZcMJ/ bcP6s8KOs2mm+G4Y1IEcjsaOnuPl6d2WAC3W7lNsnjxCIL91dLzFhIdJeH7J8XSOiBBQ IEow== X-Forwarded-Encrypted: i=1; AJvYcCUIZmPeKekRtdaU1FH9dwthPqk+dVQcF5SsZHDWV2ZyBp6si990579qCakWE/GFcvrEdZ6rrWI=@lists.denx.de X-Gm-Message-State: AOJu0YxwrwglvgeU5hmaffz0ivKptfrW/hZonUhw7/cYYyDh2L2X/x5P larmK1gK4If087jG4NoeY3bfkRyl/7vlgAcOkVLPJKWD2Vanh7Lwf95NC3GC/uc= X-Received: by 2002:a17:906:7315:b0:a99:368d:dad3 with SMTP id a640c23a62f3a-a9eeff4477amr880369666b.30.1731227555621; Sun, 10 Nov 2024 00:32:35 -0800 (PST) Received: from hades.. (ppp176092143132.access.hol.gr. [176.92.143.132]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0a17b3csm451909166b.19.2024.11.10.00.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2024 00:32:33 -0800 (PST) From: Ilias Apalodimas To: jerome.forissier@linaro.org Cc: Anton.Antonov@arm.com, Ilias Apalodimas , Simon Glass , Tom Rini , Heinrich Schuchardt , Joe Hershberger , Ramon Fried , Mattijs Korpershoek , AKASHI Takahiro , Dmitry Rokosov , Peter Robinson , Jonathan Humphreys , Wei Ming Chen , Caleb Connolly , Masahisa Kojima , Javier Tia , Raymond Mao , u-boot@lists.denx.de Subject: [PATCH v3 6/6] doc: uefi: Describe UEFI HTTPs boot Date: Sun, 10 Nov 2024 10:28:42 +0200 Message-ID: <20241110083017.367565-7-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241110083017.367565-1-ilias.apalodimas@linaro.org> References: <20241110083017.367565-1-ilias.apalodimas@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 We now can use a combination og lwIP & mbedTLS and download from https://. Describe the config options needed to enable it as well as some limitations Reviewed-by: Simon Glass Reviewed-by: Jerome Forissier Signed-off-by: Ilias Apalodimas --- doc/develop/uefi/uefi.rst | 45 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index 0760ca91d4fc..48d6110b2ad1 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -681,8 +681,8 @@ 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 -~~~~~~~~~~~~~~ +UEFI HTTP Boot using the legacy TCP stack +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HTTP Boot provides the capability for system deployment and configuration over the network. HTTP Boot can be activated by specifying:: @@ -715,6 +715,47 @@ We need to preset the "httpserverip" environment variable to proceed the wget:: setenv httpserverip 192.168.1.1 +UEFI HTTP(s) Boot using lwIP +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Similar to the above U-Boot can do EFI HTTP boot using lwIP. If we combine this +with Mbed TLS we can also download from https:// + +HTTP(s) Boot can be activated by specifying:: + + CONFIG_EFI_HTTP_BOOT + CONFIG_NET_LWIP + CONFIG_WGET_HTTPS + +For QEMU targets there's a Kconfig that supports this by default:: + + make qemu_arm64_lwip_defconfig + +The commands and functionality are similar to the legacy stack, with the notable +exception of not having to define an "httpserverip" if you are trying to resolve +an IP. However, lwIP code doesn't yet support redirects:: + + => efidebug boot add -u 1 netinst https://cdimage.debian.org/cdimage/weekly-builds/arm64/iso-cd/debian-testing-arm64-netinst.iso + => dhcp + DHCP client bound to address 10.0.2.15 (3 ms) + => efidebug boot order 1 + => bootefi bootmgr + + HTTP server error 302 + Loading Boot0001 'netinst' failed + EFI boot manager: Cannot load any image + +If the url you specified isn't a redirect:: + + => efidebug boot add -u 1 netinst https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.4-aarch64-minimal.iso + => dhcp + => bootefi bootmgr + ####################################### + +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. + Executing the built in hello world application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~