From patchwork Wed Sep 11 09:58:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 827381 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp710820wrc; Wed, 11 Sep 2024 03:00:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWzvEDh0iXNP2lAM/oPRsS0XFNPRdQH8MNJ+lizqRygMzttvYLodxTRjtWhmI68p8NO9vuqmQ==@linaro.org X-Google-Smtp-Source: AGHT+IG1oEB1r9KeTbFQhxIVTCcp5zivbI6uhJY5FTkwrCPHyl8hhuSkU2R4+jMabffi9G4M4PPj X-Received: by 2002:a05:600c:a48:b0:42a:a6b8:f09f with SMTP id 5b1f17b1804b1-42c9f9e0f8bmr149886715e9.23.1726048839222; Wed, 11 Sep 2024 03:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726048839; cv=none; d=google.com; s=arc-20240605; b=G5LMWbPCNSav9T7dJ/AJ4OUxQZM6HCpY6g1kXK2KMIfIOymKiLGsFWIfG/lX1McBnk s9i5NN7dxzQWTGtPsGgV3qSi9rO7ztyxxEy5R95vgW5iMBuzMCbbcc+qLbyQiAHgNrcM FiYBy8Yodf3as3Ary3WeqVLbuQ953taeWBZf1YnrOkpInTu9kSg5ZsL1sJAr7hDaHz5n P8jqmXgEmLngdz3zSvMFBqJ+SrzOhp29iYawyuUf2g+wZgiOjiREgd1oY1ve3gx/kFlC GNAam9HFqNMj4JsCW0N+2UGCKnHv0Vpun9C/oCPyKvAbghXGe/NO0j1XN76/GM2W10CV ChDw== 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=W4/4WGx73cmlmZfMgS5sVRgZbEW91Vkq9ibkAqHcF6o=; fh=WbyWg/NNrFqUX1z6z9yESaVA92BBgr9iRy0PdDSoDVA=; b=cdkPraiDgqEgZNEd6M7tEeP/9ksK513Z3zkykcHzsunUMpomb2LAkUSM9cMtLacJFk 0Xg5ujdWozmd/TxBD4xQ/VoxPbJZigtk4IZDosUq9piRQmAWh6d11PsHcHMnvaJMNJSB Ir5D+O4pcsbKnCzuQReu9qbm+60odLXFA1IgmmPOfmrZjWjpdeDvNrqY7l7NAzkE1/58 gGv03ZoeHquRt7jWAhoQxPWuqRXqPvgKu7mYikRUseWEZDk18b7pQayIPYDzCcNsWEWX q0vOT4zuzYcfLVvytHsxFcaRed/s56+DgeEmyVMcYCu2q4J1CiewdkiSZJUlST7CKb99 d1Zg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Usk4aQxL; 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 ffacd0b85a97d-378956d8ff4si4038478f8f.1027.2024.09.11.03.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 03:00:39 -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=Usk4aQxL; 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 7290C8923F; Wed, 11 Sep 2024 11:59:04 +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="Usk4aQxL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4861389245; Wed, 11 Sep 2024 11:59:03 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 20DD28924F for ; Wed, 11 Sep 2024 11:58:57 +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=jerome.forissier@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42cbface8d6so22598965e9.3 for ; Wed, 11 Sep 2024 02:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726048736; x=1726653536; 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=W4/4WGx73cmlmZfMgS5sVRgZbEW91Vkq9ibkAqHcF6o=; b=Usk4aQxLJTOj3oVGuc2lf5HWNWimhMd3sg6FySjV2Vq3G4jXOL4H1ViQxZZrT6QHI1 ygeWRUiay6f/oU2OybEBs8uCrYjObElyM388HNHcsTKP+jsJuUSLqxf28xh3D0mX+1qb e22tjLi49LL7O0a5e6JiADHhkxqbueV07HQOMLNy2F7fMhE9Hpf/Xovv4oaO9OWFOuko cqY9Pbl1qMis04gtev/vDjuH6ujUGn+DVP+qplkA50HPmiWqdz9QefZxAgiLN423eIFy g2fGgRWTbfDYcR0REgRTSDJdR/P/ncjgUISDn8z/4mDbUIutf68WsIoHvp9NE8YTP5rb 200g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726048736; x=1726653536; 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=W4/4WGx73cmlmZfMgS5sVRgZbEW91Vkq9ibkAqHcF6o=; b=KvFYIWc9fL4s37yBoJzawfj+SuPpQ06wwARr9dEPUwuwj8PTFbQaqFVhKy1Pa0/3Xr Kgq4uEaiyka9DtbJTH4WQdNVYDaFQ5vkNtwpzwUtho7rUgfBbkWelvWRTgWYOvXG1ZyB s8QUGltwj4a7BEN9E2v2R1Ql+KezMC6h1ioXXe2nSpnxDESUfzYZ9zGObXRi9NgCEEn2 +0wYh7SHuzMTWLm4TpEE+iaUz31nguny2BVrXn9wR1KWfCxAYaGL48Hgyjv8zXtYcqvL ky5h27RpfBdPGelZcTSI/s53F2oJJ76ch8zpzuYn6ecrjcjlfD+rB6pnnlig7J+qlx0a ZsgQ== X-Gm-Message-State: AOJu0YweiEgalbNVwzrVsjUQs7N+SldfIwp29YnWIiSmmVldsUSdF8OE rBdSo6z9KmQApOQk90bztCYZ8rpXPZ0/2TGpPMsmPFv7QC67SpVJg91wiOzEGjKp92iXSawK5rk tDRgX/nQc X-Received: by 2002:a05:600c:3c88:b0:426:59fe:ac27 with SMTP id 5b1f17b1804b1-42c9f9e087amr169796675e9.26.1726048736335; Wed, 11 Sep 2024 02:58:56 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:7d92:535d:cd3d:335b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649bafsm11300507f8f.7.2024.09.11.02.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 02:58:56 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Peter Robinson , Jerome Forissier , Simon Glass , Joe Hershberger , Ramon Fried , Tom Rini , Sughosh Ganu , Masahisa Kojima , Yasuharu Shibata , Marek Vasut Subject: [PATCH v4 09/15] net: wget: allow EFI boot Date: Wed, 11 Sep 2024 11:58:22 +0200 Message-Id: <365cd25d2326037ec8000d865b4389e8a373b632.1726048404.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 wget followed by bootefi currently fails as follows: U-Boot> wget 200000 192.168.0.30:helloworld.efi Waiting for Ethernet connection... done. HTTP/1.0 200 OK Packets received 13, Transfer Successful Bytes transferred = 12720 (31b0 hex) U-Boot> bootefi 200000 No UEFI binary known at 200000 U-Boot> Fix the problem by adding the missing efi_set_bootdev() call. Signed-off-by: Jerome Forissier Reviewed-by: Peter Robinson Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- net/wget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/wget.c b/net/wget.c index 6ebf9bca0d8..c8cce554c5e 100644 --- a/net/wget.c +++ b/net/wget.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -425,6 +426,9 @@ static void wget_handler(uchar *pkt, u16 dport, case WGET_TRANSFERRED: printf("Packets received %d, Transfer Successful\n", packets); net_set_state(wget_loop_state); + efi_set_bootdev("Net", "", image_url, + map_sysmem(image_load_addr, 0), + net_boot_file_size); break; } }