From patchwork Mon Nov 11 21:09:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adriano Cordova X-Patchwork-Id: 2010021 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=MGe8sqSC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XnW7S6q4fz1xwV for ; Tue, 12 Nov 2024 13:48:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4455893CD; Tue, 12 Nov 2024 03:47:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="MGe8sqSC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 085D189399; Mon, 11 Nov 2024 22:10:09 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 818DE89395 for ; Mon, 11 Nov 2024 22:10:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=adrianox@gmail.com Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-20e6981ca77so56381395ad.2 for ; Mon, 11 Nov 2024 13:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731359405; x=1731964205; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/9jmYZ+TvokwtXaM1I0CP60QTo21jf1Ualc1cSvqQms=; b=MGe8sqSCFQ78QHbNgIqC/xUBQd/ZFsSUHbuDocJo53FVh6k+ns81bu8E1tZxvVtZE2 ybdWG4W0sqCAVQE2jnTEfnIikMo4KOQbsGMjaOGU8Uxh38tQgnREYheQlybOHHfNCzNP 77AeglRUZRQvVQ44OzdTj9BFxGENWIKEVIX33kzd7j+ttnzju3NKbcH80KQ+0by2xjlK gBMS+AOIsEtpwiftidoAEJuC/sR+EC2IyyeLr7RYnOyLIHIJSsJvMAaf+nIpCUOegPUZ QwdAXWBnUqfi8cb+yVszoMCGeBxPXaGW9zIDKczmkRiOkIcYKcfynZd5iY+DcLz1SznY wyqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731359405; x=1731964205; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/9jmYZ+TvokwtXaM1I0CP60QTo21jf1Ualc1cSvqQms=; b=mIbKRQd/UR8H2Xf9vlYqdhj7E8PiV3yE4Ma3bwe3fnjtYtZwprMjyGVpR7NUbguBfr bAGo2DwPkiJ43cw1V4FXoK/CwFKGp5Dcp4C4USjjBvN7NQ5orYsYWBXyW0GLWv9hhR7R 6tKnTCLse+XTmTX6AYOaRD64fFh3wmavZ1dGw+O4gwM2r+5mJAYAfBVHAgpCpxdC2auI fL/yYInE7SEfHysUc19PMTPtlFgsj2+c3NzA9i5FsfKU2k0iUlgYXeSBtFO1nQfJCGyl wwpPnRDQ5RhJI/eym6/Kot66phYVu9HiUcPqFuMU/F788m9nhSclvVdsL4YbZNBGAbXr trzA== X-Gm-Message-State: AOJu0YzeV7bIYgq/70f4H90AvojWzsIQBAIqlUId1i33wuEbGnbQg+Xm EpYyU3rkTHvc4r226LXR2EsHtSuSMtOlYtzPMFIVtxG9ifPvjEGTZoq06/tJ X-Google-Smtp-Source: AGHT+IERoi1r/+5DFnAsK4zChmr4bZHzUfvvPumCGZx7u2gUOrjHS+M7X2RIq6RLqNAz0Fy8nC2+Tw== X-Received: by 2002:a17:903:94d:b0:20c:90a0:f064 with SMTP id d9443c01a7336-211834f3a6bmr198699875ad.10.1731359405043; Mon, 11 Nov 2024 13:10:05 -0800 (PST) Received: from adriano.. ([191.119.55.5]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177dc9e25sm80031165ad.27.2024.11.11.13.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Nov 2024 13:10:04 -0800 (PST) From: Adriano Cordova To: u-boot@lists.denx.de Cc: joe.hershberger@ni.com, rfried.dev@gmail.com, jerome.forissier@linaro.org, xypron.glpk@gmx.de, ilias.apalodimas@linaro.org, Adriano Cordova Subject: [PATCH v3 00/15] efi_loader: efi http and ipconfig drivers Date: Mon, 11 Nov 2024 18:09:44 -0300 Message-ID: <20241111210959.560738-1-adrianox@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 12 Nov 2024 03:47:02 +0100 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 Add support for EFI_HTTP_PROTOCOL, EFI_HTTP_SERVICE_BINDING_PROTOCOL, and EFI_IP4_CONFIG2_PROTOCOL. This series depends on the series 'wget: Expose wget to applications', also found at: https://github.com/0n41rd4/u-boot/commits/http-driver-wget The fist two patches of this series are not efi specific and have also been sent to the corresponding maintainers, but this series depends on them, so they are added here for redundancy. A branch with both series of patches, concatenated, is at: https://github.com/0n41rd4/u-boot/commits/efi-http-driver Adriano Cordova (13): net: net_utils: Move ip_to_string to lib/net_utils.c net: wget: let wget_with_dns work with dns disabled efi_loader: device_path: add definition of DEVICE_PATH_SUB_TYPE_MSG_IPV4 efi_loader: device_path: add efi_dp_from_ipv4 efi_api: add definitions for HTTP and IP4_CONFIG2 protocols efi_loader: efi_net: add efi_net_set_addr, efi_net_get_addr efi_loader: device_path: add support for HTTP device path efi_loader: net: set EFI bootdevice device path to HTTP when loaded from wget efi_loader: net: add support to send http requests and parse http headers efi_loader: efi_net: add EFI_IP4_CONFIG2_PROTOCOL efi_loader: efi_net: add EFI_HTTP_PROTOCOL efi_selftest: add test for HTTP protocol efi_selftest: add test for IPv4 Config2 protocol Heinrich Schuchardt (2): efi_loader: add IPv4() to device path to text protocol lib: uuid: display HTTP and IPV4 Config II protocols include/efi_api.h | 220 +++++++++ include/efi_loader.h | 42 ++ include/net-common.h | 10 + lib/efi_loader/Kconfig | 17 + lib/efi_loader/Makefile | 2 + lib/efi_loader/efi_device_path.c | 95 +++- lib/efi_loader/efi_device_path_to_text.c | 23 + lib/efi_loader/efi_http.c | 563 +++++++++++++++++++++++ lib/efi_loader/efi_ipconfig.c | 216 +++++++++ lib/efi_loader/efi_net.c | 316 ++++++++++++- lib/efi_selftest/Makefile | 2 + lib/efi_selftest/efi_selftest_http.c | 315 +++++++++++++ lib/efi_selftest/efi_selftest_ipconfig.c | 173 +++++++ lib/net_utils.c | 11 + lib/uuid.c | 14 + net/lwip/wget.c | 1 + net/net.c | 11 - net/wget.c | 39 +- 18 files changed, 2038 insertions(+), 32 deletions(-) create mode 100644 lib/efi_loader/efi_http.c create mode 100644 lib/efi_loader/efi_ipconfig.c create mode 100644 lib/efi_selftest/efi_selftest_http.c create mode 100644 lib/efi_selftest/efi_selftest_ipconfig.c