From patchwork Fri Sep 6 12:33:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825984 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp809099wrb; Fri, 6 Sep 2024 06:41:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXytn0QdJDfGBLn7HVNQ8zy6NXexkZfHRKW+DKgFOL0lV2nGX1BeT3wLH7NrKse2fQEr3pyfw==@linaro.org X-Google-Smtp-Source: AGHT+IEgHlkX7sKTUpa0z+r3cr1uIzGxmsucTPBtYNyrFMHkAojQr3VspPkutStUgBd8Ok0ySifY X-Received: by 2002:a05:6512:2806:b0:52c:deba:7e6e with SMTP id 2adb3069b0e04-536587b5452mr2171389e87.29.1725630086210; Fri, 06 Sep 2024 06:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725630086; cv=none; d=google.com; s=arc-20240605; b=BINFSNmGE/tAi2PJEE37Q3xu1DM7mpLOKq+g9EjVlw2H5K/uCjlIrZI/+IbWQqCInM MtKnkZPIQ2GLKobr1k1gMW77kgiEM3PjSmoBE+IdIWctNcSSxD/43lK4gVAlm/4nGb6v CYRm/9I6+W+Jyg63NPNjBw+8dIH3rI7esZczlIH0Ve6upuNAOmAAJlnQ3a6rm3G6nLu2 mHfCp6sHS2apkbZWVFgh1QBEVZyU/BoybGI7zodvzMR2goI5jLWc6Ia7Rx8wMDqWeioi N1jIu7BEcG1c6GXL0lXTNlTL8pAuXO9QlRpzQFZNxBR71T4XECC/6Iy8zCwjAejH2gPX ZE3w== 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=CyeBZ0DLA6zQ+juCrEW2Qv3rK8oiqdwIVFJS7M/NbyU=; fh=X4Yeh27/setHoxbEs7FcgMU9A/Nd1eyu90FjVT6MyHg=; b=fnAXxfFbM933pUz7rdcgN770mdMpmQjJ0U4rLFrWYq9RbwWNc0ELjuflSf4pX0O6P4 nKMxJOlQVdqieZBEVPUGzb+tNPH7whKuQfn3aMDiHTIPMSeg1y/2ij7SORTS07+Wh7M2 2+oPPqxmjTNyrzNlB3KIXXKpw8xqTEovDp3xpKHfL4rZ2sB4eN4zpOenJ9Och9gbdPxg NqFH4JW4/GzixcDmiknXnUdxIPG8NY06+zk/3VAsHRC+3QB5hCsIoMPTrLgGZoEQ+W38 EEWnGqhra6uLL4GhNqDuU7ZuaMHBrk9o5Uoq58NWJpkc8p1eQUZV1ozwcl58F3vxGuH+ Tfhw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CShv1kxe; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a8dead581si94881766b.471.2024.09.06.06.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:41:26 -0700 (PDT) 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=CShv1kxe; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 143CF88CEF; Fri, 6 Sep 2024 15:41:14 +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="CShv1kxe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7291788C9F; Fri, 6 Sep 2024 14:34:32 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 8005288CD8 for ; Fri, 6 Sep 2024 14:34:26 +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-x32d.google.com with SMTP id 5b1f17b1804b1-42bb8cf8abeso15231345e9.2 for ; Fri, 06 Sep 2024 05:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626066; x=1726230866; 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=CyeBZ0DLA6zQ+juCrEW2Qv3rK8oiqdwIVFJS7M/NbyU=; b=CShv1kxej+0FwiGNV/jf49n4p+7oBVvxAiXAjTYpc0yuivD+2x7nMf//zaiYldtgoh MsRaOHJfhoCNrrS7L4seSW6/Yu6N0w/ue6iee68iGvItv0b/qCP37mOH8cPe9WH1iVvS F5qUtsbe9HPvHU860om/xlCETi8hVivVW2MBBOmXS5klN75VThkuek9vb53ml+Z52IQt efv4fRgAyQ8TdZCLhuHYKK1ytjFfi6q4W8CjnwCkjl/cSPaz+/ij8esLMRVtELQSpdNi jCHTxBwIYIZxOjfoc1i1O9fos6mhxL2hwC8BSMv5f8Zo9p3ZmvwR2rjDzaFO4dOjWIf0 nFEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626066; x=1726230866; 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=CyeBZ0DLA6zQ+juCrEW2Qv3rK8oiqdwIVFJS7M/NbyU=; b=rKoLB88gAqnz5qoJFM9catlr+8RLa5EkR8bQU4uuaOJf0uzys8O/lF5Sgca5RU8Lcs M/MzYv5eUNo3Pzwsqs7mbWHuSpOE6s2F4TGVvPY9OPkcj9LxqoEh/eyJL6VPl0mDsRYw KCM6Znd4QUp1Q9nVzyCfxh27XkK9HwxklmsTL+b/ba8tl29y6juDPOAvnssVbpVwtneI evDzUwYQglCAUZqqLmb8ZxoKsQ53ue3+J+YNVKtthFe3hZrBn5KyAhqDJclnubzvLFEh FjjXnOlz8pU4eeNqZehyJLaRJqojIzOvIdvRd2XBMMY9wwWcDVjMy8lkEIrfkD5aThaS kNmQ== X-Gm-Message-State: AOJu0YxKKJ5H3PTbhRT8mbgkiVErQa4pVUljNIeb2xoqFpy41WL/GFkV ArQcvx8mxzgYyTv2tlrC9ox0qEh7r71NTPPKVXft19L7h8awmG2KxFcj45/pC4YY3P64FO1Fs/s KED+VTmwL X-Received: by 2002:a05:600c:1c01:b0:427:9a8f:9717 with SMTP id 5b1f17b1804b1-42c9f8e665dmr18283165e9.0.1725626065246; Fri, 06 Sep 2024 05:34:25 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:24 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Eugen Hristev , Nicolas Ferre , Angelo Dureghello , Jakub Klama , Artur Rojek , TsiChung Liew , Stefan Roese , Heiko Schocher , Joe Hershberger , Ramon Fried , egnite GmbH , Heinrich Schuchardt , Simon Glass , Rasmus Villemoes , Andrew Davis , Sumit Garg , Bryan Brattlof , Jesse Taube , "Leon M. Busch-George" , Marek Vasut , Marcin Jabrzyk , Peng Fan , Jason Liu , Mattijs Korpershoek , AKASHI Takahiro , Jiaxun Yang , Jagan Teki , William Zhang , Yang Xiwen , Gabor Juhos , Boon Khai Ng , Philip Oberfichtner , Neil Armstrong , Jonas Karlman , Robert Marko , Ye Li , Nicolas Frattaroli , Sean Anderson , Sughosh Ganu , Masahisa Kojima , Yasuharu Shibata , Richard Weinberger , Love Kumar , Andrejs Cainikovs , Brandon Maier Subject: [PATCH v10 01/25] Miscellaneous fixes Date: Fri, 6 Sep 2024 14:33:17 +0200 Message-Id: <93ccc45cc6928e54878708d77607c5ad1e4a979f.1725625913.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2024 15:41:12 +0200 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 Squashed commit of patches posted separately [1][2][3]. cmd: pxe: CMD_PXE implies CMD_TFTPBOOT common: update: UPDATE_COMMON implies CMD_TFTPBOOT test/py: test_efi_loader: add HTTP (wget) test for the EFI loader test/py: test_efi_loader: add missing dependency on cmd_tftpboot test/py: net_boot: fix comment net: fec_mxc_init(): do not ignore return status of fec_open() net: wget: allow EFI boot net: ftgmac100: depend on NET net: phy: ncsi: depend on NET net: wget: removed unused function wget_success() net: fm: call dtsec_init_phy() only when it is defined arm: omap2: add missing #include at91: rename mem_init() to at91_mem_init() flash: prefix error codes with FL_ buildman/toolchain.py: do not set CROSS_COMPILE for sandbox Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word [1] net: guard call to tftp_start() with IS_ENABLED(CONFIG_CMD_TFTPBOOT) [2] configs/ethernut5.h: define CFG_SYS_I2C_RTC_ADDR unconditionally [3] [1] http://patchwork.ozlabs.org/project/uboot/list/?series=422079 [2] http://patchwork.ozlabs.org/project/uboot/patch/20240902132511.148683-1-jerome.forissier@linaro.org/ [3] http://patchwork.ozlabs.org/project/uboot/patch/20240902131246.127897-1-jerome.forissier@linaro.org/ Signed-off-by: Jerome Forissier --- Makefile | 2 +- arch/arm/mach-at91/include/mach/at91_common.h | 2 +- arch/arm/mach-at91/spl_at91.c | 2 +- arch/arm/mach-at91/spl_atmel.c | 2 +- arch/arm/mach-omap2/omap3/emac.c | 1 + .../atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 2 +- board/atmel/at91sam9n12ek/at91sam9n12ek.c | 2 +- board/atmel/at91sam9x5ek/at91sam9x5ek.c | 2 +- .../atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 2 +- .../sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 2 +- board/atmel/sama5d2_icp/sama5d2_icp.c | 2 +- .../atmel/sama5d2_xplained/sama5d2_xplained.c | 2 +- .../atmel/sama5d3_xplained/sama5d3_xplained.c | 2 +- board/atmel/sama5d3xek/sama5d3xek.c | 2 +- .../atmel/sama5d4_xplained/sama5d4_xplained.c | 2 +- board/atmel/sama5d4ek/sama5d4ek.c | 2 +- board/cobra5272/flash.c | 26 ++++---- .../conclusive/kstr-sama5d27/kstr-sama5d27.c | 2 +- board/freescale/m5253demo/flash.c | 6 +- board/gardena/smart-gateway-at91sam/spl.c | 2 +- board/siemens/corvus/board.c | 2 +- board/siemens/smartweb/smartweb.c | 2 +- board/siemens/taurus/taurus.c | 2 +- cmd/Kconfig | 1 + common/Kconfig | 1 + common/flash.c | 44 ++++++------- drivers/mtd/altera_qspi.c | 4 +- drivers/mtd/cfi_flash.c | 36 +++++------ drivers/net/Kconfig | 1 + drivers/net/fec_mxc.c | 3 +- drivers/net/fm/eth.c | 10 ++- drivers/net/phy/Kconfig | 1 + include/configs/ethernut5.h | 2 - include/flash.h | 20 +++--- net/net.c | 23 ++++--- net/wget.c | 11 ++-- test/py/tests/test_efi_loader.py | 62 ++++++++++++++----- test/py/tests/test_net_boot.py | 2 +- tools/buildman/test.py | 46 ++++++++++++++ tools/buildman/toolchain.py | 6 +- 40 files changed, 217 insertions(+), 129 deletions(-) diff --git a/Makefile b/Makefile index f23554da4c1..5113098d29c 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ include include/host_arch.h ifeq ("", "$(CROSS_COMPILE)") MK_ARCH="${shell uname -m}" else - MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}" + MK_ARCH="${shell echo ${lastword $(CROSS_COMPILE)} | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}" endif unexport HOST_ARCH ifeq ("x86_64", $(MK_ARCH)) diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h index 683e539b1b3..8fec346c1e4 100644 --- a/arch/arm/mach-at91/include/mach/at91_common.h +++ b/arch/arm/mach-at91/include/mach/at91_common.h @@ -28,7 +28,7 @@ void at91_pllb_init(u32 pllar); void at91_mck_init(u32 mckr); void at91_mck_init_down(u32 mckr); void at91_pmc_init(void); -void mem_init(void); +void at91_mem_init(void); void at91_phy_reset(void); void at91_sdram_hw_init(void); void at91_mck_init(u32 mckr); diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index cde1700a283..0d1233cd109 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -142,7 +142,7 @@ void board_init_f(ulong dummy) preloader_console_init(); #endif - mem_init(); + at91_mem_init(); at91_spl_board_init(); } diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c index 62a7df8a195..7bfbadf0483 100644 --- a/arch/arm/mach-at91/spl_atmel.c +++ b/arch/arm/mach-at91/spl_atmel.c @@ -134,7 +134,7 @@ void board_init_f(ulong dummy) board_early_init_f(); - mem_init(); + at91_mem_init(); ret = spl_init(); if (ret) { diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index 7348e92cabd..1e30a06361d 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -9,6 +9,7 @@ #include #include #include +#include /* * Initializes on-chip ethernet controllers. diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index 3bd94d0889d..af486e977e5 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -125,7 +125,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index afc0c0520e1..6f9abcbb127 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -167,7 +167,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index e5688c6cf13..f52b9a97731 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -181,7 +181,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index 36995a927cf..cb3cd7ac9ae 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index c775d593e58..15cbd0daa6f 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -208,7 +208,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) ddrc->cal_mr4 |= ATMEL_MPDDRC_CAL_MR4_MR4R(0xFFFE); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index 986da01639f..6f0d578abf7 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -180,7 +180,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c8a8eb49826..d104736fa7c 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) 7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index 54cc3c4d900..f98322fb540 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -175,7 +175,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index f2e1242fcb0..28079a81517 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -241,7 +241,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 09ca16ca88c..f9112fc5321 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -184,7 +184,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 1f8b85f0614..0bdc6adbdc8 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -169,7 +169,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 616842e62f4..d324aa6ac11 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -135,22 +135,22 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) { ulong result; int iflag, cflag, prot, sect; - int rc = ERR_OK; + int rc = FL_ERR_OK; int chip1; ulong start; /* first look for protection bits */ if (info->flash_id == FLASH_UNKNOWN) - return ERR_UNKNOWN_FLASH_TYPE; + return FL_ERR_UNKNOWN_FLASH_TYPE; if ((s_first < 0) || (s_first > s_last)) { - return ERR_INVAL; + return FL_ERR_INVAL; } if ((info->flash_id & FLASH_VENDMASK) != (AMD_MANUFACT & FLASH_VENDMASK)) { - return ERR_UNKNOWN_FLASH_VENDOR; + return FL_ERR_UNKNOWN_FLASH_VENDOR; } prot = 0; @@ -160,7 +160,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) } } if (prot) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; /* * Disable interrupts which might cause a timeout @@ -217,11 +217,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) MEM_FLASH_ADDR1 = CMD_READ_ARRAY; if (chip1 == ERR) { - rc = ERR_PROG_ERROR; + rc = FL_ERR_PROG_ERROR; goto outahere; } if (chip1 == TMO) { - rc = ERR_TIMEOUT; + rc = FL_ERR_TIMEOUT; goto outahere; } @@ -252,7 +252,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) { volatile u16 *addr = (volatile u16 *) dest; ulong result; - int rc = ERR_OK; + int rc = FL_ERR_OK; int cflag, iflag; int chip1; ulong start; @@ -262,7 +262,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) */ result = *addr; if ((result & data) != data) - return ERR_NOT_ERASED; + return FL_ERR_NOT_ERASED; /* * Disable interrupts which might cause a timeout @@ -302,7 +302,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) *addr = CMD_READ_ARRAY; if (chip1 == ERR || *addr != data) - rc = ERR_PROG_ERROR; + rc = FL_ERR_PROG_ERROR; if (iflag) enable_interrupts(); @@ -320,13 +320,13 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) if (addr & 1) { printf ("unaligned destination not supported\n"); - return ERR_ALIGN; + return FL_ERR_ALIGN; } #if 0 if (cnt & 1) { printf ("odd transfer sizes not supported\n"); - return ERR_ALIGN; + return FL_ERR_ALIGN; } #endif @@ -364,5 +364,5 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) cnt -= 1; } - return ERR_OK; + return FL_ERR_OK; } diff --git a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c index 64282ae9dc7..37750137ad9 100644 --- a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c +++ b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c @@ -182,7 +182,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 334518a4bc9..ab5d2ebff64 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -72,7 +72,7 @@ int flash_get_offsets(ulong base, flash_info_t * info) } } - return ERR_OK; + return FL_ERR_OK; } void flash_print_info(flash_info_t * info) @@ -369,9 +369,9 @@ int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt) } if (cnt == 0) - return ERR_OK; + return FL_ERR_OK; - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- diff --git a/board/gardena/smart-gateway-at91sam/spl.c b/board/gardena/smart-gateway-at91sam/spl.c index fb3ec48f9c5..db9ba881884 100644 --- a/board/gardena/smart-gateway-at91sam/spl.c +++ b/board/gardena/smart-gateway-at91sam/spl.c @@ -110,7 +110,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index 7d73d1f2b36..cd27fc1cc37 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -187,7 +187,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index 946fbc3f229..e9e4bc348cb 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -238,7 +238,7 @@ void at91_spl_board_init(void) | AT91_SDRAMC_TRP_VAL(2) | AT91_SDRAMC_TRCD_VAL(2) \ | AT91_SDRAMC_TRAS_VAL(5) | AT91_SDRAMC_TXSR_VAL(8)) -void mem_init(void) +void at91_mem_init(void) { struct at91_matrix *ma = (struct at91_matrix *)ATMEL_BASE_MATRIX; struct at91_port *port = (struct at91_port *)ATMEL_BASE_PIOC; diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index bda12a97708..3764ab48ab3 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -177,7 +177,7 @@ void sdramc_configure(unsigned int mask) sdramc_initialize(ATMEL_BASE_CS1, &setting); } -void mem_init(void) +void at91_mem_init(void) { unsigned int ram_size = 0; diff --git a/cmd/Kconfig b/cmd/Kconfig index 43f78a5aeb1..83c82818bf4 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2099,6 +2099,7 @@ config CMD_ETHSW config CMD_PXE bool "pxe" select PXE_UTILS + imply CMD_TFTPBOOT help Boot image via network using PXE protocol diff --git a/common/Kconfig b/common/Kconfig index 83c81edac20..968d4fb66a8 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -934,6 +934,7 @@ menu "Update support" config UPDATE_COMMON bool select DFU_WRITE_ALT + imply CMD_TFTPBOOT config UPDATE_TFTP bool "Auto-update using fitImage via TFTP" diff --git a/common/flash.c b/common/flash.c index 24ddc8bee72..a64e51a9b5a 100644 --- a/common/flash.c +++ b/common/flash.c @@ -110,13 +110,13 @@ addr2info(ulong addr) * Make sure all target addresses are within Flash bounds, * and no protected sectors are hit. * Returns: - * ERR_OK 0 - OK - * ERR_TIMEOUT 1 - write timeout - * ERR_NOT_ERASED 2 - Flash not erased - * ERR_PROTECTED 4 - target range includes protected sectors - * ERR_INVAL 8 - target address not in Flash memory - * ERR_ALIGN 16 - target address not aligned on boundary - * (only some targets require alignment) + * FL_ERR_OK 0 - OK + * FL_ERR_TIMEOUT 1 - write timeout + * FL_ERR_NOT_ERASED 2 - Flash not erased + * FL_ERR_PROTECTED 4 - target range includes protected sectors + * FL_ERR_INVAL 8 - target address not in Flash memory + * FL_ERR_ALIGN 16 - target address not aligned on boundary + * (only some targets require alignment) */ int flash_write(char *src, ulong addr, ulong cnt) @@ -131,11 +131,11 @@ flash_write(char *src, ulong addr, ulong cnt) __maybe_unused ulong cnt_orig = cnt; if (cnt == 0) { - return (ERR_OK); + return (FL_ERR_OK); } if (!info_first || !info_last) { - return (ERR_INVAL); + return (FL_ERR_INVAL); } for (info = info_first; info <= info_last; ++info) { @@ -146,7 +146,7 @@ flash_write(char *src, ulong addr, ulong cnt) if ((end >= info->start[i]) && (addr < e_addr) && (info->protect[i] != 0) ) { - return (ERR_PROTECTED); + return (FL_ERR_PROTECTED); } } } @@ -169,11 +169,11 @@ flash_write(char *src, ulong addr, ulong cnt) #if defined(CONFIG_FLASH_VERIFY) if (memcmp(src_orig, addr_orig, cnt_orig)) { printf("\nVerify failed!\n"); - return ERR_PROG_ERROR; + return FL_ERR_PROG_ERROR; } #endif /* CONFIG_SYS_FLASH_VERIFY_AFTER_WRITE */ - return (ERR_OK); + return (FL_ERR_OK); } /*----------------------------------------------------------------------- @@ -182,33 +182,33 @@ flash_write(char *src, ulong addr, ulong cnt) void flash_perror(int err) { switch (err) { - case ERR_OK: + case FL_ERR_OK: break; - case ERR_TIMEOUT: + case FL_ERR_TIMEOUT: puts ("Timeout writing to Flash\n"); break; - case ERR_NOT_ERASED: + case FL_ERR_NOT_ERASED: puts ("Flash not Erased\n"); break; - case ERR_PROTECTED: + case FL_ERR_PROTECTED: puts ("Can't write to protected Flash sectors\n"); break; - case ERR_INVAL: + case FL_ERR_INVAL: puts ("Outside available Flash\n"); break; - case ERR_ALIGN: + case FL_ERR_ALIGN: puts ("Start and/or end address not on sector boundary\n"); break; - case ERR_UNKNOWN_FLASH_VENDOR: + case FL_ERR_UNKNOWN_FLASH_VENDOR: puts ("Unknown Vendor of Flash\n"); break; - case ERR_UNKNOWN_FLASH_TYPE: + case FL_ERR_UNKNOWN_FLASH_TYPE: puts ("Unknown Type of Flash\n"); break; - case ERR_PROG_ERROR: + case FL_ERR_PROG_ERROR: puts ("General Flash Programming Error\n"); break; - case ERR_ABORTED: + case FL_ERR_ABORTED: puts("Flash Programming Aborted\n"); break; default: diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index c26615821c8..e5c8df750b7 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -96,7 +96,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) ret = mtd_erase(mtd, &instr); flash_set_verbose(0); if (ret) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; puts(" done\n"); return 0; @@ -114,7 +114,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) ret = mtd_write(mtd, to, cnt, &retlen, src); if (ret) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; return 0; } diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index a7826e81c17..e50502824ac 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -593,11 +593,11 @@ static int flash_status_check(flash_info_t *info, flash_sect_t sector, flash_read_long(info, sector, 0)); flash_write_cmd(info, sector, 0, info->cmd_reset); udelay(1); - return ERR_TIMEOUT; + return FL_ERR_TIMEOUT; } udelay(1); /* also triggers watchdog */ } - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- @@ -616,9 +616,9 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector, case CFI_CMDSET_INTEL_PROG_REGIONS: case CFI_CMDSET_INTEL_EXTENDED: case CFI_CMDSET_INTEL_STANDARD: - if (retcode == ERR_OK && + if (retcode == FL_ERR_OK && !flash_isset(info, sector, 0, FLASH_STATUS_DONE)) { - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; printf("Flash %s error at address %lx\n", prompt, info->start[sector]); if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS | @@ -627,14 +627,14 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector, } else if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS)) { puts("Block Erase Error.\n"); - retcode = ERR_NOT_ERASED; + retcode = FL_ERR_NOT_ERASED; } else if (flash_isset(info, sector, 0, FLASH_STATUS_PSLBS)) { puts("Locking Error\n"); } if (flash_isset(info, sector, 0, FLASH_STATUS_DPS)) { puts("Block locked.\n"); - retcode = ERR_PROTECTED; + retcode = FL_ERR_PROTECTED; } if (flash_isset(info, sector, 0, FLASH_STATUS_VPENS)) puts("Vpp Low Error.\n"); @@ -702,12 +702,12 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst, if (get_timer(start) > tout) { printf("Flash %s timeout at address %lx data %lx\n", prompt, (ulong)dst, (ulong)flash_read8(dst)); - return ERR_TIMEOUT; + return FL_ERR_TIMEOUT; } udelay(1); /* also triggers watchdog */ } #endif /* CONFIG_SYS_CFI_FLASH_STATUS_POLL */ - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- @@ -810,7 +810,7 @@ static int flash_write_cfiword(flash_info_t *info, ulong dest, cfiword_t cword) break; } if (!flag) - return ERR_NOT_ERASED; + return FL_ERR_NOT_ERASED; /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); @@ -899,7 +899,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, shift = 3; break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } @@ -930,7 +930,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, } } if (!flag) { - retcode = ERR_NOT_ERASED; + retcode = FL_ERR_NOT_ERASED; goto out_unmap; } @@ -950,7 +950,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, retcode = flash_status_check(info, sector, info->buffer_write_tout, "write to buffer"); - if (retcode == ERR_OK) { + if (retcode == FL_ERR_OK) { /* reduce the number of loops by the width of * the port */ @@ -975,7 +975,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, src += 8, dst += 8; break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } } @@ -1025,7 +1025,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, } break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } @@ -1043,7 +1043,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, default: debug("Unknown Command Set\n"); - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; break; } @@ -1389,7 +1389,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) if (i > cnt) i = cnt; rc = flash_write_cfibuffer(info, wp, src, i); - if (rc != ERR_OK) + if (rc != FL_ERR_OK) return rc; i -= i & (info->portwidth - 1); wp += i; @@ -1398,7 +1398,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) FLASH_SHOW_PROGRESS(scale, dots, digit, i); /* Only check every once in a while */ if ((cnt & 0xFFFF) < buffered_size && ctrlc()) - return ERR_ABORTED; + return FL_ERR_ABORTED; } #else while (cnt >= info->portwidth) { @@ -1413,7 +1413,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth); /* Only check every once in a while */ if ((cnt & 0xFFFF) < info->portwidth && ctrlc()) - return ERR_ABORTED; + return FL_ERR_ABORTED; } #endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 6ed325517c0..e7d0ddfe25a 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -468,6 +468,7 @@ config FTMAC100 config FTGMAC100 bool "Ftgmac100 Ethernet Support" select PHYLIB + depends on NET help This driver supports the Faraday's FTGMAC100 Gigabit SoC Ethernet controller that can be found on Aspeed SoCs (which diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 0a0d92bc2cd..2dc1364beec 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -615,8 +615,7 @@ static int fecmxc_init(struct udevice *dev) if (fec->xcv_type != SEVENWIRE) miiphy_restart_aneg(dev); #endif - fec_open(dev); - return 0; + return fec_open(dev); } /** diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index 19f3f0fef07..22025b6a273 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -26,7 +26,8 @@ #include "fm.h" -#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII) +#if ((defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \ + !defined(CONFIG_BITBANGMII)) #define TBIANA_SETTINGS (TBIANA_ASYMMETRIC_PAUSE | TBIANA_SYMMETRIC_PAUSE | \ TBIANA_FULL_DUPLEX) @@ -701,8 +702,11 @@ static int init_phy(struct fm_eth *fm_eth) supported |= SUPPORTED_2500baseX_Full; #endif - if (fm_eth->type == FM_ETH_1G_E) - dtsec_init_phy(fm_eth); + if ((IS_ENABLED(CONFIG_MII) || IS_ENABLED(CONFIG_CMD_MII)) && + !IS_ENABLED(CONFIG_BITBANGMII)) { + if (fm_eth->type == FM_ETH_1G_E) + dtsec_init_phy(fm_eth); + } #ifdef CONFIG_PHYLIB #ifdef CONFIG_DM_MDIO diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 73064b2af68..a9efc509814 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -368,6 +368,7 @@ config PHY_FIXED config PHY_NCSI bool "NC-SI based PHY" + depends on NET endif #PHYLIB diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h index c327bbbe07d..338306dfe08 100644 --- a/include/configs/ethernut5.h +++ b/include/configs/ethernut5.h @@ -55,9 +55,7 @@ #endif /* RTC */ -#if defined(CONFIG_CMD_DATE) || defined(CONFIG_CMD_SNTP) #define CFG_SYS_I2C_RTC_ADDR 0x51 -#endif #define I2C_SOFT_DECLARATIONS diff --git a/include/flash.h b/include/flash.h index 60babe8a805..32bc65e7b60 100644 --- a/include/flash.h +++ b/include/flash.h @@ -127,16 +127,16 @@ void flash_perror(int err); /*----------------------------------------------------------------------- * return codes from flash_write(): */ -#define ERR_OK 0 -#define ERR_TIMEOUT 1 -#define ERR_NOT_ERASED 2 -#define ERR_PROTECTED 4 -#define ERR_INVAL 8 -#define ERR_ALIGN 16 -#define ERR_UNKNOWN_FLASH_VENDOR 32 -#define ERR_UNKNOWN_FLASH_TYPE 64 -#define ERR_PROG_ERROR 128 -#define ERR_ABORTED 256 +#define FL_ERR_OK 0 +#define FL_ERR_TIMEOUT 1 +#define FL_ERR_NOT_ERASED 2 +#define FL_ERR_PROTECTED 4 +#define FL_ERR_INVAL 8 +#define FL_ERR_ALIGN 16 +#define FL_ERR_UNKNOWN_FLASH_VENDOR 32 +#define FL_ERR_UNKNOWN_FLASH_TYPE 64 +#define FL_ERR_PROG_ERROR 128 +#define FL_ERR_ABORTED 256 /*----------------------------------------------------------------------- * Protection Flags for flash_protect(): diff --git a/net/net.c b/net/net.c index d9bc9df643f..1e0b7c85624 100644 --- a/net/net.c +++ b/net/net.c @@ -334,17 +334,22 @@ void net_auto_load(void) net_set_state(NETLOOP_SUCCESS); return; } - if (net_check_prereq(TFTPGET)) { -/* We aren't expecting to get a serverip, so just accept the assigned IP */ - if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) { - net_set_state(NETLOOP_SUCCESS); - } else { - printf("Cannot autoload with TFTPGET\n"); - net_set_state(NETLOOP_FAIL); + if (IS_ENABLED(CONFIG_CMD_TFTPBOOT)) { + if (net_check_prereq(TFTPGET)) { + /* + * We aren't expecting to get a serverip, so just + * accept the assigned IP + */ + if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) { + net_set_state(NETLOOP_SUCCESS); + } else { + printf("Cannot autoload with TFTPGET\n"); + net_set_state(NETLOOP_FAIL); + } + return; } - return; + tftp_start(TFTPGET); } - tftp_start(TFTPGET); } static int net_init_loop(void) diff --git a/net/wget.c b/net/wget.c index 4a168641c65..c8cce554c5e 100644 --- a/net/wget.c +++ b/net/wget.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -196,13 +197,6 @@ void wget_fail(char *error_message, unsigned int tcp_seq_num, wget_send(action, tcp_seq_num, tcp_ack_num, 0); } -void wget_success(u8 action, unsigned int tcp_seq_num, - unsigned int tcp_ack_num, int len, int packets) -{ - printf("Packets received %d, Transfer Successful\n", packets); - wget_send(action, tcp_seq_num, tcp_ack_num, len); -} - /* * Interfaces of U-BOOT */ @@ -432,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; } } diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 85473a9049b..5f3b448a066 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -45,11 +45,18 @@ env__efi_loader_helloworld_file = { 'crc32': 'c2244b26', # CRC32 check sum 'addr': 0x40400000, # load address } + +# False if the helloworld EFI over HTTP boot test should be performed. +# If HTTP boot testing is not possible or desired, set this variable to True or +# ommit it. +env__efi_helloworld_net_http_test_skip = True """ import pytest import u_boot_utils +PROTO_TFTP, PROTO_HTTP = range(0, 2) + net_set_up = False def test_efi_pre_commands(u_boot_console): @@ -110,10 +117,10 @@ def test_efi_setup_static(u_boot_console): global net_set_up net_set_up = True -def fetch_tftp_file(u_boot_console, env_conf): - """Grab an env described file via TFTP and return its address +def fetch_file(u_boot_console, env_conf, proto): + """Grab an env described file via TFTP or HTTP and return its address - A file as described by an env config is downloaded from the TFTP + A file as described by an env config is downloaded from the server. The address to that file is returned. """ if not net_set_up: @@ -128,7 +135,13 @@ def fetch_tftp_file(u_boot_console, env_conf): addr = u_boot_utils.find_ram_base(u_boot_console) fn = f['fn'] - output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn)) + if proto == PROTO_TFTP: + cmd = 'tftpboot' + elif proto == PROTO_HTTP: + cmd = 'wget' + else: + assert False + output = u_boot_console.run_command('%s %x %s' % (cmd, addr, fn)) expected_text = 'Bytes transferred = ' sz = f.get('size', None) if sz: @@ -147,16 +160,8 @@ def fetch_tftp_file(u_boot_console, env_conf): return addr -@pytest.mark.buildconfigspec('of_control') -@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') -def test_efi_helloworld_net(u_boot_console): - """Run the helloworld.efi binary via TFTP. - - The helloworld.efi file is downloaded from the TFTP server and is executed - using the fallback device tree at $fdtcontroladdr. - """ - - addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_helloworld_file') +def do_test_efi_helloworld_net(u_boot_console, proto): + addr = fetch_file(u_boot_console, 'env__efi_loader_helloworld_file', proto) output = u_boot_console.run_command('bootefi %x' % addr) expected_text = 'Hello, world' @@ -164,6 +169,32 @@ def test_efi_helloworld_net(u_boot_console): expected_text = '## Application failed' assert expected_text not in output +@pytest.mark.buildconfigspec('of_control') +@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('cmd_tftpboot') +def test_efi_helloworld_net_tftp(u_boot_console): + """Run the helloworld.efi binary via TFTP. + + The helloworld.efi file is downloaded from the TFTP server and is executed + using the fallback device tree at $fdtcontroladdr. + """ + + do_test_efi_helloworld_net(u_boot_console, PROTO_TFTP); + +@pytest.mark.buildconfigspec('of_control') +@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('cmd_wget') +def test_efi_helloworld_net_http(u_boot_console): + """Run the helloworld.efi binary via HTTP. + + The helloworld.efi file is downloaded from the HTTP server and is executed + using the fallback device tree at $fdtcontroladdr. + """ + if u_boot_console.config.env.get('env__efi_helloworld_net_http_test_skip', True): + pytest.skip('helloworld.efi HTTP test is not enabled!') + + do_test_efi_helloworld_net(u_boot_console, PROTO_HTTP); + @pytest.mark.buildconfigspec('cmd_bootefi_hello') def test_efi_helloworld_builtin(u_boot_console): """Run the builtin helloworld.efi binary. @@ -178,6 +209,7 @@ def test_efi_helloworld_builtin(u_boot_console): @pytest.mark.buildconfigspec('of_control') @pytest.mark.buildconfigspec('cmd_bootefi') +@pytest.mark.buildconfigspec('cmd_tftpboot') def test_efi_grub_net(u_boot_console): """Run the grub.efi binary via TFTP. @@ -185,7 +217,7 @@ def test_efi_grub_net(u_boot_console): executed. """ - addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_grub_file') + addr = fetch_file(u_boot_console, 'env__efi_loader_grub_file', PROTO_TFTP) u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False) diff --git a/test/py/tests/test_net_boot.py b/test/py/tests/test_net_boot.py index 63309fe82e1..d7d74356928 100644 --- a/test/py/tests/test_net_boot.py +++ b/test/py/tests/test_net_boot.py @@ -75,7 +75,7 @@ env__net_pxe_bootable_file = { 'check_pattern': 'ERROR', } -# False or omitted if a PXE boot test should be tested. +# False if a PXE boot test should be tested. # If PXE boot testing is not possible or desired, set this variable to True. # For example: If pxe configuration file is not proper to boot env__pxe_boot_test_skip = False diff --git a/tools/buildman/test.py b/tools/buildman/test.py index e9d2c7e41b0..d4f0dd8f0e5 100644 --- a/tools/buildman/test.py +++ b/tools/buildman/test.py @@ -36,6 +36,16 @@ main: /usr/sbin x86: i386 x86_64 ''' +settings_data_wrapper = ''' +# Buildman settings file + +[toolchain] +main: /usr/sbin + +[toolchain-wrapper] +wrapper = ccache +''' + migration = '''===================== WARNING ====================== This board does not use CONFIG_DM. CONFIG_DM will be compulsory starting with the v2020.01 release. @@ -605,6 +615,9 @@ class TestBuild(unittest.TestCase): tc.GetEnvArgs(toolchain.VAR_ARCH)) self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_MAKE_ARGS)) + tc = self.toolchains.Select('sandbox') + self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) + self.toolchains.Add('/path/to/x86_64-linux-gcc', test=False) tc = self.toolchains.Select('x86') self.assertEqual('/path/to', @@ -613,6 +626,39 @@ class TestBuild(unittest.TestCase): self.assertEqual('HOSTCC=clang CC=clang', tc.GetEnvArgs(toolchain.VAR_MAKE_ARGS)) + # Test config with ccache wrapper + bsettings.setup(None) + bsettings.add_file(settings_data_wrapper) + + tc = self.toolchains.Select('arm') + self.assertEqual('ccache arm-linux-', + tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) + + tc = self.toolchains.Select('sandbox') + self.assertEqual('', tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE)) + + def testMakeEnvironment(self): + """Test the MakeEnvironment function""" + tc = self.toolchains.Select('arm') + env = tc.MakeEnvironment(False) + self.assertEqual(env[b'CROSS_COMPILE'], b'arm-linux-') + + tc = self.toolchains.Select('sandbox') + env = tc.MakeEnvironment(False) + self.assertTrue(b'CROSS_COMPILE' not in env) + + # Test config with ccache wrapper + bsettings.setup(None) + bsettings.add_file(settings_data_wrapper) + + tc = self.toolchains.Select('arm') + env = tc.MakeEnvironment(False) + self.assertEqual(env[b'CROSS_COMPILE'], b'ccache arm-linux-') + + tc = self.toolchains.Select('sandbox') + env = tc.MakeEnvironment(False) + self.assertTrue(b'CROSS_COMPILE' not in env) + def testPrepareOutputSpace(self): def _Touch(fname): tools.write_file(os.path.join(base_dir, fname), b'') diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 324ad0e0821..cbd8ce03d30 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -159,6 +159,8 @@ class Toolchain: if which == VAR_CROSS_COMPILE: wrapper = self.GetWrapper() base = '' if self.arch == 'sandbox' else self.path + if (base == '' and self.cross == ''): + return '' return wrapper + os.path.join(base, self.cross) elif which == VAR_PATH: return self.path @@ -201,10 +203,10 @@ class Toolchain: if self.override_toolchain: # We'll use MakeArgs() to provide this pass - elif full_path: + elif full_path and self.cross: env[b'CROSS_COMPILE'] = tools.to_bytes( wrapper + os.path.join(self.path, self.cross)) - else: + elif self.cross: env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross) env[b'PATH'] = tools.to_bytes(self.path) + b':' + env[b'PATH'] From patchwork Fri Sep 6 12:33:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825983 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp809011wrb; Fri, 6 Sep 2024 06:41:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcCKv5u0hQfztB5K0aJ4HhDNoxZQCcCYT/56T/Ks/5GP7RQ5K95R59d8pPitsT5o9AVgV4Hw==@linaro.org X-Google-Smtp-Source: AGHT+IF9+EH2ux9hVbXXilY3g6OraqCp07b/fMqiQiCQTdXm3evLMKLXvs51Yb0GblZ5iJD5j6mk X-Received: by 2002:a05:6402:520e:b0:5c0:9fdd:bfff with SMTP id 4fb4d7f45d1cf-5c3dc7be9f5mr1686444a12.28.1725630076442; Fri, 06 Sep 2024 06:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725630076; cv=none; d=google.com; s=arc-20240605; b=L3EY/g9fOpM4YsKTxGriIp3SNbANmJzT/E8mFhqCOwhLOP0w18vVvZwN6j5544fMMz tMhTsuIsZpPcaEaIL71/zhQGlhrtCeySvEPzHTbYaK80ePkbtPzhtHbO67YxcOAxmuto MlRiwRxbSPreHOl3JifqqZ98hG8TE7cKi4WZR7KDEHTc61L/mla95SMjTTwiGFm2DV6O f3DN4ypa03NlXzK2jBsfGQYHpxiCy6vfaKrd9Aj23gRgOVCKveeR2EyhuIWLe/qLaZNC GncmSJtNayAQLWbYrHxcGWhSuQxeSV1LWfBg3PYpvlbwpvtId53J9xdyvmEbOxkqozSU sSZQ== 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=ggP8Mc6HkK9iznSwoLYbgCNE3dFIwKWAG6MuWzwL/aI=; fh=nXwICZ6Flh1IHMV6i/v79wa0+xHYBLW4I5kOTQuMPbs=; b=gQSyPISTobaW/zdxLGMWe3Fq1C2/RQpOjaeCjZWgP69T0USrgCIjq3yZshtR9e1bFn QVdd6I4QLFSTTZKfo+hfUaR91TzVyatC9TNSNtnMrQpjbuHLIPJzNysnzE2IbYmMpVQh U+53S7JmDAhAoqEUfLvTneDoYBTbbISTxL8rdeyNRJUAA9i58DvPgY8THR+h30QLija9 KilflYkKyr03ZR9oXWQ6VKIGzp6gHgg03q2OiWctnbpLRyem1jdnyEGN1u1ls1K1orBw rRH1t6AMvwvIujm4MfuorrnSBC43efkZWVsCy3aYfndvDuzoFH/2EgbFMm7ZpBIPoPaX XBww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oF/HJimE"; 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 4fb4d7f45d1cf-5c3cc52b428si3153000a12.49.2024.09.06.06.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:41:16 -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="oF/HJimE"; 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 AE19988CB6; Fri, 6 Sep 2024 15:41:13 +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="oF/HJimE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 57D08888C1; Fri, 6 Sep 2024 14:34:32 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 422DF88CEB for ; Fri, 6 Sep 2024 14:34:29 +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-x336.google.com with SMTP id 5b1f17b1804b1-42bbe908380so15826085e9.2 for ; Fri, 06 Sep 2024 05:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626068; x=1726230868; 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=ggP8Mc6HkK9iznSwoLYbgCNE3dFIwKWAG6MuWzwL/aI=; b=oF/HJimET3o0MUhPakOaWdrgkn7XiSCSLv5b5cdoNtp+6EBrzDJBAKNv7lbxL1oA8M QMDKyfmJS2DY3eWD1t9HGZBgNASuAvXzV5ngvroqnM3YF509OyObrj+eAUd8JRrBQ6zt B39ZHj8rjhntNpm99JQrFWgJHULjV+Ub7c4faAKwQSiSEczOhGAjCGdZNbaoe6l640ko a9P+9C5iQAxM19T0G08hv4HpH7TPpTL78oQRrtRGxd7zyqgvdErDN2nyynuqYWQqHASK thNCAS+KMt0ox/nwhepThGfMl14WXTLJkGE/R8Eom4ZHET6HihHcT5TZ2ED0IpwJo7hm YRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626068; x=1726230868; 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=ggP8Mc6HkK9iznSwoLYbgCNE3dFIwKWAG6MuWzwL/aI=; b=em9RiIGi7FnsPa9KuVKsTacyFMSMLs3xWOt51PKpesTlwW32ImqAJwU6CPXc8mDnFd bFxW0JWDG+OUK27xQVNoOMy8xbUXzBkk0pwDJifQIkjE9nqL6DpHQIUJBmPFiGdVmUi3 tVKU6eHKKXMwpjK3pYUSiJvf67VPUydEgSYH6oKzEUH9JlPS8CLAX+Y4xtg/Le6d/Z5W P3oTirVrriP7DpV+2836HopkpzSbf41zMW867hzK5qevOujS0IDh2ClnawbInP+gdO0F spyFHvFoUUulOH0T9D19qWN11KYbwTF7MKgCfRf7IlU6u77cVtu36g9JN/gzo0waDQ0z pjOA== X-Gm-Message-State: AOJu0YyC5b2sq/c+VvP/gX0vnoRxyJQQRZWGDTI3PsZsDqEp35sbtUKb hCQl+80dNhKxsEF52VELwISY8UxY+iWS1XaZciAPm2dDAZ1emJGlw/HpGXoilCdwv78dTOryesu MkTBirwGU X-Received: by 2002:a05:600c:3b25:b0:429:a0d:b710 with SMTP id 5b1f17b1804b1-42c9f984b00mr15745415e9.12.1725626068369; Fri, 06 Sep 2024 05:34:28 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:28 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Lukasz Majewski , Mattijs Korpershoek , Joe Hershberger , Ramon Fried , Marek Vasut , Simon Glass , Paul Kocialkowski , Martyn Welch , Sean Anderson , Hiago De Franco , Jesse Taube , Greg Malysa , Heinrich Schuchardt , Andrew Davis , Sumit Garg , Rasmus Villemoes , Bryan Brattlof , "Leon M. Busch-George" , Eddie James , AKASHI Takahiro , Stefan Roese , Jiaxun Yang , Devarsh Thakkar , Andre Przywara , Samuel Holland , Lukas Funke , Jaehoon Chung , Ion Agorria , Alexey Romanov , Yang Xiwen , Boon Khai Ng , Jonas Karlman , Neil Armstrong , Robert Marko , Nicolas Frattaroli , Miquel Raynal , Anand Moon , Baruch Siach Subject: [PATCH v10 02/25] net: introduce alternative implementation as net-lwip/ Date: Fri, 6 Sep 2024 14:33:18 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2024 15:41:12 +0200 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 Prepare the introduction of the lwIP (lightweight IP) TCP/IP stack by adding a new net/lwip/ directory and the NET_LWIP symbol. Network support is either NO_NET, NET (legacy stack) or NET_LWIP. Subsequent commits will introduce the lwIP code, re-work the NETDEVICE integration and port some of the NET commands and features to lwIP. SPL_NET cannot be enabled when NET_LWIP=y. SPL_NET pulls some symbols that are part of NET (such as arp_init(), arp_timeout_check(), arp_receive(), net_arp_wait_packet_ip()). lwIP support in SPL may be added later. Similarly, DFU_TFTP and FASTBOOT are not compatible with NET_LWIP because of dependencies on net_loop(), tftp_timeout_ms, tftp_timeout_count_max and other NET things. Let's add a dependency on !NET_LWIP for now. As for SANDBOX, NET_LWIP cannot be used either because of strong assumptions on the network stack. Make NET_LWIP depend on !SANDBOX so that the NET_LWIP alternative is not visible in make menuconfig when sandbox_defconfig is used. Other adjustments to Kconfig files are made to fix "unmet direct dependencies detected" for USB_FUNCTION_SDP and CMD_FASTBOOT when the default networking stack is set to NET_LWIP ("default NET_LWIP" instead of "default NET" in Kconfig). Signed-off-by: Jerome Forissier --- Kconfig | 30 +++++++++++++++++++ Makefile | 2 +- boot/Kconfig | 1 + cmd/Kconfig | 1 + common/Kconfig | 2 +- common/spl/Kconfig | 1 + drivers/dfu/Kconfig | 1 + drivers/fastboot/Kconfig | 1 + drivers/net/Kconfig | 1 + drivers/net/phy/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- net/Kconfig | 61 +++++++++++++++++++------------------- net/Makefile | 4 +++ net/lwip/Kconfig | 38 ++++++++++++++++++++++++ 14 files changed, 113 insertions(+), 34 deletions(-) create mode 100644 net/lwip/Kconfig diff --git a/Kconfig b/Kconfig index ab46b27999c..35e34e16789 100644 --- a/Kconfig +++ b/Kconfig @@ -752,8 +752,38 @@ source "dts/Kconfig" source "env/Kconfig" +menu Networking + +choice + prompt "Networking stack" + default NET + +config NO_NET + bool "No networking support" + +config NET + bool "Legacy U-Boot networking stack" + imply NETDEVICES + +config NET_LWIP + bool "Use lwIP for networking stack" + imply NETDEVICES + depends on !SANDBOX + help + Include networking support based on the lwIP (lightweight IP) + TCP/IP stack (https://nongnu.org/lwip). This is a replacement for + the default U-Boot network stack and applications located in net/ + and enabled via CONFIG_NET as well as other pieces of code that + depend on CONFIG_NET (such as cmd/net.c enabled via CONFIG_CMD_NET). + Therefore the two symbols CONFIG_NET and CONFIG_NET_LWIP are mutually + exclusive. + +endchoice + source "net/Kconfig" +endmenu + source "drivers/Kconfig" source "fs/Kconfig" diff --git a/Makefile b/Makefile index 5113098d29c..fa22080408b 100644 --- a/Makefile +++ b/Makefile @@ -859,7 +859,7 @@ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += env/ libs-y += lib/ libs-y += fs/ -libs-y += net/ +libs-$(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)) += net/ libs-y += disk/ libs-y += drivers/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ diff --git a/boot/Kconfig b/boot/Kconfig index 7ac34574079..798155a5422 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -502,6 +502,7 @@ config BOOTMETH_ANDROID select ANDROID_BOOT_IMAGE select CMD_BCB select CMD_FASTBOOT + select FASTBOOT select PARTITION_TYPE_GUID select PARTITION_UUIDS help diff --git a/cmd/Kconfig b/cmd/Kconfig index 83c82818bf4..2817ccbd3dc 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1651,6 +1651,7 @@ config CMD_USB config CMD_USB_SDP bool "sdp" + depends on USB_GADGET_DOWNLOAD select USB_FUNCTION_SDP help Enables the command "sdp" which is used to have U-Boot emulating the diff --git a/common/Kconfig b/common/Kconfig index 968d4fb66a8..16224373227 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -424,7 +424,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET + depends on NET || NET_LWIP help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers. diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 3c44e329d62..243df3a543a 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1073,6 +1073,7 @@ config SPL_DM_SPI_FLASH config SPL_NET bool "Support networking" + depends on !NET_LWIP help Enable support for network devices (such as Ethernet) in SPL. This permits SPL to load U-Boot over a network link rather than diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 971204758aa..d034b501360 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -20,6 +20,7 @@ config DFU_WRITE_ALT config DFU_TFTP bool "DFU via TFTP" depends on NETDEVICES + depends on !NET_LWIP select UPDATE_COMMON select DFU_OVER_TFTP help diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig index 70207573de2..1eb460f5a02 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -1,5 +1,6 @@ menu "Fastboot support" depends on CMDLINE + depends on !NET_LWIP config FASTBOOT bool diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e7d0ddfe25a..f893edbd094 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -48,6 +48,7 @@ config DM_DSA bool "Enable Driver Model for DSA switches" depends on DM_MDIO depends on PHY_FIXED + depends on !NET_LWIP help Enable driver model for DSA switches diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index a9efc509814..13e73810ad6 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -11,7 +11,7 @@ config MV88E6352_SWITCH menuconfig PHYLIB bool "Ethernet PHY (physical media interface) support" - depends on NET + depends on NET || NET_LWIP help Enable Ethernet PHY (physical media interface) support. diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 4621a6fd5e6..03fe3bca197 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -224,7 +224,7 @@ endif # USB_GADGET_DOWNLOAD config USB_ETHER bool "USB Ethernet Gadget" - depends on NET + depends on NET || NET_LWIP default y if ARCH_SUNXI && USB_MUSB_GADGET help Creates an Ethernet network device through a USB peripheral diff --git a/net/Kconfig b/net/Kconfig index 7cb80b880a9..16a9de47e94 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -2,11 +2,6 @@ # Network configuration # -menuconfig NET - bool "Networking support" - default y - imply NETDEVICES - if NET config ARP_TIMEOUT @@ -26,15 +21,6 @@ config PROT_UDP Enable a generic udp framework that allows defining a custom handler for udp protocol. -config BOOTDEV_ETH - bool "Enable bootdev for ethernet" - depends on BOOTSTD - default y - help - Provide a bootdev for ethernet so that is it possible to boot - an operationg system over the network, using the PXE (Preboot - Execution Environment) protocol. - config BOOTP_SEND_HOSTNAME bool "Send hostname to DNS server" help @@ -45,15 +31,6 @@ config BOOTP_SEND_HOSTNAME of the "hostname" environment variable is passed as option 12 to the DHCP server. -config NET_RANDOM_ETHADDR - bool "Random ethaddr if unset" - help - Selecting this will allow the Ethernet interface to function even - when the ethaddr variable for that interface is unset. In this case, - a random MAC address in the locally administered address space is - generated. It will be saved to the appropriate environment variable, - too. - config NETCONSOLE bool "NetConsole support" help @@ -255,11 +232,35 @@ config IPV6 endif # if NET +source "net/lwip/Kconfig" + +if NET || NET_LWIP + +config BOOTDEV_ETH + bool "Enable bootdev for ethernet" + depends on BOOTSTD + default y + help + Provide a bootdev for ethernet so that is it possible to boot + an operating system over the network, using the PXE (Preboot + Execution Environment) protocol. + +config NET_RANDOM_ETHADDR + bool "Random ethaddr if unset" + help + Selecting this will allow the Ethernet interface to function even + when the ethaddr variable for that interface is unset. In this case, + a random MAC address in the locally administered address space is + generated. It will be saved to the appropriate environment variable, + too. + +endif # if NET || NET_LWIP + config SYS_RX_ETH_BUFFER - int "Number of receive packet buffers" - default 4 - help - Defines the number of Ethernet receive buffers. On some Ethernet - controllers it is recommended to set this value to 8 or even higher, - since all buffers can be full shortly after enabling the interface on - high Ethernet traffic. + int "Number of receive packet buffers" + default 4 + help + Defines the number of Ethernet receive buffers. On some Ethernet + controllers it is recommended to set this value to 8 or even higher, + since all buffers can be full shortly after enabling the interface on + high Ethernet traffic. diff --git a/net/Makefile b/net/Makefile index 64ab7ec740a..70eec8caf0d 100644 --- a/net/Makefile +++ b/net/Makefile @@ -5,6 +5,8 @@ #ccflags-y += -DDEBUG +ifeq ($(CONFIG_NET),y) + obj-$(CONFIG_NET) += arp.o obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o @@ -38,3 +40,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o # sprintf(buf, index ? "foo%d" : "foo", index) # and this is intentional usage. CFLAGS_eth_common.o += -Wno-format-extra-args + +endif diff --git a/net/lwip/Kconfig b/net/lwip/Kconfig new file mode 100644 index 00000000000..90c62145844 --- /dev/null +++ b/net/lwip/Kconfig @@ -0,0 +1,38 @@ +# +# Network configuration (with lwIP stack) +# + +if NET_LWIP + +config LWIP_DEBUG + bool "Enable debug traces in the lwIP library" + +config LWIP_ASSERT + bool "Enable assertions in the lwIP library" + +config PROT_DHCP_LWIP + bool + select PROT_UDP_LWIP + +config PROT_DNS_LWIP + bool + select PROT_UDP_LWIP + +config PROT_RAW_LWIP + bool + +config PROT_TCP_LWIP + bool + +config PROT_TCP_SACK_LWIP + bool "TCP SACK support" + depends on PROT_TCP_LWIP + default y + help + TCP protocol with selective acknowledgements. Improves + file transfer speed in wget. + +config PROT_UDP_LWIP + bool + +endif # NET_LWIP From patchwork Fri Sep 6 12:33:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825985 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp809164wrb; Fri, 6 Sep 2024 06:41:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVowPyiar4PCTmMftCpJOJ14JUNsupxZOsiB0RW5c5F/RPyBjxMrspCo5oa3eyIF//h5UX65Q==@linaro.org X-Google-Smtp-Source: AGHT+IFVUtXRgncmNdjRZRAAgoFAsl+wfDaHP1t1Rj0o+scCZPyF310NSKlm1jkkenny5TFAT+Lq X-Received: by 2002:a17:907:a02:b0:a7a:9f0f:ab26 with SMTP id a640c23a62f3a-a8a885faf59mr250659966b.23.1725630098027; Fri, 06 Sep 2024 06:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725630098; cv=none; d=google.com; s=arc-20240605; b=eq34SiwSjoskyc9aLDr2owq+APDD7re+/HUa/yDehUh+CA2QDC+3Mpyk2/BmzBLydo 9Sluq1NR4KpwcrcMi0GF8wMjZ+LC135rx4vxLobaxTc+stBHlacflSra51LFWut/fyho SfXBFkgisupc2srFVV4Brkn8hpkTXCzfqy6tCyqgF4j2GTRku2FxgWisV2me4vIjuzj6 2aeFkIjHBrxlsz4/+pGZEMyeo/6G5dyR4uYAaXojUsPng14uiT+moUoi8460zMfme+X/ FzEuEwSAtY+YhjzCD2YPXUFx5GFo/KZwbFjjwXEoEd2g6pJGmomT2aIb9uNpwIkrN/CC 2rkg== 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=GosR7VMpkoVByMXOpu4LiNAj/1DQy5mnx904UmnIiPg=; fh=+4HNjIIxMJI+FCNsORe5sOhgCHoSLLIR3W0kTciB39E=; b=WFfhCDTc5E0EyNOCev+7N+3zBFmQgF9IRyrIBvqkexBfusTqzpAlziOvql0leuQ8cv F4pq2CS6I5TWC0kB9JTuV9mII0s4jw/RD+Y3VjG9Mcbj+YJBNo5lOzQ3D9HrTLeTvJ1P YXJNXtDMQGKt112v3A4MtJFso6v1TfeHYX8umx1LPNjgWqKDiPvffQYG6cj1w20xHZIE H2gMeEmB3PFyzZMnRNAmyG7Zc1HhPClPpKbTvd52DSg08HnfDA9HQnQdXtvdo9jUUGxb VHByku2K6IATNg9XEUzMPZkpoMEYS5v5DaEmIrHWP4luvCelx7aWeObDiYsaOs23nfV3 D1Uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HzOZG/MH"; 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-a8a623c5f39si329481066b.617.2024.09.06.06.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:41:38 -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="HzOZG/MH"; 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 6F322888F0; Fri, 6 Sep 2024 15:41:14 +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="HzOZG/MH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CADF88BD6; Fri, 6 Sep 2024 14:34:57 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 C619388CC8 for ; Fri, 6 Sep 2024 14:34:51 +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-x332.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so14939665e9.3 for ; Fri, 06 Sep 2024 05:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626090; x=1726230890; 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=GosR7VMpkoVByMXOpu4LiNAj/1DQy5mnx904UmnIiPg=; b=HzOZG/MHk6Tg22WDq1gTQp2I0Igd9kKattpLKwXPeLXiq7PGiFHoSd50RcxPzRoKb+ NFCOCka/v2JQOV3qrzh8TmSUMDruZEBzzWcea8ywybooVRy1RyFM6PKB+Ps91IKiMEXL tqcDao3vhTAeU31hiPTd6WPyGuuZVn1zJ3K5QYaUCHssTCaPfBiCoF4vttW6hAe1WP+L KHRznw2B86kKEV9BO7OvXXuXtyf9GPuOX5TTfqtSrG+rwiRPVgWhjmjuVlDFg+JzAzok LZ+UfrP9quuI+KpOAv6nGlLpJJuW1PH+7fI94CttNEjmYv+Cy0EjALifvcV0hYx+Ox4n A/tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626090; x=1726230890; 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=GosR7VMpkoVByMXOpu4LiNAj/1DQy5mnx904UmnIiPg=; b=UcS5FyE+VtL9MiGHQT7NS/2Y99Jq50cU/kG6yxbyL+MIdEk6hgpVlJmnEGVT6lCUSi r2WbsTLsgFoDdmjkqMMwytIEmwv4oyknIH18iDEX5qLyxQ4W9St9h6JP33PC7YMxCwHn h0mPwIXc5AQyehsFEMcOmiICKB8qq5NZMEv0AiLW2mU11yFLBf1SD/eGcwj7yP4Q00Ho JpYmQ5HYZgVEgLiIlsq4nxEt0UTiwCkDM7dQTf6bjNIFTYsLJRGJHPaOm5qb8jsO+Ij6 faXlwnnGqpz/PmcTLkw8LTSv1bU4U0bjGKuFaT2k9IQKhX58XBJIzunpSvjeG91vp78M PRYw== X-Gm-Message-State: AOJu0YywsE++d4XrbK9zsWHHpPG25GtRyG6ksRu4qcY979whi9MtccDW ZjVoELSVYhVf7l6PaHlkcnvh3CoPcBZLs4FL6j8qdxannp895eTW0AG/VkePzu+MOF7ZUPKMECc 8Ax/CDFA/ X-Received: by 2002:a05:600c:1c01:b0:42b:8965:1638 with SMTP id 5b1f17b1804b1-42c9f978c80mr17562915e9.1.1725626090257; Fri, 06 Sep 2024 05:34:50 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:49 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Felix Brack , Icenowy Zheng , Tom Rini , Angelo Dureghello , Vignesh Raghavendra , Bryan Brattlof , Nishanth Menon , Robert Nelson , Michal Simek , Chris Morgan , Wills Wang , Rosy Song , Mark Kettenis , Wolfgang Wegner , Stelian Pop , Thomas Fitzsimmons , Philippe Reynes , Linus Walleij , Simon Glass , Alex Nemirovsky , liuhao , shuyiqi , Sam Protsenko , Trevor Woerner , Heinrich Schuchardt , Alexey Brodkin , Andy Yan , Jonas Karlman , Yang Xiwen , Enric Balletbo i Serra , Matthias Winker , Philip Oberfichtner , Michael Trimarchi , Vaishnav Achath , Jayesh Choudhary , David Lechner , Johan Jonker , Fabio Estevam , Otavio Salvador , Eric Nelson , Peng Fan , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Tianrui Wei , Minkyu Kang , lixinde , weichangzheng , Ilko Iliev , Stefan Bosch , Jaehoon Chung , Greg Gallagher , Mihai Sain , Sean Anderson , Stephan Gerhold , Kamil Lulko , Patrick Delaunay , Patrice Chotard , Dillon Min , Wei Fu , Yixun Lan , Sergey Temerkhanov , Mike Looijmans , Usama Arif , Anastasiia Lukianenko , Oleksandr Andrushchenko , Paul Kocialkowski , Svyatoslav Ryhel , Marcel Ziswiler , Quentin Schulz , Martyn Welch , Andrew Davis , Mattijs Korpershoek , Venkatesh Yadav Abbarapu , Kever Yang , Dragan Simic , Janne Grunau , Neal Gompa , Sughosh Ganu , Hector Martin , Bin Meng , Sumit Garg , Javier Martinez Canillas , Patrick Barsanti , Francesco Dolcini , Marek Vasut , Heiko Schocher , TracyMg_Li , Dario Binacchi , Andrii Chepurnyi Subject: [PATCH v10 03/25] configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y Date: Fri, 6 Sep 2024 14:33:19 +0200 Message-Id: <527ae437aa2d0e99e8b2757298933f9319b186db.1725625913.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2024 15:41:12 +0200 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 The parent patch has made the networking stack a choice between NO_NET, NET and NET_LWIP. Therefore '# CONFIG_NET is not set' is now 'CONFIG_NO_NET=y'. Adjust the defconfigs accordingly. Note that this patch is intended to be folded in but is kept separate separate for now to make review easier. Signed-off-by: Jerome Forissier Tested-by: Felix Brack --- configs/LicheePi_Zero_defconfig | 2 +- configs/M5249EVB_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am62ax_evm_r5_defconfig | 2 +- configs/am62px_evm_r5_defconfig | 2 +- configs/am62x_beagleplay_r5_defconfig | 2 +- configs/amcore_defconfig | 2 +- configs/amd_versal2_mini_defconfig | 2 +- configs/amd_versal2_mini_emmc_defconfig | 2 +- configs/amd_versal2_mini_ospi_defconfig | 2 +- configs/amd_versal2_mini_qspi_defconfig | 2 +- configs/anbernic-rgxx3-rk3566_defconfig | 2 +- configs/ap143_defconfig | 2 +- configs/ap152_defconfig | 2 +- configs/apple_m1_defconfig | 2 +- configs/astro_mcf5373l_defconfig | 2 +- configs/at91sam9rlek_dataflash_defconfig | 2 +- configs/at91sam9rlek_mmc_defconfig | 2 +- configs/at91sam9rlek_nandflash_defconfig | 2 +- configs/bcm7260_defconfig | 2 +- configs/bcm7445_defconfig | 2 +- configs/bcm968380gerg_ram_defconfig | 2 +- configs/bcmns_defconfig | 2 +- configs/chromebook_samus_tpl_defconfig | 2 +- configs/cortina_presidio-asic-base_defconfig | 2 +- configs/cortina_presidio-asic-pnand_defconfig | 2 +- configs/durian_defconfig | 2 +- configs/e850-96_defconfig | 2 +- configs/ea-lpc3250devkitv2_defconfig | 2 +- configs/efi-x86_app32_defconfig | 2 +- configs/efi-x86_app64_defconfig | 2 +- configs/emsdp_defconfig | 2 +- configs/evb-px5_defconfig | 2 +- configs/generic-rk3568_defconfig | 2 +- configs/generic-rk3588_defconfig | 2 +- configs/hc2910_2aghd05_defconfig | 2 +- configs/igep00x0_defconfig | 2 +- configs/imx6q_bosch_acc_defconfig | 2 +- configs/imx6ulz_smm_m2_defconfig | 2 +- configs/iot_devkit_defconfig | 2 +- configs/j722s_evm_r5_defconfig | 2 +- configs/legoev3_defconfig | 2 +- configs/mk808_defconfig | 2 +- configs/mx23evk_defconfig | 2 +- configs/mx28evk_defconfig | 2 +- configs/mx6memcal_defconfig | 2 +- configs/mx6ulz_14x14_evk_defconfig | 2 +- configs/mx7ulp_com_defconfig | 2 +- configs/mx7ulp_evk_defconfig | 2 +- configs/mx7ulp_evk_plugin_defconfig | 2 +- configs/netgear_cg3100d_ram_defconfig | 2 +- configs/nsim_700_defconfig | 2 +- configs/nsim_700be_defconfig | 2 +- configs/nsim_hs38be_defconfig | 2 +- configs/openpiton_riscv64_defconfig | 2 +- configs/openpiton_riscv64_spl_defconfig | 2 +- configs/origen_defconfig | 2 +- configs/pe2201_defconfig | 2 +- configs/pinecube_defconfig | 2 +- configs/pm9261_defconfig | 2 +- configs/s5p4418_nanopi2_defconfig | 2 +- configs/s5p_goni_defconfig | 2 +- configs/s5pc210_universal_defconfig | 2 +- configs/sama5d27_giantboard_defconfig | 2 +- configs/sama5d29_curiosity_mmc1_defconfig | 2 +- configs/sama5d29_curiosity_mmc_defconfig | 2 +- configs/sama5d29_curiosity_qspiflash_defconfig | 2 +- configs/sama7g54_curiosity_mmc_defconfig | 2 +- configs/sama7g54_curiosity_nandflash_defconfig | 2 +- configs/sama7g54_curiosity_qspiflash_defconfig | 2 +- configs/sipeed_maix_bitm_defconfig | 2 +- configs/sipeed_maix_smode_defconfig | 2 +- configs/stemmy_defconfig | 2 +- configs/stm32f429-discovery_defconfig | 2 +- configs/stm32f429-evaluation_defconfig | 2 +- configs/stm32f469-discovery_defconfig | 2 +- configs/stm32h743-disco_defconfig | 2 +- configs/stm32h743-eval_defconfig | 2 +- configs/stm32h750-art-pi_defconfig | 2 +- configs/stm32mp25_defconfig | 2 +- configs/stmark2_defconfig | 2 +- configs/th1520_lpi4a_defconfig | 2 +- configs/thunderx_88xx_defconfig | 2 +- configs/tools-only_defconfig | 2 +- configs/topic_miami_defconfig | 2 +- configs/topic_miamilite_defconfig | 2 +- configs/topic_miamiplus_defconfig | 2 +- configs/total_compute_defconfig | 2 +- configs/trats2_defconfig | 2 +- configs/trats_defconfig | 2 +- configs/xenguest_arm64_defconfig | 2 +- configs/xenguest_arm64_virtio_defconfig | 2 +- configs/xilinx_versal_mini_defconfig | 2 +- configs/xilinx_versal_mini_emmc0_defconfig | 2 +- configs/xilinx_versal_mini_emmc1_defconfig | 2 +- configs/xilinx_versal_mini_ospi_defconfig | 2 +- configs/xilinx_versal_mini_qspi_defconfig | 2 +- configs/xilinx_versal_net_mini_defconfig | 2 +- configs/xilinx_versal_net_mini_emmc_defconfig | 2 +- configs/xilinx_versal_net_mini_ospi_defconfig | 2 +- configs/xilinx_versal_net_mini_qspi_defconfig | 2 +- configs/xilinx_zynqmp_mini_defconfig | 2 +- configs/xilinx_zynqmp_mini_emmc0_defconfig | 2 +- configs/xilinx_zynqmp_mini_emmc1_defconfig | 2 +- configs/xilinx_zynqmp_mini_nand_defconfig | 2 +- configs/xilinx_zynqmp_mini_nand_single_defconfig | 2 +- configs/xilinx_zynqmp_mini_qspi_defconfig | 2 +- configs/zynq_cse_nand_defconfig | 2 +- configs/zynq_cse_nor_defconfig | 2 +- configs/zynq_cse_qspi_defconfig | 2 +- 110 files changed, 110 insertions(+), 110 deletions(-) diff --git a/configs/LicheePi_Zero_defconfig b/configs/LicheePi_Zero_defconfig index 009384eaf1b..c37c49ccbb1 100644 --- a/configs/LicheePi_Zero_defconfig +++ b/configs/LicheePi_Zero_defconfig @@ -5,4 +5,4 @@ CONFIG_SPL=y CONFIG_MACH_SUN8I_V3S=y CONFIG_DRAM_CLK=360 # CONFIG_HAS_ARMV7_SECURE_BASE is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig index eac85b9c2d5..ed1446d81cb 100644 --- a/configs/M5249EVB_defconfig +++ b/configs/M5249EVB_defconfig @@ -22,7 +22,7 @@ CONFIG_CMD_MX_CYCLIC=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/configs/am335x_pdu001_defconfig b/configs/am335x_pdu001_defconfig index d9acc81e9d3..a8e901b40f9 100644 --- a/configs/am335x_pdu001_defconfig +++ b/configs/am335x_pdu001_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_OF_TRANSLATE=y diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig index 092d0830623..6b926f47507 100644 --- a/configs/am62ax_evm_r5_defconfig +++ b/configs/am62ax_evm_r5_defconfig @@ -68,7 +68,7 @@ CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_PART=1 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y diff --git a/configs/am62px_evm_r5_defconfig b/configs/am62px_evm_r5_defconfig index 4f7be44cfba..11a00dbfc04 100644 --- a/configs/am62px_evm_r5_defconfig +++ b/configs/am62px_evm_r5_defconfig @@ -72,7 +72,7 @@ CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_PART=1 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_DEVICE_REMOVE=y CONFIG_SPL_DM_SEQ_ALIAS=y diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62x_beagleplay_r5_defconfig index ee4c43ff97f..e32ec42111c 100644 --- a/configs/am62x_beagleplay_r5_defconfig +++ b/configs/am62x_beagleplay_r5_defconfig @@ -69,7 +69,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y diff --git a/configs/amcore_defconfig b/configs/amcore_defconfig index f1f5201b30a..94c5379590d 100644 --- a/configs/amcore_defconfig +++ b/configs/amcore_defconfig @@ -33,7 +33,7 @@ CONFIG_CMD_DIAG=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="AMCORE" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/configs/amd_versal2_mini_defconfig b/configs/amd_versal2_mini_defconfig index 0dd2305bfb2..684205d25a3 100644 --- a/configs/amd_versal2_mini_defconfig +++ b/configs/amd_versal2_mini_defconfig @@ -62,7 +62,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/amd_versal2_mini_emmc_defconfig b/configs/amd_versal2_mini_emmc_defconfig index 7ad44386a6d..8484f182b93 100644 --- a/configs/amd_versal2_mini_emmc_defconfig +++ b/configs/amd_versal2_mini_emmc_defconfig @@ -53,7 +53,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_HS200_SUPPORT=y CONFIG_MMC_SDHCI=y diff --git a/configs/amd_versal2_mini_ospi_defconfig b/configs/amd_versal2_mini_ospi_defconfig index 2242960392f..d064165d79b 100644 --- a/configs/amd_versal2_mini_ospi_defconfig +++ b/configs/amd_versal2_mini_ospi_defconfig @@ -56,7 +56,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/amd_versal2_mini_qspi_defconfig b/configs/amd_versal2_mini_qspi_defconfig index 3360c1546a2..e48c26243b8 100644 --- a/configs/amd_versal2_mini_qspi_defconfig +++ b/configs/amd_versal2_mini_qspi_defconfig @@ -56,7 +56,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig index a03509bf467..937c27a947e 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/ap143_defconfig b/configs/ap143_defconfig index c22048c1b53..13842e6c0f8 100644 --- a/configs/ap143_defconfig +++ b/configs/ap143_defconfig @@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=25000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/ap152_defconfig b/configs/ap152_defconfig index ec700a5b3f0..5cc0ad2e682 100644 --- a/configs/ap152_defconfig +++ b/configs/ap152_defconfig @@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=25000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index dca6e0ca8ba..d491a5d03c5 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -11,7 +11,7 @@ CONFIG_SYS_PBSIZE=276 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_LATE_INIT=y CONFIG_CMD_SELECT_FONT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SYS_64BIT_LBA=y CONFIG_APPLE_SPI_KEYB=y # CONFIG_MMC is not set diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig index d1942c28971..8dd369d68a1 100644 --- a/configs/astro_mcf5373l_defconfig +++ b/configs/astro_mcf5373l_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_I2C=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_JFFS2=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_FPGA_ALTERA=y CONFIG_FPGA_CYCLON2=y CONFIG_FPGA_XILINX=y diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig index 931af2b2fda..01ac2cc8d1e 100644 --- a/configs/at91sam9rlek_dataflash_defconfig +++ b/configs/at91sam9rlek_dataflash_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=15000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig index 70d431c1f52..93f7d762109 100644 --- a/configs/at91sam9rlek_mmc_defconfig +++ b/configs/at91sam9rlek_mmc_defconfig @@ -39,7 +39,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FAT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig index 1277a357cd2..928ad9f4f70 100644 --- a/configs/at91sam9rlek_nandflash_defconfig +++ b/configs/at91sam9rlek_nandflash_defconfig @@ -40,7 +40,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig index 2bf3c0d7fbe..345e37bca7e 100644 --- a/configs/bcm7260_defconfig +++ b/configs/bcm7260_defconfig @@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y CONFIG_MTD=y diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig index 07e3b57ac33..eb6629ba57a 100644 --- a/configs/bcm7445_defconfig +++ b/configs/bcm7445_defconfig @@ -37,7 +37,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y CONFIG_MTD=y diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig index 6c119eb42a6..053c459e05c 100644 --- a/configs/bcm968380gerg_ram_defconfig +++ b/configs/bcm968380gerg_ram_defconfig @@ -41,7 +41,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_NAND=y # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_BCM6345_GPIO=y CONFIG_LED=y diff --git a/configs/bcmns_defconfig b/configs/bcmns_defconfig index 365284e94c3..f2719821656 100644 --- a/configs/bcmns_defconfig +++ b/configs/bcmns_defconfig @@ -28,7 +28,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="NS" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_MTD=y CONFIG_DM_MTD=y diff --git a/configs/chromebook_samus_tpl_defconfig b/configs/chromebook_samus_tpl_defconfig index 1be57560f89..075e3f192a3 100644 --- a/configs/chromebook_samus_tpl_defconfig +++ b/configs/chromebook_samus_tpl_defconfig @@ -74,7 +74,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_ACPIGEN is not set diff --git a/configs/cortina_presidio-asic-base_defconfig b/configs/cortina_presidio-asic-base_defconfig index eb5743da64d..78167d56d83 100644 --- a/configs/cortina_presidio-asic-base_defconfig +++ b/configs/cortina_presidio-asic-base_defconfig @@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_SMC=y CONFIG_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CORTINA_GPIO=y # CONFIG_MMC is not set CONFIG_DM_SERIAL=y diff --git a/configs/cortina_presidio-asic-pnand_defconfig b/configs/cortina_presidio-asic-pnand_defconfig index c7367d4d91c..f1526227d65 100644 --- a/configs/cortina_presidio-asic-pnand_defconfig +++ b/configs/cortina_presidio-asic-pnand_defconfig @@ -32,7 +32,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_SMC=y CONFIG_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CORTINA_GPIO=y # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/durian_defconfig b/configs/durian_defconfig index f1d45ca3064..ae7a05edee1 100644 --- a/configs/durian_defconfig +++ b/configs/durian_defconfig @@ -28,7 +28,7 @@ CONFIG_SYS_PROMPT="durian#" CONFIG_CMD_PCI=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y # CONFIG_MMC is not set diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig index e5d90996234..5797c6cb1f9 100644 --- a/configs/e850-96_defconfig +++ b/configs/e850-96_defconfig @@ -20,7 +20,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_TIME=y CONFIG_CMD_RNG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK_EXYNOS850=y CONFIG_MMC_DW=y CONFIG_SOC_SAMSUNG=y diff --git a/configs/ea-lpc3250devkitv2_defconfig b/configs/ea-lpc3250devkitv2_defconfig index af9fc5f2f5c..c3af7afced1 100644 --- a/configs/ea-lpc3250devkitv2_defconfig +++ b/configs/ea-lpc3250devkitv2_defconfig @@ -25,7 +25,7 @@ CONFIG_SYS_PROMPT="EA-LPC3250v2=> " CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_OF_CONTROL=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_LPC32XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_LPC32XX=y diff --git a/configs/efi-x86_app32_defconfig b/configs/efi-x86_app32_defconfig index 53ec63461d5..c2856b4000f 100644 --- a/configs/efi-x86_app32_defconfig +++ b/configs/efi-x86_app32_defconfig @@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_GZIP is not set diff --git a/configs/efi-x86_app64_defconfig b/configs/efi-x86_app64_defconfig index 3d021483dd0..0b709cf4dad 100644 --- a/configs/efi-x86_app64_defconfig +++ b/configs/efi-x86_app64_defconfig @@ -38,7 +38,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y CONFIG_CONSOLE_SCROLL_LINES=5 diff --git a/configs/emsdp_defconfig b/configs/emsdp_defconfig index 07bed2b5623..26efa794058 100644 --- a/configs/emsdp_defconfig +++ b/configs/emsdp_defconfig @@ -30,7 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="app.bin" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_DW_SNPS=y diff --git a/configs/evb-px5_defconfig b/configs/evb-px5_defconfig index ccd38831533..8efab0c2fc0 100644 --- a/configs/evb-px5_defconfig +++ b/configs/evb-px5_defconfig @@ -57,7 +57,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent" CONFIG_TPL_OF_PLATDATA=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_TPL_DM=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig index 66a33afbbaf..383dad3087b 100644 --- a/configs/generic-rk3568_defconfig +++ b/configs/generic-rk3568_defconfig @@ -40,7 +40,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig index 42bc2c9a765..3c81401968d 100644 --- a/configs/generic-rk3588_defconfig +++ b/configs/generic-rk3588_defconfig @@ -35,7 +35,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/hc2910_2aghd05_defconfig b/configs/hc2910_2aghd05_defconfig index e68b44478a9..4302436d2e6 100644 --- a/configs/hc2910_2aghd05_defconfig +++ b/configs/hc2910_2aghd05_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_GPIO is not set # CONFIG_I2C is not set # CONFIG_INPUT is not set diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig index f1d9bb34aba..51c825d3fbe 100644 --- a/configs/igep00x0_defconfig +++ b/configs/igep00x0_defconfig @@ -60,7 +60,7 @@ CONFIG_ENV_UBI_VOLUME="config" CONFIG_ENV_UBI_VOLUME_REDUND="config_r" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_DM_I2C=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y diff --git a/configs/imx6q_bosch_acc_defconfig b/configs/imx6q_bosch_acc_defconfig index dce1b64bf69..3fca5d5139d 100644 --- a/configs/imx6q_bosch_acc_defconfig +++ b/configs/imx6q_bosch_acc_defconfig @@ -81,7 +81,7 @@ CONFIG_SYS_MMC_ENV_PART=1 CONFIG_ENV_WRITEABLE_LIST=y CONFIG_ENV_ACCESS_IGNORE_FORCE=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DM_BOOTCOUNT=y diff --git a/configs/imx6ulz_smm_m2_defconfig b/configs/imx6ulz_smm_m2_defconfig index 93ead4c373b..c2adff17abf 100644 --- a/configs/imx6ulz_smm_m2_defconfig +++ b/configs/imx6ulz_smm_m2_defconfig @@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x82000000 diff --git a/configs/iot_devkit_defconfig b/configs/iot_devkit_defconfig index c4920052f82..3dda897f765 100644 --- a/configs/iot_devkit_defconfig +++ b/configs/iot_devkit_defconfig @@ -34,7 +34,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="app.bin" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_DW_SNPS=y diff --git a/configs/j722s_evm_r5_defconfig b/configs/j722s_evm_r5_defconfig index e574be9e19d..fd3259f6afb 100644 --- a/configs/j722s_evm_r5_defconfig +++ b/configs/j722s_evm_r5_defconfig @@ -72,7 +72,7 @@ CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_PART=1 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_DEVICE_REMOVE=y CONFIG_SPL_DM_SEQ_ALIAS=y diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig index 34ef3493cac..60b7a84205c 100644 --- a/configs/legoev3_defconfig +++ b/configs/legoev3_defconfig @@ -44,7 +44,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y diff --git a/configs/mk808_defconfig b/configs/mk808_defconfig index 9a342d3a33a..36ab4b03401 100644 --- a/configs/mk808_defconfig +++ b/configs/mk808_defconfig @@ -68,7 +68,7 @@ CONFIG_OF_DTB_PROPS_REMOVE=y CONFIG_SPL_OF_PLATDATA=y CONFIG_TPL_OF_PLATDATA=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_TPL_DM=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y diff --git a/configs/mx23evk_defconfig b/configs/mx23evk_defconfig index 7d0e7cc1e00..59ab64ec97a 100644 --- a/configs/mx23evk_defconfig +++ b/configs/mx23evk_defconfig @@ -41,7 +41,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MXS_GPIO=y CONFIG_MMC_MXS=y CONFIG_PINCTRL=y diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig index dddb57efd3e..1295ff80c7b 100644 --- a/configs/mx28evk_defconfig +++ b/configs/mx28evk_defconfig @@ -47,7 +47,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_MXS_GPIO=y CONFIG_MMC_MXS=y diff --git a/configs/mx6memcal_defconfig b/configs/mx6memcal_defconfig index 4c8a5960d38..5cc8236feb9 100644 --- a/configs/mx6memcal_defconfig +++ b/configs/mx6memcal_defconfig @@ -38,7 +38,7 @@ CONFIG_CMD_MEMTEST=y CONFIG_CMD_CACHE=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y # CONFIG_MMC is not set CONFIG_FSL_USDHC=y diff --git a/configs/mx6ulz_14x14_evk_defconfig b/configs/mx6ulz_14x14_evk_defconfig index d57b47ef47a..2c13dd4dbc3 100644 --- a/configs/mx6ulz_14x14_evk_defconfig +++ b/configs/mx6ulz_14x14_evk_defconfig @@ -36,7 +36,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_DM_74X164=y CONFIG_DM_I2C=y diff --git a/configs/mx7ulp_com_defconfig b/configs/mx7ulp_com_defconfig index f8dcc0abef5..6ea84c053ca 100644 --- a/configs/mx7ulp_com_defconfig +++ b/configs/mx7ulp_com_defconfig @@ -33,7 +33,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig index 38e6b62df45..5aadb9e93f1 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -33,7 +33,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig index d007d180969..2f45fac0a89 100644 --- a/configs/mx7ulp_evk_plugin_defconfig +++ b/configs/mx7ulp_evk_plugin_defconfig @@ -31,7 +31,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/netgear_cg3100d_ram_defconfig b/configs/netgear_cg3100d_ram_defconfig index 352b98fc0a5..377cc26f937 100644 --- a/configs/netgear_cg3100d_ram_defconfig +++ b/configs/netgear_cg3100d_ram_defconfig @@ -39,7 +39,7 @@ CONFIG_CMD_MEMINFO=y CONFIG_CMD_SPI=y # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_BCM6345_GPIO=y CONFIG_LED=y diff --git a/configs/nsim_700_defconfig b/configs/nsim_700_defconfig index be2539e8cd7..e8400c2dc30 100644 --- a/configs/nsim_700_defconfig +++ b/configs/nsim_700_defconfig @@ -25,7 +25,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/nsim_700be_defconfig b/configs/nsim_700be_defconfig index 1fcf36a28a5..9ce1a255227 100644 --- a/configs/nsim_700be_defconfig +++ b/configs/nsim_700be_defconfig @@ -26,7 +26,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig index 9c26e4da7d2..80d0e54192d 100644 --- a/configs/nsim_hs38be_defconfig +++ b/configs/nsim_hs38be_defconfig @@ -27,7 +27,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/openpiton_riscv64_defconfig b/configs/openpiton_riscv64_defconfig index cdb9e1c932e..9df92e5c318 100644 --- a/configs/openpiton_riscv64_defconfig +++ b/configs/openpiton_riscv64_defconfig @@ -61,7 +61,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set CONFIG_OF_EMBED=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CPU=y CONFIG_MMC=y # CONFIG_MMC_WRITE is not set diff --git a/configs/openpiton_riscv64_spl_defconfig b/configs/openpiton_riscv64_spl_defconfig index a08040d878d..29304cc50fe 100644 --- a/configs/openpiton_riscv64_spl_defconfig +++ b/configs/openpiton_riscv64_spl_defconfig @@ -77,7 +77,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_SPL_PARTITION_UUIDS is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CPU=y CONFIG_MMC=y # CONFIG_MMC_WRITE is not set diff --git a/configs/origen_defconfig b/configs/origen_defconfig index dc9285d4e99..26702d77079 100644 --- a/configs/origen_defconfig +++ b/configs/origen_defconfig @@ -41,7 +41,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_MMC_DW=y diff --git a/configs/pe2201_defconfig b/configs/pe2201_defconfig index 5d32cbf8bf1..91fe7ebf982 100644 --- a/configs/pe2201_defconfig +++ b/configs/pe2201_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_DM=y CONFIG_CMD_PCI=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y # CONFIG_MMC is not set diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig index 7cc0a862949..7567a6aa739 100644 --- a/configs/pinecube_defconfig +++ b/configs/pinecube_defconfig @@ -9,7 +9,7 @@ CONFIG_DRAM_ODT_EN=y CONFIG_I2C0_ENABLE=y # CONFIG_HAS_ARMV7_SECURE_BASE is not set CONFIG_SPL_I2C=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_MVTWSI=y CONFIG_SYS_I2C_SLAVE=0x7f diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig index 9f4d434f3e2..026c6de3109 100644 --- a/configs/pm9261_defconfig +++ b/configs/pm9261_defconfig @@ -37,7 +37,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=physmap-flash.0:256k(u-boot)ro,64k(u-boot-env) CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_FLASH=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig index ee72778995b..0bee0008294 100644 --- a/configs/s5p4418_nanopi2_defconfig +++ b/configs/s5p4418_nanopi2_defconfig @@ -49,7 +49,7 @@ CONFIG_CMD_FAT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_MMC_ENV_DEV=2 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_NEXELL=y CONFIG_MMC_DW=y diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig index 4316510541c..084e19e1258 100644 --- a/configs/s5p_goni_defconfig +++ b/configs/s5p_goni_defconfig @@ -44,7 +44,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig index 67959ad79cd..99e873ff427 100644 --- a/configs/s5pc210_universal_defconfig +++ b/configs/s5pc210_universal_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_SYS_I2C_S3C24X0=y diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig index 283c9300c56..34274ca4a32 100644 --- a/configs/sama5d27_giantboard_defconfig +++ b/configs/sama5d27_giantboard_defconfig @@ -64,7 +64,7 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names" CONFIG_ENV_IS_IN_FAT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_CLK=y diff --git a/configs/sama5d29_curiosity_mmc1_defconfig b/configs/sama5d29_curiosity_mmc1_defconfig index 61edb23b196..5d9173a0e57 100644 --- a/configs/sama5d29_curiosity_mmc1_defconfig +++ b/configs/sama5d29_curiosity_mmc1_defconfig @@ -70,7 +70,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama5d29_curiosity_mmc_defconfig b/configs/sama5d29_curiosity_mmc_defconfig index 0b16f386735..2b765f56dda 100644 --- a/configs/sama5d29_curiosity_mmc_defconfig +++ b/configs/sama5d29_curiosity_mmc_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama5d29_curiosity_qspiflash_defconfig b/configs/sama5d29_curiosity_qspiflash_defconfig index 9b522e81ef5..d840d0f3d6f 100644 --- a/configs/sama5d29_curiosity_qspiflash_defconfig +++ b/configs/sama5d29_curiosity_qspiflash_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama7g54_curiosity_mmc_defconfig b/configs/sama7g54_curiosity_mmc_defconfig index 00a091df0e5..ba8643c912c 100644 --- a/configs/sama7g54_curiosity_mmc_defconfig +++ b/configs/sama7g54_curiosity_mmc_defconfig @@ -74,7 +74,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sama7g54_curiosity_nandflash_defconfig b/configs/sama7g54_curiosity_nandflash_defconfig index 0b2116d0419..49b08d3fc2b 100644 --- a/configs/sama7g54_curiosity_nandflash_defconfig +++ b/configs/sama7g54_curiosity_nandflash_defconfig @@ -72,7 +72,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sama7g54_curiosity_qspiflash_defconfig b/configs/sama7g54_curiosity_qspiflash_defconfig index 00e5362a1fa..8fa5857e245 100644 --- a/configs/sama7g54_curiosity_qspiflash_defconfig +++ b/configs/sama7g54_curiosity_qspiflash_defconfig @@ -73,7 +73,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sipeed_maix_bitm_defconfig b/configs/sipeed_maix_bitm_defconfig index 67d5a007a8e..8788eabf55a 100644 --- a/configs/sipeed_maix_bitm_defconfig +++ b/configs/sipeed_maix_bitm_defconfig @@ -17,7 +17,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_MTDIDS_DEFAULT="nor0=spi3:0" CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK_K210_SET_RATE=y # CONFIG_INPUT is not set CONFIG_SF_DEFAULT_BUS=3 diff --git a/configs/sipeed_maix_smode_defconfig b/configs/sipeed_maix_smode_defconfig index 049fac02cac..c8d8b1ac9e1 100644 --- a/configs/sipeed_maix_smode_defconfig +++ b/configs/sipeed_maix_smode_defconfig @@ -18,7 +18,7 @@ CONFIG_SYS_PBSIZE=276 CONFIG_HUSH_PARSER=y CONFIG_MTDIDS_DEFAULT="nor0=spi3:0" CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)" -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_INPUT is not set CONFIG_SF_DEFAULT_BUS=3 CONFIG_FS_EXT4=y diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig index ee8e6be6e2c..efa3b477a6e 100644 --- a/configs/stemmy_defconfig +++ b/configs/stemmy_defconfig @@ -28,7 +28,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_GETTIME=y CONFIG_EFI_PARTITION=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x18100000 CONFIG_FASTBOOT_FLASH=y diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig index 5d59edb7381..21a466572bd 100644 --- a/configs/stm32f429-discovery_defconfig +++ b/configs/stm32f429-discovery_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_IMLS=y CONFIG_CMD_TIMER=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FLASH=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y diff --git a/configs/stm32f429-evaluation_defconfig b/configs/stm32f429-evaluation_defconfig index 3e220d73984..8f20d4ca3f5 100644 --- a/configs/stm32f429-evaluation_defconfig +++ b/configs/stm32f429-evaluation_defconfig @@ -25,7 +25,7 @@ CONFIG_CMD_TIMER=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_ARM_PL180_MMCI=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index 9b5f38b9efa..33292bfaf0c 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -26,7 +26,7 @@ CONFIG_CMD_TIMER=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_ARM_PL180_MMCI=y CONFIG_MTD=y CONFIG_DM_MTD=y diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig index 89d79e98b6f..f098b8dd6da 100644 --- a/configs/stm32h743-disco_defconfig +++ b/configs/stm32h743-disco_defconfig @@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig index 6b4ebd11691..82823e8631f 100644 --- a/configs/stm32h743-eval_defconfig +++ b/configs/stm32h743-eval_defconfig @@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32h750-art-pi_defconfig b/configs/stm32h750-art-pi_defconfig index 319b3033a40..df3ff43f4a9 100644 --- a/configs/stm32h750-art-pi_defconfig +++ b/configs/stm32h750-art-pi_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_DMA=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32mp25_defconfig b/configs/stm32mp25_defconfig index f5623a19bb2..9533e30db4d 100644 --- a/configs/stm32mp25_defconfig +++ b/configs/stm32mp25_defconfig @@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_GPIO_HOG=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_STM32F7=y diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig index f43a24c5b5e..79b21acd032 100644 --- a/configs/stmark2_defconfig +++ b/configs/stmark2_defconfig @@ -39,7 +39,7 @@ CONFIG_ENV_SPI_CS=1 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="stmark2" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y CONFIG_MTD=y diff --git a/configs/th1520_lpi4a_defconfig b/configs/th1520_lpi4a_defconfig index db80e33870b..9ab228256b0 100644 --- a/configs/th1520_lpi4a_defconfig +++ b/configs/th1520_lpi4a_defconfig @@ -58,7 +58,7 @@ CONFIG_CMD_BOOTMENU=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_BLOCK_CACHE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/thunderx_88xx_defconfig b/configs/thunderx_88xx_defconfig index b754cc01cc8..107ad279e1b 100644 --- a/configs/thunderx_88xx_defconfig +++ b/configs/thunderx_88xx_defconfig @@ -32,7 +32,7 @@ CONFIG_SYS_PROMPT="ThunderX_88XX> " # CONFIG_CMD_SAVEENV is not set # CONFIG_CMD_ENV_EXISTS is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SKIP_INIT=y diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index b54d2cefa10..e00f2c48598 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -22,7 +22,7 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd" # CONFIG_CMD_DATE is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_ACPIGEN is not set CONFIG_AXI=y CONFIG_AXI_SANDBOX=y diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig index 638d7306146..74b03d19ffb 100644 --- a/configs/topic_miami_defconfig +++ b/configs/topic_miami_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/topic_miamilite_defconfig b/configs/topic_miamilite_defconfig index af47fab83c0..46071399a4d 100644 --- a/configs/topic_miamilite_defconfig +++ b/configs/topic_miamilite_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig index ad321749694..5562c738c5e 100644 --- a/configs/topic_miamiplus_defconfig +++ b/configs/topic_miamiplus_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/total_compute_defconfig b/configs/total_compute_defconfig index 5f21d2e367a..b3d2e5c88a6 100644 --- a/configs/total_compute_defconfig +++ b/configs/total_compute_defconfig @@ -43,7 +43,7 @@ CONFIG_CMD_AVB=y CONFIG_CMD_UBI=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y # CONFIG_MMC_WRITE is not set CONFIG_ARM_PL180_MMCI=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index 67561368128..acfc42842e3 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -43,7 +43,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index 98925243bf4..070ab268474 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/xenguest_arm64_defconfig b/configs/xenguest_arm64_defconfig index 6d040c2c15c..91657e0cd8b 100644 --- a/configs/xenguest_arm64_defconfig +++ b/configs/xenguest_arm64_defconfig @@ -37,7 +37,7 @@ CONFIG_CMD_PVBLOCK=y # CONFIG_CMD_SLEEP is not set CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_DM_SERIAL=y diff --git a/configs/xenguest_arm64_virtio_defconfig b/configs/xenguest_arm64_virtio_defconfig index d00a1ba0143..217b45a2c5e 100644 --- a/configs/xenguest_arm64_virtio_defconfig +++ b/configs/xenguest_arm64_virtio_defconfig @@ -42,7 +42,7 @@ CONFIG_CMD_PCI=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y CONFIG_PARTITION_TYPE_GUID=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_DM_PCI_COMPAT=y CONFIG_PCI_REGION_MULTI_ENTRY=y diff --git a/configs/xilinx_versal_mini_defconfig b/configs/xilinx_versal_mini_defconfig index b97bf5e60a9..e9183bc8071 100644 --- a/configs/xilinx_versal_mini_defconfig +++ b/configs/xilinx_versal_mini_defconfig @@ -57,7 +57,7 @@ CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_ARM_DCC=y diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig index 5c949e34442..7ba7e65597a 100644 --- a/configs/xilinx_versal_mini_emmc0_defconfig +++ b/configs/xilinx_versal_mini_emmc0_defconfig @@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ZYNQ=y diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig index 04cba5bc72d..54cc51ee7f3 100644 --- a/configs/xilinx_versal_mini_emmc1_defconfig +++ b/configs/xilinx_versal_mini_emmc1_defconfig @@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ZYNQ=y diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig index 8f162597603..5ffb2cd5bfb 100644 --- a/configs/xilinx_versal_mini_ospi_defconfig +++ b/configs/xilinx_versal_mini_ospi_defconfig @@ -51,7 +51,7 @@ CONFIG_SYS_PROMPT="Versal> " # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/xilinx_versal_mini_qspi_defconfig b/configs/xilinx_versal_mini_qspi_defconfig index 8fbde1c7d3c..552cbdd740b 100644 --- a/configs/xilinx_versal_mini_qspi_defconfig +++ b/configs/xilinx_versal_mini_qspi_defconfig @@ -53,7 +53,7 @@ CONFIG_SYS_PROMPT="Versal> " # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_versal_net_mini_defconfig b/configs/xilinx_versal_net_mini_defconfig index d6ebd080463..c4b1a5d5416 100644 --- a/configs/xilinx_versal_net_mini_defconfig +++ b/configs/xilinx_versal_net_mini_defconfig @@ -61,7 +61,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_versal_net_mini_emmc_defconfig b/configs/xilinx_versal_net_mini_emmc_defconfig index fc88eee10af..c64ab92533b 100644 --- a/configs/xilinx_versal_net_mini_emmc_defconfig +++ b/configs/xilinx_versal_net_mini_emmc_defconfig @@ -50,7 +50,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_HS200_SUPPORT=y CONFIG_MMC_SDHCI=y diff --git a/configs/xilinx_versal_net_mini_ospi_defconfig b/configs/xilinx_versal_net_mini_ospi_defconfig index 872a4a55952..f1a136fe52c 100644 --- a/configs/xilinx_versal_net_mini_ospi_defconfig +++ b/configs/xilinx_versal_net_mini_ospi_defconfig @@ -50,7 +50,7 @@ CONFIG_SYS_PROMPT="Versal NET> " # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig index 00319e06102..75589c478d8 100644 --- a/configs/xilinx_versal_net_mini_qspi_defconfig +++ b/configs/xilinx_versal_net_mini_qspi_defconfig @@ -52,7 +52,7 @@ CONFIG_SYS_PROMPT="Versal NET> " # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_zynqmp_mini_defconfig b/configs/xilinx_zynqmp_mini_defconfig index 4b45074efc4..09d73b0617f 100644 --- a/configs/xilinx_zynqmp_mini_defconfig +++ b/configs/xilinx_zynqmp_mini_defconfig @@ -53,7 +53,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig index 49c7235fb8c..0e0242d8aac 100644 --- a/configs/xilinx_zynqmp_mini_emmc0_defconfig +++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig @@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_DM_MAILBOX is not set diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig index 1ef89f50444..01297f615b8 100644 --- a/configs/xilinx_zynqmp_mini_emmc1_defconfig +++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig @@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_DM_MAILBOX is not set diff --git a/configs/xilinx_zynqmp_mini_nand_defconfig b/configs/xilinx_zynqmp_mini_nand_defconfig index b4719536be1..fd27f565b03 100644 --- a/configs/xilinx_zynqmp_mini_nand_defconfig +++ b/configs/xilinx_zynqmp_mini_nand_defconfig @@ -48,7 +48,7 @@ CONFIG_CLOCKS=y # CONFIG_CMD_SETEXPR is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_nand_single_defconfig b/configs/xilinx_zynqmp_mini_nand_single_defconfig index 7ede17654dd..480c00ed152 100644 --- a/configs/xilinx_zynqmp_mini_nand_single_defconfig +++ b/configs/xilinx_zynqmp_mini_nand_single_defconfig @@ -48,7 +48,7 @@ CONFIG_CLOCKS=y # CONFIG_CMD_SETEXPR is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig index 0d79ecece71..d8830a6f247 100644 --- a/configs/xilinx_zynqmp_mini_qspi_defconfig +++ b/configs/xilinx_zynqmp_mini_qspi_defconfig @@ -67,7 +67,7 @@ CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_FIRMWARE is not set diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig index 750ea0db2b2..e7414c78d1e 100644 --- a/configs/zynq_cse_nand_defconfig +++ b/configs/zynq_cse_nand_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig index 3155fe0b378..4f2186b2a51 100644 --- a/configs/zynq_cse_nor_defconfig +++ b/configs/zynq_cse_nor_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig index f2e1aa6d3ab..a372a13fe2d 100644 --- a/configs/zynq_cse_qspi_defconfig +++ b/configs/zynq_cse_qspi_defconfig @@ -78,7 +78,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set From patchwork Fri Sep 6 12:33:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825955 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp777890wrb; Fri, 6 Sep 2024 05:35:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVW6NFic2buUcL/ktNQFBB9rWwSZO5CFIIOoWKHWiqP+yV3v3bomU9kmsoIyCh30hg10kEEqg==@linaro.org X-Google-Smtp-Source: AGHT+IFMD7oXsCqvUJ4E2xIKE6PYebxU8LsooF34OkmcksgUQ4RrDvwKq2IMlKe6O++SZKc1GSlb X-Received: by 2002:a17:907:36c9:b0:a7a:a960:99ee with SMTP id a640c23a62f3a-a8a886678bemr186943966b.32.1725626100442; Fri, 06 Sep 2024 05:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626100; cv=none; d=google.com; s=arc-20240605; b=lp6kJ7q8tvAnKQIsBfZw+4V0GDnUbytAAjxF8dGPvdhzNb/MbOMxzpgXVxKQkEOO5y bsnbiOx10by7YJ8Jh8oVRvmae5zkfqHXmnn7aeCaWs+oYLNHN8vwNKwDi1lQzusr5+d9 mafN5tPcK6gRXoCFvTh6mM+evk4nxfZdr74yh6WaaShaRMq2s9erjwBwo+AOLJ9esBGr 8MU/RDu0ygqv1arzN4sE5SuanW0/qp4XJLaViEgwgbiMuer8xYDUL3htTY8vINMMAVoz x1KkF29YBpmzFeNMavyWluL1ORJQ2szVvkhCEK/8LUsgyhajueJ/i1nezR+zf0B6dD8c 8Xfw== 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=v9XoY4RkIpLcr+ttHASA16D630jIjRM1IFauIGSvhtQ=; fh=5rqp5n0PLPTtStWCejnMENskzryTr0vkkeZ8nYAdwqk=; b=NXo3XGMmwUxIPAt/lxg2ikU1lQLljDIgYuDQp089mdidaerrykwc00SrmwOVMtmjWw 7AiJEL1MtVqsIHtcSQRwBCnYkd5Wq1EmRROZFWA72DM913ud04quVtbcd+KYl08/BB9M CIcJrJ1WzZR0JI3tZ3kXFnsccCqYthz7YSzjblPqCUiGsPXdmriaFXgyIDahTOT8oSGm JzjuT8GqGdOlk54giMYHC22ZjMrhjfVb2ik7vhjYD2l60n/hrh0aFXSjefnG8u75/jEA AxQeV6x2Vh/t2K++CYFg4dkUwhF4nPIXuFOm+sKbPL3L5SkXC8SFt4ebUPQHc30hFjBt vsog==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="o/pHIt/+"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail 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-a8a7d4f2c5csi179991766b.729.2024.09.06.05.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:00 -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=fail header.i=@linaro.org header.s=google header.b="o/pHIt/+"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7EC8888BD6; Fri, 6 Sep 2024 14:34:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="o/pHIt/+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A28B88BD6; Fri, 6 Sep 2024 14:34:58 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 E7A4C888C1 for ; Fri, 6 Sep 2024 14:34:54 +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-x335.google.com with SMTP id 5b1f17b1804b1-42bbd16fca8so17144765e9.0 for ; Fri, 06 Sep 2024 05:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626094; x=1726230894; 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=v9XoY4RkIpLcr+ttHASA16D630jIjRM1IFauIGSvhtQ=; b=o/pHIt/+rzsVkf5OON0p14DDI5dcB1oJXVBeXBto1VAL7vQwAgxfdOXFXPOMgvsCpe ygRPLM6LyOY3o9OJTjA/E8XTfbuIzH80PCnjal1lsb3W99LV/up6PeZGvzfcammZIVs5 sQDkpljbX0xqxrHHaCKOI1y3/HV8Dt4pZhtys2xAAxxG9igwxyrAfPU0SZdMzoovpDp9 i8Tfbmr+oLXTa68Jv1zqHFhK+ksGQtUYio7eauk7A2QjyCV7t6f5TkOTkZpAky2orH9L 6Hk6T1yeA05BLvUJvqyewyphX5KHf0CVyMTZ1SzUUxhmcI3E8bT0mGj8uWhiDRw/pvVr 3pyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626094; x=1726230894; 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=v9XoY4RkIpLcr+ttHASA16D630jIjRM1IFauIGSvhtQ=; b=jrvwiK0JPQP5LuajMVJkeHgVXceyyWPOBxDO5by/nzttK9EnE7FZ8jBRbhiFBt9b7G WaeMmn9GYRO3QY+pXsuyXY3ZfoQwR/0pDkXGFYhe440M8Db76YJ2BQ/T4vFTpQ222y66 TFvnDeBQvtVaYZDInQrSOCAnRC20gNyDMx+umZvXyesApUd6SbVsxq8xVA98SRoeHDj1 O2oIRy1INVpVp+M9qEYzXH4ZjMJiW12VTIAUn1eLU4YaOTOl8aRmukf9YfbqmfvOf/NI qakqDVnhFchfw7SXPai7n6I/chIRT80FOOeAyxwYPFVEWj8vBBL5od979JENtNx1J6tc pRhw== X-Gm-Message-State: AOJu0YwWlg6yJc9hPY8oEXsYuEmQ43bFJZEPGFZp6QrqFYWevhT//6G4 R/RDIYQSUtXLuZls/qN3C/L3n8A0KtjzFI8ubLbio9iN8tPpv8aH6M4xYHEQITS2knRq084AyGl VBhEwVFW8 X-Received: by 2002:a05:600c:45d1:b0:428:f79:1836 with SMTP id 5b1f17b1804b1-42c9f9d7338mr19574825e9.26.1725626093042; Fri, 06 Sep 2024 05:34:53 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:52 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Heinrich Schuchardt , Andrew Davis , Rasmus Villemoes , Sumit Garg , Bryan Brattlof , Jesse Taube , "Leon M. Busch-George" , Masahisa Kojima , Sean Anderson , Marek Vasut Subject: [PATCH v10 04/25] net: split include/net.h into net{, -common, -legacy, -lwip}.h Date: Fri, 6 Sep 2024 14:33:20 +0200 Message-Id: <1659bf55d84dd74d1237b50510467f2443c6ee62.1725625913.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 Make net.h a wrapper which includes net-common.h and either net-legacy.h or net-lwip.h based on NET_LWIP. Signed-off-by: Jerome Forissier --- Makefile | 4 +- include/net-common.h | 485 ++++++++++++++++++++++ include/net-legacy.h | 560 +++++++++++++++++++++++++ include/net-lwip.h | 14 + include/net.h | 943 +------------------------------------------ 5 files changed, 1066 insertions(+), 940 deletions(-) create mode 100644 include/net-common.h create mode 100644 include/net-legacy.h create mode 100644 include/net-lwip.h diff --git a/Makefile b/Makefile index fa22080408b..40e9829ce24 100644 --- a/Makefile +++ b/Makefile @@ -836,7 +836,9 @@ UBOOTINCLUDE := \ -I$(srctree)/arch/arm/thumb1/include)) \ -I$(srctree)/arch/$(ARCH)/include \ -include $(srctree)/include/linux/kconfig.h \ - -I$(srctree)/dts/upstream/include + -I$(srctree)/dts/upstream/include \ + $(if $(CONFIG_NET_LWIP), -I$(srctree)/lib/lwip/lwip/src/include \ + -I$(srctree)/lib/lwip/u-boot) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) diff --git a/include/net-common.h b/include/net-common.h new file mode 100644 index 00000000000..26674ec7e90 --- /dev/null +++ b/include/net-common.h @@ -0,0 +1,485 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __NET_COMMON_H__ +#define __NET_COMMON_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */ + +/* + * The number of receive packet buffers, and the required packet buffer + * alignment in memory. + * + */ +#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER +#define PKTALIGN ARCH_DMA_MINALIGN + +/* IPv4 addresses are always 32 bits in size */ +struct in_addr { + __be32 s_addr; +}; + +#define PROT_IP 0x0800 /* IP protocol */ +#define PROT_ARP 0x0806 /* IP ARP protocol */ +#define PROT_WOL 0x0842 /* ether-wake WoL protocol */ +#define PROT_RARP 0x8035 /* IP ARP protocol */ +#define PROT_VLAN 0x8100 /* IEEE 802.1q protocol */ +#define PROT_IPV6 0x86dd /* IPv6 over bluebook */ +#define PROT_PPP_SES 0x8864 /* PPPoE session messages */ +#define PROT_NCSI 0x88f8 /* NC-SI control packets */ + +#define IPPROTO_ICMP 1 /* Internet Control Message Protocol */ +#define IPPROTO_TCP 6 /* Transmission Control Protocol */ +#define IPPROTO_UDP 17 /* User Datagram Protocol */ + +#define IP_OFFS 0x1fff /* ip offset *= 8 */ +#define IP_FLAGS 0xe000 /* first 3 bits */ +#define IP_FLAGS_RES 0x8000 /* reserved */ +#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ +#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ + +#define IP_HDR_SIZE (sizeof(struct ip_hdr)) + +#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) + +/* + * Internet Protocol (IP) + UDP header. + */ +struct ip_udp_hdr { + u8 ip_hl_v; /* header length and version */ + u8 ip_tos; /* type of service */ + u16 ip_len; /* total length */ + u16 ip_id; /* identification */ + u16 ip_off; /* fragment offset field */ + u8 ip_ttl; /* time to live */ + u8 ip_p; /* protocol */ + u16 ip_sum; /* checksum */ + struct in_addr ip_src; /* Source IP address */ + struct in_addr ip_dst; /* Destination IP address */ + u16 udp_src; /* UDP source port */ + u16 udp_dst; /* UDP destination port */ + u16 udp_len; /* Length of UDP packet */ + u16 udp_xsum; /* Checksum */ +} __attribute__((packed)); + +#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr)) +#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE) + +/* Number of packets processed together */ +#define ETH_PACKETS_BATCH_RECV 32 + +/* ARP hardware address length */ +#define ARP_HLEN 6 +/* + * The size of a MAC address in string form, each digit requires two chars + * and five separator characters to form '00:00:00:00:00:00'. + */ +#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) + +#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */ + +# define ARP_ETHER 1 /* Ethernet hardware address */ + +/* + * Maximum packet size; used to allocate packet storage. Use + * the maxium Ethernet frame size as specified by the Ethernet + * standard including the 802.1Q tag (VLAN tagging). + * maximum packet size = 1522 + * maximum packet size and multiple of 32 bytes = 1536 + */ +#define PKTSIZE 1522 +#ifndef CONFIG_DM_DSA +#define PKTSIZE_ALIGN 1536 +#else +/* Maximum DSA tagging overhead (headroom and/or tailroom) */ +#define DSA_MAX_OVR 256 +#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) +#endif + +/* + * Maximum receive ring size; that is, the number of packets + * we can buffer before overflow happens. Basically, this just + * needs to be enough to prevent a packet being discarded while + * we are processing the previous one. + * Used only in drivers/net/mvgbe.c. + */ +#define RINGSZ 4 +#define RINGSZ_LOG2 2 + +extern int net_restart_wrap; /* Tried all network devices */ +extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ +extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */ +extern char net_boot_file_name[1024];/* Boot File name */ + +/** + * compute_ip_checksum() - Compute IP checksum + * + * @addr: Address to check (must be 16-bit aligned) + * @nbytes: Number of bytes to check (normally a multiple of 2) + * Return: 16-bit IP checksum + */ +unsigned compute_ip_checksum(const void *addr, unsigned nbytes); + +/** + * ip_checksum_ok() - check if a checksum is correct + * + * This works by making sure the checksum sums to 0 + * + * @addr: Address to check (must be 16-bit aligned) + * @nbytes: Number of bytes to check (normally a multiple of 2) + * Return: true if the checksum matches, false if not + */ +int ip_checksum_ok(const void *addr, unsigned nbytes); + +/** + * add_ip_checksums() - add two IP checksums + * + * @offset: Offset of first sum (if odd we do a byte-swap) + * @sum: First checksum + * @new_sum: New checksum to add + * Return: updated 16-bit IP checksum + */ +unsigned add_ip_checksums(unsigned offset, unsigned sum, unsigned new_sum); + +/* + * The devname can be either an exact name given by the driver or device tree + * or it can be an alias of the form "eth%d" + */ +struct udevice *eth_get_dev_by_name(const char *devname); +int eth_is_active(struct udevice *dev); /* Test device for active state */ + +/* + * Get the hardware address for an ethernet interface . + * Args: + * base_name - base name for device (normally "eth") + * index - device index number (0 for first) + * enetaddr - returns 6 byte hardware address + * Returns: + * Return true if the address is valid. + */ +int eth_env_get_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/* + * Initialize USB ethernet device with CONFIG_DM_ETH + * Returns: + * 0 is success, non-zero is error status. + */ +int usb_ether_init(void); + +int eth_init(void); /* Initialize the device */ +int eth_send(void *packet, int length); /* Send a packet */ +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +int eth_receive(void *packet, int length); /* Receive a packet*/ +extern void (*push_packet)(void *packet, int length); +#endif +int eth_rx(void); /* Check for received packets */ + +/** + * reset_phy() - Reset the Ethernet PHY + * + * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled + */ +void reset_phy(void); + +static inline void net_send_packet(uchar *pkt, int len) +{ + if (DEBUG_NET_PKT_TRACE) + print_hex_dump_bytes("tx: ", DUMP_PREFIX_OFFSET, pkt, len); + /* Currently no way to return errors from eth_send() */ + (void) eth_send(pkt, len); +} + +enum eth_recv_flags { + /* + * Check hardware device for new packets (otherwise only return those + * which are already in the memory buffer ready to process) + */ + ETH_RECV_CHECK_DEVICE = 1 << 0, +}; + +/** + * struct eth_ops - functions of Ethernet MAC controllers + * + * start: Prepare the hardware to send and receive packets + * send: Send the bytes passed in "packet" as a packet on the wire + * recv: Check if the hardware received a packet. If so, set the pointer to the + * packet buffer in the packetp parameter. If not, return an error or 0 to + * indicate that the hardware receive FIFO is empty. If 0 is returned, the + * network stack will not process the empty packet, but free_pkt() will be + * called if supplied + * free_pkt: Give the driver an opportunity to manage its packet buffer memory + * when the network stack is finished processing it. This will only be + * called when no error was returned from recv - optional + * stop: Stop the hardware from looking for packets - may be called even if + * state == PASSIVE + * mcast: Join or leave a multicast group (for TFTP) - optional + * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux + * on some platforms like ARM). This function expects the + * eth_pdata::enetaddr field to be populated. The method can + * return -ENOSYS to indicate that this is not implemented for + this hardware - optional. + * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a + * ROM on the board. This is how the driver should expose it + * to the network stack. This function should fill in the + * eth_pdata::enetaddr field - optional + * set_promisc: Enable or Disable promiscuous mode + * get_sset_count: Number of statistics counters + * get_string: Names of the statistic counters + * get_stats: The values of the statistic counters + */ +struct eth_ops { + int (*start)(struct udevice *dev); + int (*send)(struct udevice *dev, void *packet, int length); + int (*recv)(struct udevice *dev, int flags, uchar **packetp); + int (*free_pkt)(struct udevice *dev, uchar *packet, int length); + void (*stop)(struct udevice *dev); + int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join); + int (*write_hwaddr)(struct udevice *dev); + int (*read_rom_hwaddr)(struct udevice *dev); + int (*set_promisc)(struct udevice *dev, bool enable); + int (*get_sset_count)(struct udevice *dev); + void (*get_strings)(struct udevice *dev, u8 *data); + void (*get_stats)(struct udevice *dev, u64 *data); +}; + +#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops) + +struct udevice *eth_get_dev(void); /* get the current device */ +unsigned char *eth_get_ethaddr(void); /* get the current device MAC */ +int eth_rx(void); /* Check for received packets */ +void eth_halt(void); /* stop SCC */ +const char *eth_get_name(void); /* get name of current device */ +int eth_get_dev_index(void); + +int eth_initialize(void); /* Initialize network subsystem */ +void eth_try_another(int first_restart); /* Change the device */ +void eth_set_current(void); /* set nterface to ethcur var */ + +enum eth_state_t { + ETH_STATE_INIT, + ETH_STATE_PASSIVE, + ETH_STATE_ACTIVE +}; + +/** + * struct eth_pdata - Platform data for Ethernet MAC controllers + * + * @iobase: The base address of the hardware registers + * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env + * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... + * @max_speed: Maximum speed of Ethernet connection supported by MAC + * @priv_pdata: device specific plat + */ +struct eth_pdata { + phys_addr_t iobase; + unsigned char enetaddr[ARP_HLEN]; + int phy_interface; + int max_speed; + void *priv_pdata; +}; + +struct ethernet_hdr { + u8 et_dest[ARP_HLEN]; /* Destination node */ + u8 et_src[ARP_HLEN]; /* Source node */ + u16 et_protlen; /* Protocol or length */ +} __attribute__((packed)); + +/* Ethernet header size */ +#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) + +/** + * net_random_ethaddr - Generate software assigned random Ethernet address + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Generate a random Ethernet address (MAC) that is not multicast + * and has the local assigned bit set. + */ +static inline void net_random_ethaddr(uchar *addr) +{ + int i; + unsigned int seed = get_ticks(); + + for (i = 0; i < 6; i++) + addr[i] = rand_r(&seed); + + addr[0] &= 0xfe; /* clear multicast bit */ + addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ +} + +/** + * is_zero_ethaddr - Determine if give Ethernet address is all zeros. + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is all zeroes. + */ +static inline int is_zero_ethaddr(const u8 *addr) +{ + return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); +} + +/** + * is_multicast_ethaddr - Determine if the Ethernet address is a multicast. + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is a multicast address. + * By definition the broadcast address is also a multicast address. + */ +static inline int is_multicast_ethaddr(const u8 *addr) +{ + return 0x01 & addr[0]; +} + +/* + * is_broadcast_ethaddr - Determine if the Ethernet address is broadcast + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is the broadcast address. + */ +static inline int is_broadcast_ethaddr(const u8 *addr) +{ + return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == + 0xff; +} + +/* + * is_valid_ethaddr - Determine if the given Ethernet address is valid + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not + * a multicast address, and is not FF:FF:FF:FF:FF:FF. + * + * Return true if the address is valid. + */ +static inline int is_valid_ethaddr(const u8 *addr) +{ + /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to + * explicitly check for it here. */ + return !is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr); +} + +/** + * string_to_enetaddr() - Parse a MAC address + * + * Convert a string MAC address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit + * hex value + * @enetaddr: Place to put MAC address (6 bytes) + */ +void string_to_enetaddr(const char *addr, uint8_t *enetaddr); + +/** + * string_to_ip() - Convert a string to ip address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @s: Input string to parse + * @return: in_addr struct containing the parsed IP address + */ +struct in_addr string_to_ip(const char *s); + +/* copy a filename (allow for "..." notation, limit length) */ +void copy_filename(char *dst, const char *src, int size); + +/* Processes a received packet */ +void net_process_received_packet(uchar *in_packet, int len); + +/** + * update_tftp - Update firmware over TFTP (via DFU) + * + * This function updates board's firmware via TFTP + * + * @param addr - memory address where data is stored + * @param interface - the DFU medium name - e.g. "mmc" + * @param devstring - the DFU medium number - e.g. "1" + * + * Return: - 0 on success, other value on failure + */ +int update_tftp(ulong addr, char *interface, char *devstring); + +/** + * env_get_ip() - Convert an environment value to to an ip address + * + * @var: Environment variable to convert. The value of this variable must be + * in the format format a.b.c.d, where each value is a decimal number from + * 0 to 255 + * Return: IP address, or 0 if invalid + */ +static inline struct in_addr env_get_ip(char *var) +{ + return string_to_ip(env_get(var)); +} + +int net_init(void); + +/** + * dhcp_run() - Run DHCP on the current ethernet device + * + * This sets the autoload variable, then puts it back to similar to its original + * state (y, n or unset). + * + * @addr: Address to load the file into (0 if @autoload is false) + * @fname: Filename of file to load (NULL if @autoload is false or to use the + * default filename) + * @autoload: true to load the file, false to just get the network IP + * @return 0 if OK, -EINVAL if the environment failed, -ENOENT if ant file was + * not found + */ +int dhcp_run(ulong addr, const char *fname, bool autoload); + +/** + * do_tftpb - Run the tftpboot command + * + * @cmdtp: Command information for tftpboot + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * Return: result (see enum command_ret_t) + */ +int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + +/** + * wget_with_dns() - runs dns host IP address resulution before wget + * + * @dst_addr: destination address to download the file + * @uri: uri string of target file of wget + * Return: downloaded file size, negative if failed + */ +int wget_with_dns(ulong dst_addr, char *uri); +/** + * wget_validate_uri() - varidate the uri + * + * @uri: uri string of target file of wget + * Return: true if uri is valid, false if uri is invalid + */ +bool wget_validate_uri(char *uri); +//int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); + +#endif /* __NET_COMMON_H__ */ diff --git a/include/net-legacy.h b/include/net-legacy.h new file mode 100644 index 00000000000..b5972deee31 --- /dev/null +++ b/include/net-legacy.h @@ -0,0 +1,560 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * LiMon Monitor (LiMon) - Network. + * + * Copyright 1994 - 2000 Neil Russell. + * (See License) + * + * History + * 9/16/00 bor adapted to TQM823L/STK8xxL board, RARP/TFTP boot added + */ + +#ifndef __NET_LEGACY_H__ +#define __NET_LEGACY_H__ + +#include +#include /* for nton* / ntoh* stuff */ +#include +#include +#include + +struct bd_info; +struct cmd_tbl; +struct udevice; + +#define DEBUG_LL_STATE 0 /* Link local state machine changes */ +#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ +#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ +#define DEBUG_INT_STATE 0 /* Internal network state changes */ + +/* ARP hardware address length */ +#define ARP_HLEN 6 +/* + * The size of a MAC address in string form, each digit requires two chars + * and five separator characters to form '00:00:00:00:00:00'. + */ +#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) + +/** + * An incoming packet handler. + * @param pkt pointer to the application packet + * @param dport destination UDP port + * @param sip source IP address + * @param sport source UDP port + * @param len packet length + */ +typedef void rxhand_f(uchar *pkt, unsigned dport, + struct in_addr sip, unsigned sport, + unsigned len); + +/** + * An incoming ICMP packet handler. + * @param type ICMP type + * @param code ICMP code + * @param dport destination UDP port + * @param sip source IP address + * @param sport source UDP port + * @param pkt pointer to the ICMP packet data + * @param len packet length + */ +typedef void rxhand_icmp_f(unsigned type, unsigned code, unsigned dport, + struct in_addr sip, unsigned sport, uchar *pkt, unsigned len); + +/* + * A timeout handler. Called after time interval has expired. + */ +typedef void thand_f(void); + +/* + * The devname can be either an exact name given by the driver or device tree + * or it can be an alias of the form "eth%d" + */ +struct udevice *eth_get_dev_by_name(const char *devname); +int eth_init_state_only(void); /* Set active state */ +void eth_halt_state_only(void); /* Set passive state */ + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/* + * Get the hardware address for an ethernet interface . + * Args: + * base_name - base name for device (normally "eth") + * index - device index number (0 for first) + * enetaddr - returns 6 byte hardware address + * Returns: + * Return true if the address is valid. + */ +int eth_env_get_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +int eth_send(void *packet, int length); /* Send a packet */ + +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +int eth_receive(void *packet, int length); /* Receive a packet*/ +extern void (*push_packet)(void *packet, int length); +#endif +int eth_mcast_join(struct in_addr mcast_addr, int join); + +/**********************************************************************/ +/* + * Protocol headers. + */ + +#define ETH_FCS_LEN 4 /* Octets in the FCS */ + +struct e802_hdr { + u8 et_dest[ARP_HLEN]; /* Destination node */ + u8 et_src[ARP_HLEN]; /* Source node */ + u16 et_protlen; /* Protocol or length */ + u8 et_dsap; /* 802 DSAP */ + u8 et_ssap; /* 802 SSAP */ + u8 et_ctl; /* 802 control */ + u8 et_snap1; /* SNAP */ + u8 et_snap2; + u8 et_snap3; + u16 et_prot; /* 802 protocol */ +} __attribute__((packed)); + +/* 802 + SNAP + ethernet header size */ +#define E802_HDR_SIZE (sizeof(struct e802_hdr)) + +/* + * Virtual LAN Ethernet header + */ +struct vlan_ethernet_hdr { + u8 vet_dest[ARP_HLEN]; /* Destination node */ + u8 vet_src[ARP_HLEN]; /* Source node */ + u16 vet_vlan_type; /* PROT_VLAN */ + u16 vet_tag; /* TAG of VLAN */ + u16 vet_type; /* protocol type */ +} __attribute__((packed)); + +/* VLAN Ethernet header size */ +#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr)) + +/* + * Internet Protocol (IP) header. + */ +struct ip_hdr { + u8 ip_hl_v; /* header length and version */ + u8 ip_tos; /* type of service */ + u16 ip_len; /* total length */ + u16 ip_id; /* identification */ + u16 ip_off; /* fragment offset field */ + u8 ip_ttl; /* time to live */ + u8 ip_p; /* protocol */ + u16 ip_sum; /* checksum */ + struct in_addr ip_src; /* Source IP address */ + struct in_addr ip_dst; /* Destination IP address */ +} __attribute__((packed)); + +#define IP_OFFS 0x1fff /* ip offset *= 8 */ +#define IP_FLAGS 0xe000 /* first 3 bits */ +#define IP_FLAGS_RES 0x8000 /* reserved */ +#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ +#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ + +#define IP_HDR_SIZE (sizeof(struct ip_hdr)) + +#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) + +/* + * Address Resolution Protocol (ARP) header. + */ +struct arp_hdr { + u16 ar_hrd; /* Format of hardware address */ +# define ARP_ETHER 1 /* Ethernet hardware address */ + u16 ar_pro; /* Format of protocol address */ + u8 ar_hln; /* Length of hardware address */ + u8 ar_pln; /* Length of protocol address */ +# define ARP_PLEN 4 + u16 ar_op; /* Operation */ +# define ARPOP_REQUEST 1 /* Request to resolve address */ +# define ARPOP_REPLY 2 /* Response to previous request */ + +# define RARPOP_REQUEST 3 /* Request to resolve address */ +# define RARPOP_REPLY 4 /* Response to previous request */ + + /* + * The remaining fields are variable in size, according to + * the sizes above, and are defined as appropriate for + * specific hardware/protocol combinations. + */ + u8 ar_data[0]; +#define ar_sha ar_data[0] +#define ar_spa ar_data[ARP_HLEN] +#define ar_tha ar_data[ARP_HLEN + ARP_PLEN] +#define ar_tpa ar_data[ARP_HLEN + ARP_PLEN + ARP_HLEN] +#if 0 + u8 ar_sha[]; /* Sender hardware address */ + u8 ar_spa[]; /* Sender protocol address */ + u8 ar_tha[]; /* Target hardware address */ + u8 ar_tpa[]; /* Target protocol address */ +#endif /* 0 */ +} __attribute__((packed)); + + +/* + * ICMP stuff (just enough to handle (host) redirect messages) + */ +#define ICMP_ECHO_REPLY 0 /* Echo reply */ +#define ICMP_NOT_REACH 3 /* Detination unreachable */ +#define ICMP_REDIRECT 5 /* Redirect (change route) */ +#define ICMP_ECHO_REQUEST 8 /* Echo request */ + +/* Codes for REDIRECT. */ +#define ICMP_REDIR_NET 0 /* Redirect Net */ +#define ICMP_REDIR_HOST 1 /* Redirect Host */ + +/* Codes for NOT_REACH */ +#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */ + +struct icmp_hdr { + u8 type; + u8 code; + u16 checksum; + union { + struct { + u16 id; + u16 sequence; + } echo; + u32 gateway; + struct { + u16 unused; + u16 mtu; + } frag; + u8 data[0]; + } un; +} __attribute__((packed)); + +#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr)) +#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE) + +/* + * Maximum packet size; used to allocate packet storage. Use + * the maxium Ethernet frame size as specified by the Ethernet + * standard including the 802.1Q tag (VLAN tagging). + * maximum packet size = 1522 + * maximum packet size and multiple of 32 bytes = 1536 + */ +#define PKTSIZE 1522 +#ifndef CONFIG_DM_DSA +#define PKTSIZE_ALIGN 1536 +#else +/* Maximum DSA tagging overhead (headroom and/or tailroom) */ +#define DSA_MAX_OVR 256 +#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) +#endif + +/**********************************************************************/ +/* + * Globals. + * + * Note: + * + * All variables of type struct in_addr are stored in NETWORK byte order + * (big endian). + */ + +/* net.c */ +/** BOOTP EXTENTIONS **/ +extern struct in_addr net_gateway; /* Our gateway IP address */ +extern struct in_addr net_netmask; /* Our subnet mask (0 = unknown) */ +/* Our Domain Name Server (0 = unknown) */ +extern struct in_addr net_dns_server; +#if defined(CONFIG_BOOTP_DNS2) +/* Our 2nd Domain Name Server (0 = unknown) */ +extern struct in_addr net_dns_server2; +#endif +extern char net_nis_domain[32]; /* Our IS domain */ +extern char net_hostname[32]; /* Our hostname */ +#ifdef CONFIG_NET +extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */ +#endif +/* Indicates whether the pxe path prefix / config file was specified in dhcp option */ +extern char *pxelinux_configfile; +/** END OF BOOTP EXTENTIONS **/ +extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */ +extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */ +extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */ +extern struct in_addr net_server_ip; /* Server IP addr (0 = unknown) */ +extern uchar *net_tx_packet; /* THE transmit packet */ +extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ +extern uchar *net_rx_packet; /* Current receive packet */ +extern int net_rx_packet_len; /* Current rx packet length */ +extern const u8 net_null_ethaddr[ARP_HLEN]; + +#define VLAN_NONE 4095 /* untagged */ +#define VLAN_IDMASK 0x0fff /* mask of valid vlan id */ +extern ushort net_our_vlan; /* Our VLAN */ +extern ushort net_native_vlan; /* Our Native VLAN */ + +extern int net_restart_wrap; /* Tried all network devices */ + +enum proto_t { + BOOTP, RARP, ARP, TFTPGET, DHCP, DHCP6, PING, PING6, DNS, NFS, CDP, + NETCONS, SNTP, TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT_UDP, FASTBOOT_TCP, + WOL, UDP, NCSI, WGET, RS +}; +/* Indicates whether the file name was specified on the command line */ +extern bool net_boot_file_name_explicit; +/* The actual transferred size of the bootfile (in bytes) */ +extern u32 net_boot_file_size; +/* Boot file size in blocks as reported by the DHCP server */ +extern u32 net_boot_file_expected_size_in_blocks; + +#if defined(CONFIG_CMD_DNS) +extern char *net_dns_resolve; /* The host to resolve */ +extern char *net_dns_env_var; /* the env var to put the ip into */ +#endif + +#if defined(CONFIG_CMD_PING) +extern struct in_addr net_ping_ip; /* the ip address to ping */ +#endif + +#if defined(CONFIG_CMD_CDP) +/* when CDP completes these hold the return values */ +extern ushort cdp_native_vlan; /* CDP returned native VLAN */ +extern ushort cdp_appliance_vlan; /* CDP returned appliance VLAN */ + +/* + * Check for a CDP packet by examining the received MAC address field + */ +static inline int is_cdp_packet(const uchar *ethaddr) +{ + extern const u8 net_cdp_ethaddr[ARP_HLEN]; + + return memcmp(ethaddr, net_cdp_ethaddr, ARP_HLEN) == 0; +} +#endif + +#if defined(CONFIG_CMD_SNTP) +extern struct in_addr net_ntp_server; /* the ip address to NTP */ +extern int net_ntp_time_offset; /* offset time from UTC */ +#endif + +int net_loop(enum proto_t); + +/* Load failed. Start again. */ +int net_start_again(void); + +/* Get size of the ethernet header when we send */ +int net_eth_hdr_size(void); + +/* Set ethernet header; returns the size of the header */ +int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot); +int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot); + +/* Set IP header */ +void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source, + u16 pkt_len, u8 proto); +void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, + int sport, int len); + +/* Callbacks */ +rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */ +void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */ +rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */ +void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */ +bool arp_is_waiting(void); /* Waiting for ARP reply? */ +void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ +void net_set_timeout_handler(ulong, thand_f *);/* Set timeout handler */ + +/* Network loop state */ +enum net_loop_state { + NETLOOP_CONTINUE, + NETLOOP_RESTART, + NETLOOP_SUCCESS, + NETLOOP_FAIL +}; +extern enum net_loop_state net_state; + +static inline void net_set_state(enum net_loop_state state) +{ + debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); + net_state = state; +} + +/* + * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for + * sending an asynchronous reply + * + * returns - ptr to packet buffer + */ +uchar * net_get_async_tx_pkt_buf(void); + +/** + * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, + * send ARP request if needed (ether will be populated) + * @ether: Raw packet buffer + * @dest: IP address to send the datagram to + * @dport: Destination UDP port + * @sport: Source UDP port + * @payload_len: Length of data after the UDP header + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, + int payload_len, int proto, u8 action, u32 tcp_seq_num, + u32 tcp_ack_num); +/** + * net_send_tcp_packet() - Transmit TCP packet. + * @payload_len: length of payload + * @dport: Destination TCP port + * @sport: Source TCP port + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, + u32 tcp_seq_num, u32 tcp_ack_num); +int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, + int sport, int payload_len); + +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) +void nc_start(void); +int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port, + unsigned src_port, unsigned len); +#endif + +static __always_inline int eth_is_on_demand_init(void) +{ +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) + extern enum proto_t net_loop_last_protocol; + + return net_loop_last_protocol != NETCONS; +#else + return 1; +#endif +} + +static inline void eth_set_last_protocol(int protocol) +{ +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) + extern enum proto_t net_loop_last_protocol; + + net_loop_last_protocol = protocol; +#endif +} + +/* + * Check if autoload is enabled. If so, use either NFS or TFTP to download + * the boot file. + */ +void net_auto_load(void); + +/* + * The following functions are a bit ugly, but necessary to deal with + * alignment restrictions on ARM. + * + * We're using inline functions, which had the smallest memory + * footprint in our tests. + */ +/* return IP *in network byteorder* */ +static inline struct in_addr net_read_ip(void *from) +{ + struct in_addr ip; + + memcpy((void *)&ip, (void *)from, sizeof(ip)); + return ip; +} + +/* return ulong *in network byteorder* */ +static inline u32 net_read_u32(void *from) +{ + u32 l; + + memcpy((void *)&l, (void *)from, sizeof(l)); + return l; +} + +/* write IP *in network byteorder* */ +static inline void net_write_ip(void *to, struct in_addr ip) +{ + memcpy(to, (void *)&ip, sizeof(ip)); +} + +/* copy IP */ +static inline void net_copy_ip(void *to, void *from) +{ + memcpy((void *)to, from, sizeof(struct in_addr)); +} + +/* copy ulong */ +static inline void net_copy_u32(void *to, void *from) +{ + memcpy((void *)to, (void *)from, sizeof(u32)); +} + +/* Convert an IP address to a string */ +void ip_to_string(struct in_addr x, char *s); + +/** + * string_to_ip() - Convert a string to ip address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @s: Input string to parse + * @return: in_addr struct containing the parsed IP address + */ +struct in_addr string_to_ip(const char *s); + +/* Convert a VLAN id to a string */ +void vlan_to_string(ushort x, char *s); + +/* Convert a string to a vlan id */ +ushort string_to_vlan(const char *s); + +/* read a VLAN id from an environment variable */ +ushort env_get_vlan(char *); + +/* check if serverip is specified in filename from the command line */ +int is_serverip_in_cmd(void); + +/** + * net_parse_bootfile - Parse the bootfile env var / cmd line param + * + * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile + * @param filename - a pointer to the string to save the filename part + * @param max_len - The longest - 1 that the filename part can be + * + * return 1 if parsed, 0 if bootfile is empty + */ +int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len); + +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +/** + * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs + * + * These get in the way of bootstd testing, so are normally disabled by tests. + * This provide control of this setting. It only affects binding of Ethernet + * devices, so if that has already happened, this flag does nothing. + * + * @enable: true to enable binding of bootdevs when binding new Ethernet + * devices, false to disable it + */ +void eth_set_enable_bootdevs(bool enable); +#else +static inline void eth_set_enable_bootdevs(bool enable) {} +#endif + +#endif /* __NET_LEGACY_H__ */ diff --git a/include/net-lwip.h b/include/net-lwip.h new file mode 100644 index 00000000000..5c3f9e7e86c --- /dev/null +++ b/include/net-lwip.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __NET_LWIP_H__ +#define __NET_LWIP_H__ + +#include +#include + +struct netif *net_lwip_new_netif(struct udevice *udev); +struct netif *net_lwip_new_netif_noip(struct udevice *udev); +void net_lwip_remove_netif(struct netif *netif); +struct netif *net_lwip_get_netif(void); + +#endif /* __NET_LWIP_H__ */ diff --git a/include/net.h b/include/net.h index bb2ae20f52a..afa46f239ee 100644 --- a/include/net.h +++ b/include/net.h @@ -1,949 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * LiMon Monitor (LiMon) - Network. - * - * Copyright 1994 - 2000 Neil Russell. - * (See License) - * - * History - * 9/16/00 bor adapted to TQM823L/STK8xxL board, RARP/TFTP boot added - */ #ifndef __NET_H__ #define __NET_H__ -#include -#include -#include /* for nton* / ntoh* stuff */ -#include -#include -#include -#include -#include -#include +#include -struct bd_info; -struct cmd_tbl; -struct udevice; - -#define DEBUG_LL_STATE 0 /* Link local state machine changes */ -#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ -#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ -#define DEBUG_INT_STATE 0 /* Internal network state changes */ -#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */ - -/* - * The number of receive packet buffers, and the required packet buffer - * alignment in memory. - * - */ -#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER -#define PKTALIGN ARCH_DMA_MINALIGN - -/* Number of packets processed together */ -#define ETH_PACKETS_BATCH_RECV 32 - -/* ARP hardware address length */ -#define ARP_HLEN 6 -/* - * The size of a MAC address in string form, each digit requires two chars - * and five separator characters to form '00:00:00:00:00:00'. - */ -#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) - -/* IPv4 addresses are always 32 bits in size */ -struct in_addr { - __be32 s_addr; -}; - -/** - * do_tftpb - Run the tftpboot command - * - * @cmdtp: Command information for tftpboot - * @flag: Command flags (CMD_FLAG_...) - * @argc: Number of arguments - * @argv: List of arguments - * Return: result (see enum command_ret_t) - */ -int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); - -/** - * dhcp_run() - Run DHCP on the current ethernet device - * - * This sets the autoload variable, then puts it back to similar to its original - * state (y, n or unset). - * - * @addr: Address to load the file into (0 if @autoload is false) - * @fname: Filename of file to load (NULL if @autoload is false or to use the - * default filename) - * @autoload: true to load the file, false to just get the network IP - * @return 0 if OK, -EINVAL if the environment failed, -ENOENT if ant file was - * not found - */ -int dhcp_run(ulong addr, const char *fname, bool autoload); - -/** - * An incoming packet handler. - * @param pkt pointer to the application packet - * @param dport destination UDP port - * @param sip source IP address - * @param sport source UDP port - * @param len packet length - */ -typedef void rxhand_f(uchar *pkt, unsigned dport, - struct in_addr sip, unsigned sport, - unsigned len); - -/** - * An incoming ICMP packet handler. - * @param type ICMP type - * @param code ICMP code - * @param dport destination UDP port - * @param sip source IP address - * @param sport source UDP port - * @param pkt pointer to the ICMP packet data - * @param len packet length - */ -typedef void rxhand_icmp_f(unsigned type, unsigned code, unsigned dport, - struct in_addr sip, unsigned sport, uchar *pkt, unsigned len); - -/* - * A timeout handler. Called after time interval has expired. - */ -typedef void thand_f(void); - -enum eth_state_t { - ETH_STATE_INIT, - ETH_STATE_PASSIVE, - ETH_STATE_ACTIVE -}; - -/** - * struct eth_pdata - Platform data for Ethernet MAC controllers - * - * @iobase: The base address of the hardware registers - * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env - * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... - * @max_speed: Maximum speed of Ethernet connection supported by MAC - * @priv_pdata: device specific plat - */ -struct eth_pdata { - phys_addr_t iobase; - unsigned char enetaddr[ARP_HLEN]; - int phy_interface; - int max_speed; - void *priv_pdata; -}; - -enum eth_recv_flags { - /* - * Check hardware device for new packets (otherwise only return those - * which are already in the memory buffer ready to process) - */ - ETH_RECV_CHECK_DEVICE = 1 << 0, -}; - -/** - * struct eth_ops - functions of Ethernet MAC controllers - * - * start: Prepare the hardware to send and receive packets - * send: Send the bytes passed in "packet" as a packet on the wire - * recv: Check if the hardware received a packet. If so, set the pointer to the - * packet buffer in the packetp parameter. If not, return an error or 0 to - * indicate that the hardware receive FIFO is empty. If 0 is returned, the - * network stack will not process the empty packet, but free_pkt() will be - * called if supplied - * free_pkt: Give the driver an opportunity to manage its packet buffer memory - * when the network stack is finished processing it. This will only be - * called when no error was returned from recv - optional - * stop: Stop the hardware from looking for packets - may be called even if - * state == PASSIVE - * mcast: Join or leave a multicast group (for TFTP) - optional - * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux - * on some platforms like ARM). This function expects the - * eth_pdata::enetaddr field to be populated. The method can - * return -ENOSYS to indicate that this is not implemented for - this hardware - optional. - * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a - * ROM on the board. This is how the driver should expose it - * to the network stack. This function should fill in the - * eth_pdata::enetaddr field - optional - * set_promisc: Enable or Disable promiscuous mode - * get_sset_count: Number of statistics counters - * get_string: Names of the statistic counters - * get_stats: The values of the statistic counters - */ -struct eth_ops { - int (*start)(struct udevice *dev); - int (*send)(struct udevice *dev, void *packet, int length); - int (*recv)(struct udevice *dev, int flags, uchar **packetp); - int (*free_pkt)(struct udevice *dev, uchar *packet, int length); - void (*stop)(struct udevice *dev); - int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join); - int (*write_hwaddr)(struct udevice *dev); - int (*read_rom_hwaddr)(struct udevice *dev); - int (*set_promisc)(struct udevice *dev, bool enable); - int (*get_sset_count)(struct udevice *dev); - void (*get_strings)(struct udevice *dev, u8 *data); - void (*get_stats)(struct udevice *dev, u64 *data); -}; - -#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops) - -struct udevice *eth_get_dev(void); /* get the current device */ -/* - * The devname can be either an exact name given by the driver or device tree - * or it can be an alias of the form "eth%d" - */ -struct udevice *eth_get_dev_by_name(const char *devname); -unsigned char *eth_get_ethaddr(void); /* get the current device MAC */ - -/* Used only when NetConsole is enabled */ -int eth_is_active(struct udevice *dev); /* Test device for active state */ -int eth_init_state_only(void); /* Set active state */ -void eth_halt_state_only(void); /* Set passive state */ - -int eth_initialize(void); /* Initialize network subsystem */ -void eth_try_another(int first_restart); /* Change the device */ -void eth_set_current(void); /* set nterface to ethcur var */ - -int eth_get_dev_index(void); /* get the device index */ - -/** - * eth_env_set_enetaddr_by_index() - set the MAC address environment variable - * - * This sets up an environment variable with the given MAC address (@enetaddr). - * The environment variable to be set is defined by <@base_name><@index>addr. - * If @index is 0 it is omitted. For common Ethernet this means ethaddr, - * eth1addr, etc. - * - * @base_name: Base name for variable, typically "eth" - * @index: Index of interface being updated (>=0) - * @enetaddr: Pointer to MAC address to put into the variable - * Return: 0 if OK, other value on error - */ -int eth_env_set_enetaddr_by_index(const char *base_name, int index, - uchar *enetaddr); - -/* - * Initialize USB ethernet device with CONFIG_DM_ETH - * Returns: - * 0 is success, non-zero is error status. - */ -int usb_ether_init(void); - -/* - * Get the hardware address for an ethernet interface . - * Args: - * base_name - base name for device (normally "eth") - * index - device index number (0 for first) - * enetaddr - returns 6 byte hardware address - * Returns: - * Return true if the address is valid. - */ -int eth_env_get_enetaddr_by_index(const char *base_name, int index, - uchar *enetaddr); - -int eth_init(void); /* Initialize the device */ -int eth_send(void *packet, int length); /* Send a packet */ - -#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) -int eth_receive(void *packet, int length); /* Receive a packet*/ -extern void (*push_packet)(void *packet, int length); -#endif -int eth_rx(void); /* Check for received packets */ -void eth_halt(void); /* stop SCC */ -const char *eth_get_name(void); /* get name of current device */ -int eth_mcast_join(struct in_addr mcast_addr, int join); - -/**********************************************************************/ -/* - * Protocol headers. - */ - -/* - * Ethernet header - */ - -struct ethernet_hdr { - u8 et_dest[ARP_HLEN]; /* Destination node */ - u8 et_src[ARP_HLEN]; /* Source node */ - u16 et_protlen; /* Protocol or length */ -} __attribute__((packed)); - -/* Ethernet header size */ -#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) - -#define ETH_FCS_LEN 4 /* Octets in the FCS */ - -struct e802_hdr { - u8 et_dest[ARP_HLEN]; /* Destination node */ - u8 et_src[ARP_HLEN]; /* Source node */ - u16 et_protlen; /* Protocol or length */ - u8 et_dsap; /* 802 DSAP */ - u8 et_ssap; /* 802 SSAP */ - u8 et_ctl; /* 802 control */ - u8 et_snap1; /* SNAP */ - u8 et_snap2; - u8 et_snap3; - u16 et_prot; /* 802 protocol */ -} __attribute__((packed)); - -/* 802 + SNAP + ethernet header size */ -#define E802_HDR_SIZE (sizeof(struct e802_hdr)) - -/* - * Virtual LAN Ethernet header - */ -struct vlan_ethernet_hdr { - u8 vet_dest[ARP_HLEN]; /* Destination node */ - u8 vet_src[ARP_HLEN]; /* Source node */ - u16 vet_vlan_type; /* PROT_VLAN */ - u16 vet_tag; /* TAG of VLAN */ - u16 vet_type; /* protocol type */ -} __attribute__((packed)); - -/* VLAN Ethernet header size */ -#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr)) - -#define PROT_IP 0x0800 /* IP protocol */ -#define PROT_ARP 0x0806 /* IP ARP protocol */ -#define PROT_WOL 0x0842 /* ether-wake WoL protocol */ -#define PROT_RARP 0x8035 /* IP ARP protocol */ -#define PROT_VLAN 0x8100 /* IEEE 802.1q protocol */ -#define PROT_IPV6 0x86dd /* IPv6 over bluebook */ -#define PROT_PPP_SES 0x8864 /* PPPoE session messages */ -#define PROT_NCSI 0x88f8 /* NC-SI control packets */ - -#define IPPROTO_ICMP 1 /* Internet Control Message Protocol */ -#define IPPROTO_TCP 6 /* Transmission Control Protocol */ -#define IPPROTO_UDP 17 /* User Datagram Protocol */ - -/* - * Internet Protocol (IP) header. - */ -struct ip_hdr { - u8 ip_hl_v; /* header length and version */ - u8 ip_tos; /* type of service */ - u16 ip_len; /* total length */ - u16 ip_id; /* identification */ - u16 ip_off; /* fragment offset field */ - u8 ip_ttl; /* time to live */ - u8 ip_p; /* protocol */ - u16 ip_sum; /* checksum */ - struct in_addr ip_src; /* Source IP address */ - struct in_addr ip_dst; /* Destination IP address */ -} __attribute__((packed)); - -#define IP_OFFS 0x1fff /* ip offset *= 8 */ -#define IP_FLAGS 0xe000 /* first 3 bits */ -#define IP_FLAGS_RES 0x8000 /* reserved */ -#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ -#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ - -#define IP_HDR_SIZE (sizeof(struct ip_hdr)) - -#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) - -/* - * Internet Protocol (IP) + UDP header. - */ -struct ip_udp_hdr { - u8 ip_hl_v; /* header length and version */ - u8 ip_tos; /* type of service */ - u16 ip_len; /* total length */ - u16 ip_id; /* identification */ - u16 ip_off; /* fragment offset field */ - u8 ip_ttl; /* time to live */ - u8 ip_p; /* protocol */ - u16 ip_sum; /* checksum */ - struct in_addr ip_src; /* Source IP address */ - struct in_addr ip_dst; /* Destination IP address */ - u16 udp_src; /* UDP source port */ - u16 udp_dst; /* UDP destination port */ - u16 udp_len; /* Length of UDP packet */ - u16 udp_xsum; /* Checksum */ -} __attribute__((packed)); - -#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr)) -#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE) - -/* - * Address Resolution Protocol (ARP) header. - */ -struct arp_hdr { - u16 ar_hrd; /* Format of hardware address */ -# define ARP_ETHER 1 /* Ethernet hardware address */ - u16 ar_pro; /* Format of protocol address */ - u8 ar_hln; /* Length of hardware address */ - u8 ar_pln; /* Length of protocol address */ -# define ARP_PLEN 4 - u16 ar_op; /* Operation */ -# define ARPOP_REQUEST 1 /* Request to resolve address */ -# define ARPOP_REPLY 2 /* Response to previous request */ - -# define RARPOP_REQUEST 3 /* Request to resolve address */ -# define RARPOP_REPLY 4 /* Response to previous request */ - - /* - * The remaining fields are variable in size, according to - * the sizes above, and are defined as appropriate for - * specific hardware/protocol combinations. - */ - u8 ar_data[0]; -#define ar_sha ar_data[0] -#define ar_spa ar_data[ARP_HLEN] -#define ar_tha ar_data[ARP_HLEN + ARP_PLEN] -#define ar_tpa ar_data[ARP_HLEN + ARP_PLEN + ARP_HLEN] -#if 0 - u8 ar_sha[]; /* Sender hardware address */ - u8 ar_spa[]; /* Sender protocol address */ - u8 ar_tha[]; /* Target hardware address */ - u8 ar_tpa[]; /* Target protocol address */ -#endif /* 0 */ -} __attribute__((packed)); - -#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */ - -/* - * ICMP stuff (just enough to handle (host) redirect messages) - */ -#define ICMP_ECHO_REPLY 0 /* Echo reply */ -#define ICMP_NOT_REACH 3 /* Detination unreachable */ -#define ICMP_REDIRECT 5 /* Redirect (change route) */ -#define ICMP_ECHO_REQUEST 8 /* Echo request */ - -/* Codes for REDIRECT. */ -#define ICMP_REDIR_NET 0 /* Redirect Net */ -#define ICMP_REDIR_HOST 1 /* Redirect Host */ - -/* Codes for NOT_REACH */ -#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */ - -struct icmp_hdr { - u8 type; - u8 code; - u16 checksum; - union { - struct { - u16 id; - u16 sequence; - } echo; - u32 gateway; - struct { - u16 unused; - u16 mtu; - } frag; - u8 data[0]; - } un; -} __attribute__((packed)); - -#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr)) -#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE) - -/* - * Maximum packet size; used to allocate packet storage. Use - * the maxium Ethernet frame size as specified by the Ethernet - * standard including the 802.1Q tag (VLAN tagging). - * maximum packet size = 1522 - * maximum packet size and multiple of 32 bytes = 1536 - */ -#define PKTSIZE 1522 -#ifndef CONFIG_DM_DSA -#define PKTSIZE_ALIGN 1536 +#if defined(CONFIG_NET_LWIP) +#include #else -/* Maximum DSA tagging overhead (headroom and/or tailroom) */ -#define DSA_MAX_OVR 256 -#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) -#endif - -/* - * Maximum receive ring size; that is, the number of packets - * we can buffer before overflow happens. Basically, this just - * needs to be enough to prevent a packet being discarded while - * we are processing the previous one. - */ -#define RINGSZ 4 -#define RINGSZ_LOG2 2 - -/**********************************************************************/ -/* - * Globals. - * - * Note: - * - * All variables of type struct in_addr are stored in NETWORK byte order - * (big endian). - */ - -/* net.c */ -/** BOOTP EXTENTIONS **/ -extern struct in_addr net_gateway; /* Our gateway IP address */ -extern struct in_addr net_netmask; /* Our subnet mask (0 = unknown) */ -/* Our Domain Name Server (0 = unknown) */ -extern struct in_addr net_dns_server; -#if defined(CONFIG_BOOTP_DNS2) -/* Our 2nd Domain Name Server (0 = unknown) */ -extern struct in_addr net_dns_server2; +#include #endif -extern char net_nis_domain[32]; /* Our IS domain */ -extern char net_hostname[32]; /* Our hostname */ -#ifdef CONFIG_NET -extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */ -#endif -/* Indicates whether the pxe path prefix / config file was specified in dhcp option */ -extern char *pxelinux_configfile; -/** END OF BOOTP EXTENTIONS **/ -extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */ -extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */ -extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */ -extern struct in_addr net_server_ip; /* Server IP addr (0 = unknown) */ -extern uchar *net_tx_packet; /* THE transmit packet */ -extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ -extern uchar *net_rx_packet; /* Current receive packet */ -extern int net_rx_packet_len; /* Current rx packet length */ -extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */ -extern const u8 net_null_ethaddr[ARP_HLEN]; - -#define VLAN_NONE 4095 /* untagged */ -#define VLAN_IDMASK 0x0fff /* mask of valid vlan id */ -extern ushort net_our_vlan; /* Our VLAN */ -extern ushort net_native_vlan; /* Our Native VLAN */ - -extern int net_restart_wrap; /* Tried all network devices */ - -enum proto_t { - BOOTP, RARP, ARP, TFTPGET, DHCP, DHCP6, PING, PING6, DNS, NFS, CDP, - NETCONS, SNTP, TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT_UDP, FASTBOOT_TCP, - WOL, UDP, NCSI, WGET, RS -}; - -extern char net_boot_file_name[1024];/* Boot File name */ -/* Indicates whether the file name was specified on the command line */ -extern bool net_boot_file_name_explicit; -/* The actual transferred size of the bootfile (in bytes) */ -extern u32 net_boot_file_size; -/* Boot file size in blocks as reported by the DHCP server */ -extern u32 net_boot_file_expected_size_in_blocks; - -#if defined(CONFIG_CMD_DNS) -extern char *net_dns_resolve; /* The host to resolve */ -extern char *net_dns_env_var; /* the env var to put the ip into */ -#endif - -#if defined(CONFIG_CMD_PING) -extern struct in_addr net_ping_ip; /* the ip address to ping */ -#endif - -#if defined(CONFIG_CMD_CDP) -/* when CDP completes these hold the return values */ -extern ushort cdp_native_vlan; /* CDP returned native VLAN */ -extern ushort cdp_appliance_vlan; /* CDP returned appliance VLAN */ - -/* - * Check for a CDP packet by examining the received MAC address field - */ -static inline int is_cdp_packet(const uchar *ethaddr) -{ - extern const u8 net_cdp_ethaddr[ARP_HLEN]; - - return memcmp(ethaddr, net_cdp_ethaddr, ARP_HLEN) == 0; -} -#endif - -#if defined(CONFIG_CMD_SNTP) -extern struct in_addr net_ntp_server; /* the ip address to NTP */ -extern int net_ntp_time_offset; /* offset time from UTC */ -#endif - -/* Initialize the network adapter */ -int net_init(void); -int net_loop(enum proto_t); - -/* Load failed. Start again. */ -int net_start_again(void); - -/* Get size of the ethernet header when we send */ -int net_eth_hdr_size(void); - -/* Set ethernet header; returns the size of the header */ -int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot); -int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot); - -/* Set IP header */ -void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source, - u16 pkt_len, u8 proto); -void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, - int sport, int len); - -/** - * compute_ip_checksum() - Compute IP checksum - * - * @addr: Address to check (must be 16-bit aligned) - * @nbytes: Number of bytes to check (normally a multiple of 2) - * Return: 16-bit IP checksum - */ -unsigned compute_ip_checksum(const void *addr, unsigned nbytes); - -/** - * add_ip_checksums() - add two IP checksums - * - * @offset: Offset of first sum (if odd we do a byte-swap) - * @sum: First checksum - * @new_sum: New checksum to add - * Return: updated 16-bit IP checksum - */ -unsigned add_ip_checksums(unsigned offset, unsigned sum, unsigned new_sum); - -/** - * ip_checksum_ok() - check if a checksum is correct - * - * This works by making sure the checksum sums to 0 - * - * @addr: Address to check (must be 16-bit aligned) - * @nbytes: Number of bytes to check (normally a multiple of 2) - * Return: true if the checksum matches, false if not - */ -int ip_checksum_ok(const void *addr, unsigned nbytes); - -/* Callbacks */ -rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */ -void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */ -rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */ -void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */ -bool arp_is_waiting(void); /* Waiting for ARP reply? */ -void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ -void net_set_timeout_handler(ulong, thand_f *);/* Set timeout handler */ - -/* Network loop state */ -enum net_loop_state { - NETLOOP_CONTINUE, - NETLOOP_RESTART, - NETLOOP_SUCCESS, - NETLOOP_FAIL -}; -extern enum net_loop_state net_state; - -static inline void net_set_state(enum net_loop_state state) -{ - debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); - net_state = state; -} - -/* - * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for - * sending an asynchronous reply - * - * returns - ptr to packet buffer - */ -uchar * net_get_async_tx_pkt_buf(void); - -/* Transmit a packet */ -static inline void net_send_packet(uchar *pkt, int len) -{ - if (DEBUG_NET_PKT_TRACE) - print_hex_dump_bytes("tx: ", DUMP_PREFIX_OFFSET, pkt, len); - /* Currently no way to return errors from eth_send() */ - (void) eth_send(pkt, len); -} - -/** - * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, - * send ARP request if needed (ether will be populated) - * @ether: Raw packet buffer - * @dest: IP address to send the datagram to - * @dport: Destination UDP port - * @sport: Source UDP port - * @payload_len: Length of data after the UDP header - * @action: TCP action to be performed - * @tcp_seq_num: TCP sequence number of this transmission - * @tcp_ack_num: TCP stream acknolegement number - * - * Return: 0 on success, other value on failure - */ -int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, - int payload_len, int proto, u8 action, u32 tcp_seq_num, - u32 tcp_ack_num); -/** - * net_send_tcp_packet() - Transmit TCP packet. - * @payload_len: length of payload - * @dport: Destination TCP port - * @sport: Source TCP port - * @action: TCP action to be performed - * @tcp_seq_num: TCP sequence number of this transmission - * @tcp_ack_num: TCP stream acknolegement number - * - * Return: 0 on success, other value on failure - */ -int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, - u32 tcp_seq_num, u32 tcp_ack_num); -int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, - int sport, int payload_len); - -/* Processes a received packet */ -void net_process_received_packet(uchar *in_packet, int len); - -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) -void nc_start(void); -int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port, - unsigned src_port, unsigned len); -#endif - -static __always_inline int eth_is_on_demand_init(void) -{ -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) - extern enum proto_t net_loop_last_protocol; - - return net_loop_last_protocol != NETCONS; -#else - return 1; -#endif -} - -static inline void eth_set_last_protocol(int protocol) -{ -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) - extern enum proto_t net_loop_last_protocol; - - net_loop_last_protocol = protocol; -#endif -} - -/* - * Check if autoload is enabled. If so, use either NFS or TFTP to download - * the boot file. - */ -void net_auto_load(void); - -/* - * The following functions are a bit ugly, but necessary to deal with - * alignment restrictions on ARM. - * - * We're using inline functions, which had the smallest memory - * footprint in our tests. - */ -/* return IP *in network byteorder* */ -static inline struct in_addr net_read_ip(void *from) -{ - struct in_addr ip; - - memcpy((void *)&ip, (void *)from, sizeof(ip)); - return ip; -} - -/* return ulong *in network byteorder* */ -static inline u32 net_read_u32(void *from) -{ - u32 l; - - memcpy((void *)&l, (void *)from, sizeof(l)); - return l; -} - -/* write IP *in network byteorder* */ -static inline void net_write_ip(void *to, struct in_addr ip) -{ - memcpy(to, (void *)&ip, sizeof(ip)); -} - -/* copy IP */ -static inline void net_copy_ip(void *to, void *from) -{ - memcpy((void *)to, from, sizeof(struct in_addr)); -} - -/* copy ulong */ -static inline void net_copy_u32(void *to, void *from) -{ - memcpy((void *)to, (void *)from, sizeof(u32)); -} - -/** - * is_zero_ethaddr - Determine if give Ethernet address is all zeros. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is all zeroes. - */ -static inline int is_zero_ethaddr(const u8 *addr) -{ - return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); -} - -/** - * is_multicast_ethaddr - Determine if the Ethernet address is a multicast. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is a multicast address. - * By definition the broadcast address is also a multicast address. - */ -static inline int is_multicast_ethaddr(const u8 *addr) -{ - return 0x01 & addr[0]; -} - -/* - * is_broadcast_ethaddr - Determine if the Ethernet address is broadcast - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is the broadcast address. - */ -static inline int is_broadcast_ethaddr(const u8 *addr) -{ - return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == - 0xff; -} - -/* - * is_valid_ethaddr - Determine if the given Ethernet address is valid - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not - * a multicast address, and is not FF:FF:FF:FF:FF:FF. - * - * Return true if the address is valid. - */ -static inline int is_valid_ethaddr(const u8 *addr) -{ - /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to - * explicitly check for it here. */ - return !is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr); -} - -/** - * net_random_ethaddr - Generate software assigned random Ethernet address - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Generate a random Ethernet address (MAC) that is not multicast - * and has the local assigned bit set. - */ -static inline void net_random_ethaddr(uchar *addr) -{ - int i; - unsigned int seed = get_ticks(); - - for (i = 0; i < 6; i++) - addr[i] = rand_r(&seed); - - addr[0] &= 0xfe; /* clear multicast bit */ - addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ -} - -/** - * string_to_enetaddr() - Parse a MAC address - * - * Convert a string MAC address - * - * Implemented in lib/net_utils.c (built unconditionally) - * - * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit - * hex value - * @enetaddr: Place to put MAC address (6 bytes) - */ -void string_to_enetaddr(const char *addr, uint8_t *enetaddr); - -/* Convert an IP address to a string */ -void ip_to_string(struct in_addr x, char *s); - -/** - * string_to_ip() - Convert a string to ip address - * - * Implemented in lib/net_utils.c (built unconditionally) - * - * @s: Input string to parse - * @return: in_addr struct containing the parsed IP address - */ -struct in_addr string_to_ip(const char *s); - -/* Convert a VLAN id to a string */ -void vlan_to_string(ushort x, char *s); - -/* Convert a string to a vlan id */ -ushort string_to_vlan(const char *s); - -/* read a VLAN id from an environment variable */ -ushort env_get_vlan(char *); - -/* copy a filename (allow for "..." notation, limit length) */ -void copy_filename(char *dst, const char *src, int size); - -/* check if serverip is specified in filename from the command line */ -int is_serverip_in_cmd(void); - -/** - * net_parse_bootfile - Parse the bootfile env var / cmd line param - * - * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile - * @param filename - a pointer to the string to save the filename part - * @param max_len - The longest - 1 that the filename part can be - * - * return 1 if parsed, 0 if bootfile is empty - */ -int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len); - -/** - * update_tftp - Update firmware over TFTP (via DFU) - * - * This function updates board's firmware via TFTP - * - * @param addr - memory address where data is stored - * @param interface - the DFU medium name - e.g. "mmc" - * @param devstring - the DFU medium number - e.g. "1" - * - * Return: - 0 on success, other value on failure - */ -int update_tftp(ulong addr, char *interface, char *devstring); - -/** - * env_get_ip() - Convert an environment value to to an ip address - * - * @var: Environment variable to convert. The value of this variable must be - * in the format format a.b.c.d, where each value is a decimal number from - * 0 to 255 - * Return: IP address, or 0 if invalid - */ -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} - -/** - * reset_phy() - Reset the Ethernet PHY - * - * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled - */ -void reset_phy(void); - -#if CONFIG_IS_ENABLED(NET) -/** - * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs - * - * These get in the way of bootstd testing, so are normally disabled by tests. - * This provide control of this setting. It only affects binding of Ethernet - * devices, so if that has already happened, this flag does nothing. - * - * @enable: true to enable binding of bootdevs when binding new Ethernet - * devices, false to disable it - */ -void eth_set_enable_bootdevs(bool enable); -#else -static inline void eth_set_enable_bootdevs(bool enable) {} -#endif - -/** - * wget_with_dns() - runs dns host IP address resulution before wget - * - * @dst_addr: destination address to download the file - * @uri: uri string of target file of wget - * Return: downloaded file size, negative if failed - */ -int wget_with_dns(ulong dst_addr, char *uri); - -/** - * wget_validate_uri() - varidate the uri - * - * @uri: uri string of target file of wget - * Return: true if uri is valid, false if uri is invalid - */ -bool wget_validate_uri(char *uri); #endif /* __NET_H__ */ From patchwork Fri Sep 6 12:33:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825956 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp777963wrb; Fri, 6 Sep 2024 05:35:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQteR5yvtKJe8d2JP2Te+2jZie2d0q7lvDq0lqSuARnSYzZofgUlTl/9uAWTlG3p2Nd3TXEA==@linaro.org X-Google-Smtp-Source: AGHT+IG1W5R6FM+D3GJAQKJ/6jVqjGTJEBaZxMuX4QuAiFBl/r02JUNL4SQGVaS3VE7ZmJogIwbD X-Received: by 2002:a05:6402:2755:b0:5b9:df62:15cd with SMTP id 4fb4d7f45d1cf-5c3dc7c4442mr1934675a12.32.1725626109757; Fri, 06 Sep 2024 05:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626109; cv=none; d=google.com; s=arc-20240605; b=aSC2fj3FMXyFnTvNjqgaPGXUqWzacooGLtMCd/p+eohKhiiMfyCHhiSaZ1cTAasewq exZDL2AcndTzOM2fOOp5QIS0B+lj0xDkZdOLY2jrx1LKc9fDbMODChqBQEoBvRWc4vlL vwkVr018Q9ovPD7wk4fUj+1R0J2Nvjn6p5967y5t0PNCFnr4cvLL7N/dh2bf2Cc9i6VZ FLGPKdZoQQl1Wy3us779e3kPbDitFlsBAd/zTe0VkJsWYAnoWX4N0lTAblKRNrBRxwmX OXMQsMWhPI/2mCRnjt+N/Bk+tuF4d4uL65rDd535VohsISAK/qdLdzkRUvk+GKwaWDq/ tbaw== 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=nw/+cdQPG/ROM9iilfJJB8oj5oic8yJ+2SSNidMrUsc=; fh=fsulFODMEPEOSLpWO3BriWzWBQgd8jC14ZsfD2Wjjn4=; b=YFqcgSyWI2o1zMMBs73iD9vWlJDXMVsEaxCd9g48/1YjzoQHiPo6yj1IleYSyM9Kui jbTklB7Ada2bfsv6KNYJ09uQ/paYZW8ulHisP+IxBklFHVBhrJ13igyXbJt5KMMW1Unu ZhlpTSpeJKjSylXJJlgo4+3loA3srH3Zxn9XNEgojIqF8MKN5sjLv/+U8wK144nP23m6 PuozOmnd/o4N390PFB3wc3Hw+oUblRhMwcXlN9lChEDQOMk9iQJfVIExD7idJmMdfCdL bPAczFlA+tbwNl2Nu0iQX0w4LfdTfw5TXtw5DmjgK30cRZmpk3vLLAHg4OGyHdLu1FEn hGow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FeOHI5cE; 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; dara=neutral header.i=@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 4fb4d7f45d1cf-5c3cc6b16a2si3029907a12.591.2024.09.06.05.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:09 -0700 (PDT) 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=FeOHI5cE; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C6CC88CD8; Fri, 6 Sep 2024 14:35:00 +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="FeOHI5cE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 30ADE888C1; Fri, 6 Sep 2024 14:34:59 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 1E4D088C9F for ; Fri, 6 Sep 2024 14:34:55 +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-x330.google.com with SMTP id 5b1f17b1804b1-42ca573fd5aso3422715e9.3 for ; Fri, 06 Sep 2024 05:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626094; x=1726230894; 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=nw/+cdQPG/ROM9iilfJJB8oj5oic8yJ+2SSNidMrUsc=; b=FeOHI5cEUYsYinJpO+Rm3XgJtW2ikNGZM+6Kzs3tUypmHmnMfAPq2iDVFQs/r9UWDf kthvol+170eVnqF5Uq5AQBAumcYIFKOuLb9Qtg4UXt0Nd5NtWqIL9v2D6nDs8HvE9JH7 Nr4awF0Po8xUNwx+AUXRq0POqJd/EtTLkq0uw+iYsXEYqVQIM6LgP6qWMXvnsSpNQM0K S0YlZM0SKEO9T9IhLIaObzc0T4hMKNWytAdNMgAYAzcqN1J+6iMQ6hJQ7gtDzI5VLOEH NBg8MCGVYinNTev3RcGYZR5rkeQn9+WJuW5/rgtolSF1xTXEjx0H+ndhrgl5KxLQygx6 7XmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626094; x=1726230894; 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=nw/+cdQPG/ROM9iilfJJB8oj5oic8yJ+2SSNidMrUsc=; b=LYhHcqX6S0tI3YBgz53wfyjAvxUXFvobk9Np9lKjICV8icYuG8tp6AQfZFI2dlpcza iD3Zp6HTZBCmX4kj9ldgca1jFOQXSDZ3YBdB1cK/jr4WUUYUmcxHTENvOp+bgemoJhxK ki2+hBiA5H6ahfGG71yJ0ejp4Idlm1EOl9mB+uO+sZEXBYUHMy0EPcC418AQJRlL1Dul k0W6fMt65PPxk/uUwvfoRqGLe5EXqEB3H7nwmdCZGzHbNQaByKMAG9xi+Sd64/0AfuuU 2hQjLrXTHHvqQm6EFqGtJyYGnyxUksfdCp893yDTYL8Dy0GFibZ+iKlGAU3pGU2ItoYQ LCag== X-Gm-Message-State: AOJu0YzgUVd3mPgDRN0lX1Ed+kcxF/ZsJbkAxa7qhSVAQqNYUIJF9uuY 3eFxJmFAlZd3klzKIiZsPx7CyPbtYA7MAvc4E34bOJKGtWw/Mu/sAI9lUivvMPJaZHS378T9D89 qqdfhiJW3 X-Received: by 2002:a05:600c:1c21:b0:426:647b:1bfa with SMTP id 5b1f17b1804b1-42c9f983745mr16838265e9.8.1725626094298; Fri, 06 Sep 2024 05:34:54 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:54 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Sean Anderson , Simon Glass , Marek Vasut Subject: [PATCH v10 05/25] net: move copy_filename() to new file net/net-common.c Date: Fri, 6 Sep 2024 14:33:21 +0200 Message-Id: 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 copy_filename() can be useful when NET_LWIP is enabled, therefore move it out of net/net.c which is built only when networking choice is NET. Signed-off-by: Jerome Forissier --- net/Makefile | 2 ++ net/net-common.c | 13 +++++++++++++ net/net.c | 12 ------------ 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 net/net-common.c diff --git a/net/Makefile b/net/Makefile index 70eec8caf0d..a9cecee637a 100644 --- a/net/Makefile +++ b/net/Makefile @@ -42,3 +42,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o CFLAGS_eth_common.o += -Wno-format-extra-args endif + +obj-y += net-common.o diff --git a/net/net-common.c b/net/net-common.c new file mode 100644 index 00000000000..a7f767d5e9c --- /dev/null +++ b/net/net-common.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 + +void copy_filename(char *dst, const char *src, int size) +{ + if (src && *src && (*src == '"')) { + ++src; + --size; + } + + while ((--size > 0) && src && *src && (*src != '"')) + *dst++ = *src++; + *dst = '\0'; +} diff --git a/net/net.c b/net/net.c index 1e0b7c85624..c1d10a77b9e 100644 --- a/net/net.c +++ b/net/net.c @@ -1689,18 +1689,6 @@ void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, int sport, ip->udp_xsum = 0; } -void copy_filename(char *dst, const char *src, int size) -{ - if (src && *src && (*src == '"')) { - ++src; - --size; - } - - while ((--size > 0) && src && *src && (*src != '"')) - *dst++ = *src++; - *dst = '\0'; -} - int is_serverip_in_cmd(void) { return !!strchr(net_boot_file_name, ':'); From patchwork Fri Sep 6 12:33: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: 825957 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778023wrb; Fri, 6 Sep 2024 05:35:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWlHhNQnkO/8DTz0d1LRGbevBV4ObURh1SX4fop0QYziPcnP2WqYNavLLXcF96zYLCWRGK8gA==@linaro.org X-Google-Smtp-Source: AGHT+IGI7SygVLlfelvyjvR0Y+6helnt3h2d/IqPs70P90pidrfE7Ssk/PO9a1+cOwhQOCKCLdWK X-Received: by 2002:a05:6512:ba0:b0:536:55f7:75ce with SMTP id 2adb3069b0e04-536587aa898mr1531564e87.20.1725626119425; Fri, 06 Sep 2024 05:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626119; cv=none; d=google.com; s=arc-20240605; b=KSalEi2BGALW2ZQm9q8rkfLcsgN4IypAvegpb66hLB6qifBFdvv8vsKODgoo/4lFeC RyEbXqekyoIXSV0xyV68oggnTNrAzmlSlqpWmAPrHMS/NKv6Pbu1gHwpInHDUNaXLkd9 IKXosbMDfhC5sdPHmAzgkjr/bpjdXBQATmKPoQjUXaV7Ihn1gjfyh/L9WwcAsL2K3KCC Vh+TKYr6196/eIfNiAjebJwP54dqXyFjw0xqHxbQEGL+geOMrh/TYGl4WsSOzAmldZCt TQu6acREppN/wVSAbGGw3UyMbhrco580sqxlIEemrvHVdvLdtvATayRDNWJMdzL0lD3S 4law== 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=wtwVMuEzOP8lc4QJC9T85h8R/u1XDZ+aMqfgZujkeKA=; fh=l63X4CuwKG2UXrCuPpIFdEgwxmsKR1zd5GNxHhHbf2Y=; b=WZcWpS4iRHUVPPYRTFUe9OQYmTA7Jbbpw6ot2o8n6eQR+2ahTTP33ODceTUJZm/Vz2 rAW0dE3noJ+MstvOe8bY5IdH57d0GQQA4d92bDszE8SG4e5+deQ20pm2jDcZae1wNiMi AnjJPwLRIRxbf5IShA9n+DVJfZbeZ39Fb//2NjXbXV7flY2gdyjS8euE7KkXlOFicp4F sUOdXd+1W1sOTL0Oo42xstXZkOGsH/3kbvsFfEih4pxMI5czLWCf8HHZ4ZIt6DFDZyQX v/e5M6zFEIgzmweCim3xK0fdpeyOwWC7PjGkjdNDVQ+z9yyQAcwljofXEMTHpivIXk05 jJQQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NGRbMf2t; 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; dara=neutral header.i=@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 a640c23a62f3a-a8d0d0661d2si23335966b.132.2024.09.06.05.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:19 -0700 (PDT) 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=NGRbMf2t; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 91AEC88CE7; Fri, 6 Sep 2024 14:35:00 +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="NGRbMf2t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3CB4D88BD6; Fri, 6 Sep 2024 14:34:59 +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, T_SCC_BODY_TEXT_LINE autolearn=ham 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 966D988CE1 for ; Fri, 6 Sep 2024 14:34:56 +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-42bbf138477so17066965e9.2 for ; Fri, 06 Sep 2024 05:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626096; x=1726230896; 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=wtwVMuEzOP8lc4QJC9T85h8R/u1XDZ+aMqfgZujkeKA=; b=NGRbMf2tXtf295sYiPEti7qYDUTHD1RCsYNmmf12Hx+LKLEWa/ceRMyWxasy+snyV7 HEs0EPOiBloNHoFlVAB8plMHgj2pZPdXbiF3MMD8LQapNpptYRwront3iX/PXI5GfG7D fD2HitJXKsA3DScTdv1hGdpV4ZB1zRz+WV2/0iHMtmQD6PvF8fx1z9M+gRZNLzBxxbED kFApFwbEADULs7mRrO4kY+RJcgTGqWeXSk3BI0lVaEGWQF5KWaSZLa3m/UirZSN/GDpw ezBGHiHF3zXEEyY1j+23z7S9lKVK2GIk0LGNQ36ggs41YBBpZLyQJhBZ5tVb5b/cXdZp GZcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626096; x=1726230896; 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=wtwVMuEzOP8lc4QJC9T85h8R/u1XDZ+aMqfgZujkeKA=; b=A0r8MPQeIBotS+FCCPHLqbVXO43ulghYMpn2mgsA1zl7LukQcQJ8SkgfWIN6nhbCsE mISYhodzwLffoIAu2Q3erGwJs9Z783Y+/iDRKRBV39UayOGWl9IRd2UMxAFmyylvlwJe rSO3/rikCtkxukoWVCNB+uD30N6tkpALyW8Lqx+Fp34OC8BXza4QtjkI3iaavV+JJc3H 0Qnu0BUm6wJeZLuISSnO8iEI2EmOSuISKppsw6mbJ5/oN95y/gQMD1pen4haS6dORFrV 9e5Jd70G5gkeCXyrVSFVI0m7v8HWQO2kO7GU+zSBme8WSXw9fqOm+j3nGBGoeG9zXdsJ 4FXQ== X-Gm-Message-State: AOJu0YxKVqsl1Tc4XfMSEknZKM5xWZoAGajYCqqr6FLaLsqA4Hp7vVvm JTooiWXiNYNql1GAvEnXegNb4YHlwudLQJkoBRMs24tNnB+ptZhnMoXOXL+g27utTq50SnLiiB8 EKXkKGdky X-Received: by 2002:a05:600c:3516:b0:426:5269:983a with SMTP id 5b1f17b1804b1-42c9f984be6mr17842795e9.8.1725626095858; Fri, 06 Sep 2024 05:34:55 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:55 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Masahisa Kojima , Simon Glass , Sean Anderson , Marek Vasut , Michal Simek , Matthias Schiffer , Fabio Estevam Subject: [PATCH v10 06/25] net: eth-uclass: add function eth_start_udev() Date: Fri, 6 Sep 2024 14:33:22 +0200 Message-Id: <876e9fc7b015d534c96ea20253525cc220b7414c.1725625913.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 Add a function to start a given network device, and update eth_init() to use it. Signed-off-by: Jerome Forissier --- include/net-common.h | 1 + net/eth-uclass.c | 38 +++++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/include/net-common.h b/include/net-common.h index 26674ec7e90..68963a3e9ac 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -192,6 +192,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index, int usb_ether_init(void); int eth_init(void); /* Initialize the device */ +int eth_start_udev(struct udevice *dev); /* ->start() if not already running */ int eth_send(void *packet, int length); /* Send a packet */ #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) int eth_receive(void *packet, int length); /* Receive a packet*/ diff --git a/net/eth-uclass.c b/net/eth-uclass.c index e34d7af0229..5555f82f23e 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -284,6 +284,27 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op, } U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr); +int eth_start_udev(struct udevice *dev) +{ + struct eth_device_priv *priv = dev_get_uclass_priv(dev); + int ret; + + if (priv->running) + return 0; + + if (!device_active(dev)) + return -EINVAL; + + ret = eth_get_ops(dev)->start(dev); + if (ret < 0) + return ret; + + priv->state = ETH_STATE_ACTIVE; + priv->running = true; + + return 0; +} + int eth_init(void) { struct udevice *current = NULL; @@ -328,20 +349,11 @@ int eth_init(void) if (current) { debug("Trying %s\n", current->name); - if (device_active(current)) { - ret = eth_get_ops(current)->start(current); - if (ret >= 0) { - struct eth_device_priv *priv = - dev_get_uclass_priv(current); - - priv->state = ETH_STATE_ACTIVE; - priv->running = true; - ret = 0; - goto end; - } - } else { + ret = eth_start_udev(current); + if (ret < 0) ret = eth_errno; - } + else + break; debug("FAIL\n"); } else { From patchwork Fri Sep 6 12:33:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825958 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778133wrb; Fri, 6 Sep 2024 05:35:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVdxEWfw+FaivehUUNz9JkacdbSQrI0qtNJav6pfKf6eL6s3Hgq9YwM7I176F+LuRulS1X0OQ==@linaro.org X-Google-Smtp-Source: AGHT+IGvYW1rLo/xa/NMttlSgU3W8gziTA6GGEu3iyxQi1iElMebsgeX/DlS737PhD7B/eHuI3n/ X-Received: by 2002:a2e:4e11:0:b0:2f6:4a70:88a4 with SMTP id 38308e7fff4ca-2f752325b09mr14599561fa.22.1725626130476; Fri, 06 Sep 2024 05:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626130; cv=none; d=google.com; s=arc-20240605; b=lokkkGqX5eGx+RE4BP84RpX/8yJWQdau4M/6mJRL3XR+48A9Gb0cT2ePbDB0Vx16cZ gacykwxCuge1XgLf+oLt7AwcKiq7Cglpom54rTEMpI7Ncf+JYoNI0o9PcEkM9g7b5d6d UuicXGDcOhsH4NEaTi14vVSsKKRBvbUDk04WAvO4rx4lvfSWQMRFZTa2sPUq+Z+yjPyj 1/lK5/cspIA6BWc9z0SrkgRYo0s90yeVdH7ju1Ti9POt101FrPv0BC48xRo8YZmuVDA8 8rnno4d98mIy9cb862tzQptwLm5JP63xmuCnohgXZw/CSq5z+3bOKkFhUbnNRPNsAWBV t3fg== 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=FasIErK3wjcNMOVvrnHXBqhHVaAiRG8TtR+/lYfA6RI=; fh=UvBqhLDxrIOQCdvf4u81s9x24Z8nTitwcvetVKLny6M=; b=SXNt3jASHwxCcRv4ccnInPgkCPuMUhJzK6uMNRz46SmqSq5u630rSwRhcBtxDXQR9U 4CZ25q5Wf6PoSoNeEcod7MEzfzwFTOKUColRJNEN1LGSrVYgz35leNumEN94GqJSTrPI b4/FPk6njKrRNQEIJ+SMuNeQWY0aTlt2GzEkHRabOdTEiYb7wy8HUSqeqNdVsYVeto53 w7H+Do7nw6ajj7hRFPMEygIONYD5GDp5Vc8TMw3oyHhnWxosv1NeoACx5gV4NpNrwbb9 k5LSBB/uijVfMZdPGM8wIrxPjbr4clINICPshM0Y4RBII0hlArnpi97ZAifJ4cPnGMMp 5KYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YzSQvbW/"; 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; dara=neutral header.i=@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 4fb4d7f45d1cf-5c3cc6b00bfsi3119977a12.516.2024.09.06.05.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:30 -0700 (PDT) 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="YzSQvbW/"; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E96D288D06; Fri, 6 Sep 2024 14:35:05 +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="YzSQvbW/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8EF588CF2; Fri, 6 Sep 2024 14:35:04 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 2E94588BAE for ; Fri, 6 Sep 2024 14:34:59 +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-wr1-x42c.google.com with SMTP id ffacd0b85a97d-374cacf18b1so1326614f8f.2 for ; Fri, 06 Sep 2024 05:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626098; x=1726230898; 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=FasIErK3wjcNMOVvrnHXBqhHVaAiRG8TtR+/lYfA6RI=; b=YzSQvbW/gqMcXc9+0gBjWhYmGYmPbgwsPlXmD5JequwmXqjifsE2RjT9dGNAWvMvjk xo0o/S5aSGcm2ERMVGSBHS3+z9n9JrzIcFMREh63UGUOwtFh5QFrN7ghl+TSPTGi73Wl 7teznIdu1ukBmPxbciund6cYEyGNF9dGX14G464LooCEKKqZRJBV7u4JvtFWv56j8nks oOr+ShzVadk+m+oeIBLpAKxw+Q0pzGI9hgJm0isRd5QK/8zEgZNBJHXy0ICbvj9sFgOz mOl0jaNZNTL4CM3E+y1z/5/13Ey0h/JY65WosHAHTTKMPaKQCL50O4YesmGAbxqyCchm ac0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626098; x=1726230898; 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=FasIErK3wjcNMOVvrnHXBqhHVaAiRG8TtR+/lYfA6RI=; b=iwOocyeqsLctK1nOSOinHJ5SIw7zQYHjQuXRm6EjNsQOl9vmQI89QLG8ZCZj9UisKv rqLvFjXxIJvDe6dfgIDuROUYIlKA9KDB5jr36XeXXaRdoUjkbiGBuJIRqKcDhrW3sHd1 t5sAcGvLHhhCucVJfM9bX+PknZJFti4c6DZzdM/sVYk09wL/ZCVcOFPAzK+UWcdmDwh5 AxuoVm3gg62bGqSG2GoKjK1B4rYaXsim5mpmRFVcKwZO/rOFj1NS+sYP3i8N8vD2PHec a9JmFNAYshlc3Vc9Bo4OHDWyliU25TtFOTSEORSN6GbihyrPr8bsXqhjc6hqWoAYTrD1 6wqw== X-Gm-Message-State: AOJu0Yxp//wu/k1flYaV4E4z3/bzVb1s4rT75rkRD9wGbCnmDCXdzeL+ 0GtieY7DIRTxRsnOXzf2Emvg9kNMddn7XHmRMZ5LMQ35p9wW36Ad39BQLRDOC4lfCPE0cR3CHcv GUTZ0w2vC X-Received: by 2002:a5d:65c6:0:b0:374:ba7a:7d46 with SMTP id ffacd0b85a97d-374ba7a7ff3mr11615375f8f.43.1725626098357; Fri, 06 Sep 2024 05:34:58 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:34:58 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Sean Anderson , Sughosh Ganu Subject: [PATCH v10 07/25] net-lwip: build lwIP Date: Fri, 6 Sep 2024 14:33:23 +0200 Message-Id: <498e303e425459c4a534799ed9091043e9b300b7.1725625913.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 Build the lwIP library when NET_LWIP is enabled. The following files are adaptation layers written specially for U-Boot: lib/lwip/u-boot/arch/cc.h lib/lwip/u-boot/arch/sys_arch.h (empty) lib/lwip/u-boot/limits.h (empty) lib/lwip/u-boot/lwipopts.h They were initially contributed by Maxim in a previous RFC patch series. Signed-off-by: Jerome Forissier Co-developed-by: Maxim Uvarov Cc: Maxim Uvarov Acked-by: Ilias Apalodimas --- lib/Makefile | 2 + lib/lwip/Makefile | 55 +++++++++++ lib/lwip/u-boot/arch/cc.h | 45 +++++++++ lib/lwip/u-boot/arch/sys_arch.h | 0 lib/lwip/u-boot/limits.h | 0 lib/lwip/u-boot/lwipopts.h | 157 ++++++++++++++++++++++++++++++++ net/lwip/Kconfig | 10 ++ 7 files changed, 269 insertions(+) create mode 100644 lib/lwip/Makefile create mode 100644 lib/lwip/u-boot/arch/cc.h create mode 100644 lib/lwip/u-boot/arch/sys_arch.h create mode 100644 lib/lwip/u-boot/limits.h create mode 100644 lib/lwip/u-boot/lwipopts.h diff --git a/lib/Makefile b/lib/Makefile index d300249f57c..00bfd11002a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -96,6 +96,8 @@ obj-$(CONFIG_LIBAVB) += libavb/ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o +obj-$(CONFIG_NET_LWIP) += lwip/ + ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o diff --git a/lib/lwip/Makefile b/lib/lwip/Makefile new file mode 100644 index 00000000000..dfcd700ca47 --- /dev/null +++ b/lib/lwip/Makefile @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2024 Linaro Ltd. + +obj-y += \ + lwip/src/api/api_lib.o \ + lwip/src/api/api_msg.o \ + lwip/src/api/err.o \ + lwip/src/api/if_api.o \ + lwip/src/api/netbuf.o \ + lwip/src/api/netdb.o \ + lwip/src/api/netifapi.o \ + lwip/src/api/sockets.o \ + lwip/src/api/tcpip.o \ + lwip/src/apps/http/http_client.o \ + lwip/src/apps/tftp/tftp.o \ + lwip/src/core/altcp_alloc.o \ + lwip/src/core/altcp.o \ + lwip/src/core/altcp_tcp.o \ + lwip/src/core/def.o \ + lwip/src/core/dns.o \ + lwip/src/core/inet_chksum.o \ + lwip/src/core/init.o \ + lwip/src/core/ip.o \ + lwip/src/core/ipv4/acd.o \ + lwip/src/core/ipv4/autoip.o \ + lwip/src/core/ipv4/dhcp.o \ + lwip/src/core/ipv4/etharp.o \ + lwip/src/core/ipv4/icmp.o \ + lwip/src/core/ipv4/igmp.o \ + lwip/src/core/ipv4/ip4_addr.o \ + lwip/src/core/ipv4/ip4.o \ + lwip/src/core/ipv4/ip4_frag.o \ + lwip/src/core/ipv6/dhcp6.o \ + lwip/src/core/ipv6/ethip6.o \ + lwip/src/core/ipv6/icmp6.o \ + lwip/src/core/ipv6/inet6.o \ + lwip/src/core/ipv6/ip6_addr.o \ + lwip/src/core/ipv6/ip6.o \ + lwip/src/core/ipv6/ip6_frag.o \ + lwip/src/core/ipv6/mld6.o \ + lwip/src/core/ipv6/nd6.o \ + lwip/src/core/mem.o \ + lwip/src/core/memp.o \ + lwip/src/core/netif.o \ + lwip/src/core/pbuf.o \ + lwip/src/core/raw.o \ + lwip/src/core/stats.o \ + lwip/src/core/sys.o \ + lwip/src/core/tcp.o \ + lwip/src/core/tcp_in.o \ + lwip/src/core/tcp_out.o \ + lwip/src/core/timeouts.o \ + lwip/src/core/udp.o \ + lwip/src/netif/ethernet.o diff --git a/lib/lwip/u-boot/arch/cc.h b/lib/lwip/u-boot/arch/cc.h new file mode 100644 index 00000000000..563d3bfa98b --- /dev/null +++ b/lib/lwip/u-boot/arch/cc.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_ARCH_CC_H +#define LWIP_ARCH_CC_H + +#include +#include +#include +#include + +#define LWIP_ERRNO_INCLUDE + +#define LWIP_ERRNO_STDINCLUDE 1 +#define LWIP_NO_UNISTD_H 1 +#define LWIP_TIMEVAL_PRIVATE 1 + +#ifdef CONFIG_LIB_RAND +#define LWIP_RAND() ((u32_t)rand()) +#else +#define LWIP_DNS_SECURE 0 +#endif + +/* different handling for unit test, normally not needed */ +#ifdef LWIP_NOASSERT_ON_ERROR +#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ + handler; }} while (0) +#endif + +#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS + +#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); } while (0) + +#define atoi(str) (int)dectoul(str, NULL) +#define lwip_strnstr(a, b, c) strstr(a, b) + +#define LWIP_ERR_T int +#define LWIP_CONST_CAST(target_type, val) ((target_type)((uintptr_t)val)) + +#if defined(CONFIG_SYS_BIG_ENDIAN) +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* LWIP_ARCH_CC_H */ diff --git a/lib/lwip/u-boot/arch/sys_arch.h b/lib/lwip/u-boot/arch/sys_arch.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/limits.h b/lib/lwip/u-boot/limits.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/lwipopts.h b/lib/lwip/u-boot/lwipopts.h new file mode 100644 index 00000000000..a0d3d2b364f --- /dev/null +++ b/lib/lwip/u-boot/lwipopts.h @@ -0,0 +1,157 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_UBOOT_LWIPOPTS_H +#define LWIP_UBOOT_LWIPOPTS_H + +#if defined(CONFIG_LWIP_DEBUG) +#define LWIP_DEBUG 1 +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define ETHARP_DEBUG LWIP_DBG_ON +#define NETIF_DEBUG LWIP_DBG_ON +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_ON +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_ON +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_ON +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_ON +#define AUTOIP_DEBUG LWIP_DBG_ON +#define DNS_DEBUG LWIP_DBG_ON +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#endif + +#define LWIP_TESTMODE 0 + +#if !defined(CONFIG_LWIP_ASSERT) +#define LWIP_NOASSERT 1 +#define LWIP_ASSERT(message, assertion) +#endif + +#include "lwip/debug.h" + +#define SYS_LIGHTWEIGHT_PROT 0 +#define NO_SYS 1 + +#define LWIP_IPV4 1 +#define LWIP_IPV6 0 + +#define MEM_ALIGNMENT 1 + +#define MEMP_NUM_TCP_SEG 16 +#define PBUF_POOL_SIZE 8 + +#define LWIP_ARP 1 +#define ARP_TABLE_SIZE 4 +#define ARP_QUEUEING 1 + +#define IP_FORWARD 0 +#define IP_OPTIONS_ALLOWED 1 +#define IP_REASSEMBLY 0 +#define IP_FRAG 0 +#define IP_REASS_MAXAGE 3 +#define IP_REASS_MAX_PBUFS 4 +#define IP_FRAG_USES_STATIC_BUF 0 + +#define IP_DEFAULT_TTL 255 + +#define LWIP_ICMP 0 + +#if defined(CONFIG_PROT_RAW_LWIP) +#define LWIP_RAW 1 +#else +#define LWIP_RAW 0 +#endif + +#if defined(CONFIG_PROT_DHCP_LWIP) +#define LWIP_DHCP 1 +#define LWIP_DHCP_BOOTP_FILE 1 +#else +#define LWIP_DHCP 0 +#endif + +#define LWIP_DHCP_DOES_ACD_CHECK 0 + +#define LWIP_AUTOIP 0 + +#define LWIP_SNMP 0 + +#define LWIP_IGMP 0 + +#if defined(CONFIG_PROT_DNS_LWIP) +#define LWIP_DNS 1 +#define DNS_TABLE_SIZE 1 +#else +#define LWIP_DNS 0 +#endif + +#if defined(CONFIG_PROT_UDP_LWIP) +#define LWIP_UDP 1 +#else +#define LWIP_UDP 0 +#endif + +#if defined(CONFIG_PROT_TCP_LWIP) +#define LWIP_TCP 1 +#define TCP_MSS 1460 +#define TCP_WND CONFIG_LWIP_TCP_WND +#define LWIP_WND_SCALE 1 +#define TCP_RCV_SCALE 0x7 +#define TCP_SND_BUF (2 * TCP_MSS) +#ifdef CONFIG_PROT_TCP_SACK_LWIP +#define LWIP_TCP_SACK_OUT 1 +#endif +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_LISTEN_BACKLOG 0 + +#define PBUF_LINK_HLEN 14 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN) + +#define LWIP_HAVE_LOOPIF 0 + +#define LWIP_NETCONN 0 +#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1 + +#define LWIP_SOCKET 0 +#define SO_REUSE 0 + +#define LWIP_STATS 0 + +#define PPP_SUPPORT 0 + +#define LWIP_TCPIP_CORE_LOCKING 0 + +#define LWIP_NETIF_LOOPBACK 0 + +/* use malloc instead of pool */ +#define MEMP_MEM_MALLOC 1 +#define MEMP_MEM_INIT 1 +#define MEM_LIBC_MALLOC 1 + +#endif /* LWIP_UBOOT_LWIPOPTS_H */ diff --git a/net/lwip/Kconfig b/net/lwip/Kconfig index 90c62145844..44157395977 100644 --- a/net/lwip/Kconfig +++ b/net/lwip/Kconfig @@ -35,4 +35,14 @@ config PROT_TCP_SACK_LWIP config PROT_UDP_LWIP bool +config LWIP_TCP_WND + int "Value of TCP_WND" + default 3000000 + help + Default value for TCP_WND in the lwIP configuration + Lower values result in slower wget transfer speeds in + general, especially when the latency on the network is high, + but QEMU with "-net user" needs no more than a few KB or the + transfer will stall and eventually time out. + endif # NET_LWIP From patchwork Fri Sep 6 12:33:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825986 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp809242wrb; Fri, 6 Sep 2024 06:41:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbMP7+lI/OhfuO4Vd88VT90e8w2uGACxeuUuzOmblR38m30YWHrxmrMT+pPlYTpVBbcMRdrg==@linaro.org X-Google-Smtp-Source: AGHT+IGLl/YBjb8Fw04GqTv8lt922THEmFbqhjte1HcEB/Ytub/5yDlHNnWl9fVh1+XR+h8/Felg X-Received: by 2002:a05:6402:43ce:b0:5bf:2577:4346 with SMTP id 4fb4d7f45d1cf-5c3dc79a821mr1807308a12.15.1725630110202; Fri, 06 Sep 2024 06:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725630110; cv=none; d=google.com; s=arc-20240605; b=drAPd0k2XphDxRfAgujRxC6NsgAg4s5hUpMb2KH+NVEy75fNp6Zwtt1n8nCnIFMSaB tyNs/Hno9oaDfpAHeMh51M75A2WGNnIYfe5Y4maG9HZwYoO/dMcuFPb3lb3TVewGJ+sJ Cq8vc3s3AvI6ajTA3fyFqAeHupKlcco4tj2BRCgyV1gLYWnkVuhn1v9+tavCCxRCRKdq SNCAz9x779THzBCTPq96qWJahZqzLJoOBQ23tIKQh2dJqZ7Ajho5wbiScfpV9ka3pBlP 6wMutPXgs9RCnvIl1ixwjYCgxfzratS3Uzq6VMroN1TaoRYtRyY8Lkif0m4Gj2hPboGJ yn9A== 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=4O8vzSwczcTurXtocCsGP76Je8ErZiGkbDYKjogNVi4=; fh=Ay+JQvKs/Fy5NmGtw3qtyk8KSi8EQLEQpniq7GXUZNY=; b=cGuN3WirDZwQjFSspKJ/M627CoEjqzAdV3tf/DebS78PPv48ZZuEQuMBL7TMlfmnjq zLcfkBjEizdalrlVEFeyffSdZzBrkoUUUeonqVomzrA3zx/uXNctj5z+7wVUk1FSRYgK FPckF8qC1p2ii6PPKPw6NFtrf1JwkoRcv+haN5SqHQ3KpXH9tUUlN32hxxvUIGGpvPuE CHW7otYMce1iKqriie0FCYamAx97YCTN5XI/7YBLvN2WCaTzLUniuyk1cCqdB0aFeSyt sI9Ral6BTzrJJX+GaN1eTKuj+5Hcy2Wvlv19+3ST1RRWIa1BgYRMw5q2OgJ70yFDlf0a h0kg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GbjSZmLd; 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 4fb4d7f45d1cf-5c3cc52af57si3259472a12.33.2024.09.06.06.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:41:50 -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=GbjSZmLd; 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 C84FE88D06; Fri, 6 Sep 2024 15:41:14 +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="GbjSZmLd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A20788CF1; Fri, 6 Sep 2024 14:35:07 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 A955588BAE for ; Fri, 6 Sep 2024 14:35: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=jerome.forissier@linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3787e067230so1214432f8f.1 for ; Fri, 06 Sep 2024 05:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626104; x=1726230904; 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=4O8vzSwczcTurXtocCsGP76Je8ErZiGkbDYKjogNVi4=; b=GbjSZmLdW/T5bptC6O/i8rSkOhA/7eIJ3bocB8nS/2lRkLgnFaR3i7pCs9OeQRCbHV cmUGRE5poe+1viN7ehzM+nyF6Ulvjq1RE/crVElh226p6kjP7TTA69k+bXjvE7av9SqE HypN70ddp001uQ13Mxn7VB+V/58LOu3yVDeuaPJ0MrKPuU6Jp5XHOflpb9uWyI8GH2ji J7xkiuhem2OCjw397+FmeomNEJmbQueNSlbwk4K3pH2yVr63cNMuXe8/Zx1BHHc9Xqsd mjA4o5jcfpGFdXZFp7z11sP0sByMNGGzTE9/0Xr87U4UzMJZV23mZN0HVaIrjLljhGFr 4Ndw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626104; x=1726230904; 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=4O8vzSwczcTurXtocCsGP76Je8ErZiGkbDYKjogNVi4=; b=IkoT/LzasXDXLs2kEWpRUF8UrCPByMOIDSkXQzAHY0vhU1nulMvwsdI/Z2t4vBATOu OYaBND0CcbHb+qqS38q4g2l0ijRs54RSyvN8fxx2aMDRy/5Cu5MvS3ju24vu4XIs8ZV8 bqxtD07kNoq559IfI9FEzzkH3GsR5kt9YP57B1EdVogmfyu7hEaBI8J08c1bu45XQFjK 7+5yaw31uv+TBs7gid26ggmaNqqd0tJCx3eFdF/3/YVvYRzkaN0XZWT+N/aFdTaqg97t tjj2uyaL4kz6cW3gmWAQ9RRPf0KAAzYRWf1zDGUgcSDtar/GpkFCelC9radXa/m4raw0 HA9A== X-Gm-Message-State: AOJu0YwcclhPY6LHVC5TCQtX2YSwQlIuTkiS3ht50uiWee7aMZwdhmV9 DcD9NfiK11lWQPEaYqm7pAdkbmr1H+uI+a7r5C+c/YEv7QA4VwapiQXkZwVdg6uwRv7mkkSQfVR T0NOoNZ10 X-Received: by 2002:a5d:55d0:0:b0:368:65ad:529 with SMTP id ffacd0b85a97d-378895ca93bmr1653134f8f.17.1725626103507; Fri, 06 Sep 2024 05:35:03 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:02 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Manoj Sai , Matteo Lisi , Tom Rini , Gilles Talis , Michal Simek , Marek Vasut , Joe Hershberger , Ramon Fried , Peng Fan , Nishanth Menon , Simon Glass , Sughosh Ganu , Petr Zejdl , Venkatesh Yadav Abbarapu , Algapally Santosh Sagar , James Hilliard , Heinrich Schuchardt , Mattijs Korpershoek , Eddie James , AKASHI Takahiro , Francis Laniel , Maxim Moskalets , Rasmus Villemoes , Sean Anderson , Janne Grunau , Neal Gompa , Yang Xiwen , Neil Armstrong , Philip Oberfichtner , Boon Khai Ng , Robert Marko , Jonas Karlman Subject: [PATCH v10 08/25] net-lwip: add DHCP support and dhcp commmand Date: Fri, 6 Sep 2024 14:33:24 +0200 Message-Id: <0cd90650b93ecb5b072cd9e5b9fd34a2149a40d8.1725625913.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2024 15:41:12 +0200 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 what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb(). Signed-off-by: Jerome Forissier --- board/engicam/imx8mp/icore_mx8mp.c | 2 +- .../imx8mp_debix_model_a.c | 2 +- board/ti/am335x/board.c | 3 +- board/xilinx/common/board.c | 3 +- boot/Kconfig | 3 +- cmd/Kconfig | 90 +++--- cmd/Makefile | 6 +- cmd/elf.c | 2 +- cmd/net-lwip.c | 13 + common/board_r.c | 4 +- common/usb_kbd.c | 2 +- drivers/net/Kconfig | 2 +- include/net-lwip.h | 3 + lib/tiny-printf.c | 3 +- net/Makefile | 14 +- net/lwip/Makefile | 5 + net/lwip/dhcp.c | 125 ++++++++ net/lwip/eth_internal.h | 35 +++ net/lwip/net-lwip.c | 286 ++++++++++++++++++ net/lwip/tftp.c | 11 + 20 files changed, 559 insertions(+), 55 deletions(-) create mode 100644 cmd/net-lwip.c create mode 100644 net/lwip/Makefile create mode 100644 net/lwip/dhcp.c create mode 100644 net/lwip/eth_internal.h create mode 100644 net/lwip/net-lwip.c create mode 100644 net/lwip/tftp.c diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c index e2ed70caa43..bfdc447c478 100644 --- a/board/engicam/imx8mp/icore_mx8mp.c +++ b/board/engicam/imx8mp/icore_mx8mp.c @@ -33,7 +33,7 @@ static void setup_fec(void) setbits_le32(&gpr->gpr[1], BIT(22)); } -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c index 112770ba493..c709d017483 100644 --- a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +++ b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c @@ -29,7 +29,7 @@ static void setup_fec(void) setbits_le32(&gpr->gpr[1], BIT(22)); } -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 681002ba1da..249c9fd2e7e 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -900,7 +900,8 @@ int board_late_init(void) #endif /* CPSW plat */ -#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) +#if (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) && \ + !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET, diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 3440402ab46..cb396d4bb0b 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -494,7 +494,8 @@ int board_late_init_xilinx(void) ret |= env_set_by_index("uuid", id, uuid); } - if (!CONFIG_IS_ENABLED(NET)) + if (!(CONFIG_IS_ENABLED(NET) || + CONFIG_IS_ENABLED(NET_LWIP))) continue; for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) { diff --git a/boot/Kconfig b/boot/Kconfig index 798155a5422..f5346b34dcc 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -380,7 +380,7 @@ config BOOT_DEFAULTS_CMDS select CMD_PART if PARTITIONS select CMD_DHCP if CMD_NET select CMD_PING if CMD_NET - select CMD_PXE if CMD_NET + select CMD_PXE if (CMD_NET && !NET_LWIP) select CMD_BOOTI if ARM64 select CMD_BOOTZ if ARM && !ARM64 imply CMD_MII if NET @@ -558,6 +558,7 @@ config BOOTMETH_EXTLINUX_PXE config BOOTMETH_EFILOADER bool "Bootdev support for EFI boot" depends on EFI_BINARY_EXEC + select CMD_TFTPBOOT if CMD_NET default y help Enables support for EFI boot using bootdevs. This makes the diff --git a/cmd/Kconfig b/cmd/Kconfig index 2817ccbd3dc..c3281c97501 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1788,12 +1788,16 @@ config CMD_AB_SELECT endmenu -if NET +if NET || NET_LWIP menuconfig CMD_NET bool "Network commands" default y +endif + +if NET + if CMD_NET config CMD_BOOTP @@ -1802,12 +1806,6 @@ config CMD_BOOTP help bootp - boot image via network using BOOTP/TFTP protocol -config CMD_DHCP - bool "dhcp" - depends on CMD_BOOTP - help - Boot image via network using DHCP/TFTP protocol - config CMD_DHCP6 bool "dhcp6" depends on IPV6 @@ -1951,12 +1949,6 @@ config BOOTP_VCI_STRING default "U-Boot.arm" if ARM default "U-Boot" -config CMD_TFTPBOOT - bool "tftpboot" - default y - help - tftpboot - load file via network using TFTP protocol - config CMD_TFTPPUT bool "tftp put" depends on CMD_TFTPBOOT @@ -2016,29 +2008,6 @@ config CMD_WGET wget is a simple command to download kernel, or other files, from a http server over TCP. -config CMD_MII - bool "mii" - imply CMD_MDIO - help - If set, allows 802.3(clause 22) MII Management functions interface access - The management interface specified in Clause 22 provides - a simple, two signal, serial interface to connect a - Station Management entity and a managed PHY for providing access - to management parameters and services. - The interface is referred to as the MII management interface. - -config MII_INIT - bool "Call mii_init() in the mii command" - depends on CMD_MII && (MPC8XX_FEC || FSLDMAFE || MCFFEC) - -config CMD_MDIO - bool "mdio" - depends on PHYLIB - help - If set, allows Enable 802.3(clause 45) MDIO interface registers access - The MDIO interface is orthogonal to the MII interface and extends - it by adding access to more registers through indirect addressing. - config CMD_PING bool "ping" help @@ -2087,7 +2056,7 @@ config IPV6_ROUTER_DISCOVERY help Will automatically perform router solicitation on first IPv6 network operation -endif +endif # if CMD_NET config CMD_ETHSW bool "ethsw" @@ -2109,7 +2078,52 @@ config CMD_WOL help Wait for wake-on-lan Magic Packet -endif +endif # if NET + +if NET || NET_LWIP + +if CMD_NET + +config CMD_DHCP + bool "dhcp" + select PROT_DHCP_LWIP if NET_LWIP + help + Boot image via network using DHCP/TFTP protocol + +config CMD_MII + bool "mii" + imply CMD_MDIO + help + If set, allows 802.3(clause 22) MII Management functions interface access + The management interface specified in Clause 22 provides + a simple, two signal, serial interface to connect a + Station Management entity and a managed PHY for providing access + to management parameters and services. + The interface is referred to as the MII management interface. + +config MII_INIT + bool "Call mii_init() in the mii command" + depends on CMD_MII && (MPC8XX_FEC || FSLDMAFE || MCFFEC) + +config CMD_MDIO + bool "mdio" + depends on PHYLIB + help + If set, allows Enable 802.3(clause 45) MDIO interface registers access + The MDIO interface is orthogonal to the MII interface and extends + it by adding access to more registers through indirect addressing. + +config CMD_TFTPBOOT + bool "tftp" + select PROT_UDP_LWIP if NET_LWIP + default n + help + tftpboot - load file via network using TFTP protocol + Currently a placeholder (not implemented) when NET_LWIP=y. + +endif # if CMD_NET + +endif # if NET || NET_LWIP menu "Misc commands" diff --git a/cmd/Makefile b/cmd/Makefile index 91227f1249c..1c8cc42503d 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -127,7 +127,11 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -obj-$(CONFIG_CMD_NET) += net.o +ifdef CONFIG_CMD_NET +obj-$(CONFIG_NET) += net.o +obj-$(CONFIG_NET_LWIP) += net-lwip.o +CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o obj-$(CONFIG_CMD_ONENAND) += onenand.o diff --git a/cmd/elf.c b/cmd/elf.c index f07e344a596..e4c68744d5f 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -130,7 +130,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) else addr = hextoul(argv[1], NULL); -#if defined(CONFIG_CMD_NET) +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP) /* * Check to see if we need to tftp the image ourselves * before starting diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c new file mode 100644 index 00000000000..82edb5fd2e6 --- /dev/null +++ b/cmd/net-lwip.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include + +#if defined(CONFIG_CMD_DHCP) +U_BOOT_CMD( + dhcp, 3, 1, do_dhcp, + "boot image via network using DHCP/TFTP protocol", + "[loadAddress] [[hostIPaddr:]bootfilename]" +); +#endif diff --git a/common/board_r.c b/common/board_r.c index 4faaa202421..49347370a1f 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -472,7 +472,7 @@ static int initr_status_led(void) } #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) static int initr_net(void) { puts("Net: "); @@ -738,7 +738,7 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_PCI_ENDPOINT pci_ep_init, #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) INIT_FUNC_WATCHDOG_RESET initr_net, #endif diff --git a/common/usb_kbd.c b/common/usb_kbd.c index f3b4a3c94e6..1a7d8ca9a67 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -418,7 +418,7 @@ static int usb_kbd_testc(struct stdio_dev *sdev) */ unsigned long poll_delay = CONFIG_SYS_HZ / 50; -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP) /* * If net_busy_flag is 1, NET transfer is running, * then we check key-pressed every second (first check may be diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f893edbd094..12655082af4 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -97,7 +97,7 @@ config DSA_SANDBOX menuconfig NETDEVICES bool "Network device support" - depends on NET + depends on NET || NET_LWIP select DM_ETH help You must select Y to enable any network device support diff --git a/include/net-lwip.h b/include/net-lwip.h index 5c3f9e7e86c..cfd06726577 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -10,5 +10,8 @@ struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); struct netif *net_lwip_get_netif(void); +int net_lwip_rx(struct udevice *udev, struct netif *netif); + +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 9a70c6095b3..f6727360097 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -269,7 +269,8 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) } break; case 'p': - if (CONFIG_IS_ENABLED(NET) || _DEBUG) { + if (CONFIG_IS_ENABLED(NET) || + CONFIG_IS_ENABLED(NET_LWIP) || _DEBUG) { pointer(info, fmt, va_arg(va, void *)); /* * Skip this because it pulls in _ctype which is diff --git a/net/Makefile b/net/Makefile index a9cecee637a..68370595a8e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -12,11 +12,6 @@ obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_DM_DSA) += dsa-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o -obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o -obj-$(CONFIG_DM_MDIO) += mdio-uclass.o -obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o obj-$(CONFIG_IPV6) += ndisc.o obj-$(CONFIG_$(SPL_)DM_ETH) += net.o @@ -43,4 +38,13 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif +ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y) +obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o +obj-$(CONFIG_DM_MDIO) += mdio-uclass.o +obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o +obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o +obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o obj-y += net-common.o +endif + +obj-$(CONFIG_NET_LWIP) += lwip/ diff --git a/net/lwip/Makefile b/net/lwip/Makefile new file mode 100644 index 00000000000..4e92a101ddb --- /dev/null +++ b/net/lwip/Makefile @@ -0,0 +1,5 @@ +ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot + +obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o +obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c new file mode 100644 index 00000000000..e492ad82a9b --- /dev/null +++ b/net/lwip/dhcp.c @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DHCP_TIMEOUT_MS 10000 + +#ifdef CONFIG_CMD_TFTPBOOT +/* Boot file obtained from DHCP (if present) */ +static char boot_file_name[DHCP_BOOT_FILE_LEN]; +#endif + +static void call_lwip_dhcp_fine_tmr(void *ctx) +{ + dhcp_fine_tmr(); + sys_timeout(10, call_lwip_dhcp_fine_tmr, NULL); +} + +static int dhcp_loop(struct udevice *udev) +{ + char *ipstr = "ipaddr\0\0"; + char *maskstr = "netmask\0\0"; + char *gwstr = "gatewayip\0\0"; + unsigned long start; + struct netif *netif; + struct dhcp *dhcp; + bool bound; + int idx; + + idx = dev_seq(udev); + if (idx < 0 || idx > 99) { + log_err("unexpected idx %d\n", idx); + return CMD_RET_FAILURE; + } + + netif = net_lwip_new_netif_noip(udev); + if (!netif) + return CMD_RET_FAILURE; + + start = get_timer(0); + dhcp_start(netif); + call_lwip_dhcp_fine_tmr(NULL); + + /* Wait for DHCP to complete */ + do { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + bound = dhcp_supplied_address(netif); + if (bound) + break; + if (ctrlc()) { + printf("Abort\n"); + break; + } + mdelay(1); + } while (get_timer(start) < DHCP_TIMEOUT_MS); + + sys_untimeout(call_lwip_dhcp_fine_tmr, NULL); + + if (!bound) { + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + dhcp = netif_dhcp_data(netif); + + env_set("bootfile", dhcp->boot_file_name); + + if (idx > 0) { + sprintf(ipstr, "ipaddr%d", idx); + sprintf(maskstr, "netmask%d", idx); + sprintf(gwstr, "gatewayip%d", idx); + } + + env_set(ipstr, ip4addr_ntoa(&dhcp->offered_ip_addr)); + env_set(maskstr, ip4addr_ntoa(&dhcp->offered_sn_mask)); + env_set("serverip", ip4addr_ntoa(&dhcp->server_ip_addr)); + if (dhcp->offered_gw_addr.addr != 0) + env_set(gwstr, ip4addr_ntoa(&dhcp->offered_gw_addr)); + +#ifdef CONFIG_PROT_DNS_LWIP + env_set("dnsip", ip4addr_ntoa(dns_getserver(0))); + env_set("dnsip2", ip4addr_ntoa(dns_getserver(1))); +#endif +#ifdef CONFIG_CMD_TFTPBOOT + if (dhcp->boot_file_name[0] != '\0') + strncpy(boot_file_name, dhcp->boot_file_name, + sizeof(boot_file_name)); +#endif + + printf("DHCP client bound to address %pI4 (%lu ms)\n", + &dhcp->offered_ip_addr, get_timer(start)); + + net_lwip_remove_netif(netif); + return CMD_RET_SUCCESS; +} + +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + eth_set_current(); + + return dhcp_loop(eth_get_dev()); +} + +int dhcp_run(ulong addr, const char *fname, bool autoload) +{ + char *dhcp_argv[] = {"dhcp", NULL, }; + struct cmd_tbl cmdtp = {}; /* dummy */ + + if (autoload) { + /* Will be supported when TFTP is added */ + return -EOPNOTSUPP; + } + + return do_dhcp(&cmdtp, 0, 1, dhcp_argv); +} diff --git a/net/lwip/eth_internal.h b/net/lwip/eth_internal.h new file mode 100644 index 00000000000..0b829a8d388 --- /dev/null +++ b/net/lwip/eth_internal.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2001-2015 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * Joe Hershberger, National Instruments + */ + +#ifndef __ETH_INTERNAL_H +#define __ETH_INTERNAL_H + +/* Do init that is common to driver model and legacy networking */ +void eth_common_init(void); + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +int eth_mac_skip(int index); +void eth_current_changed(void); +void eth_set_dev(struct udevice *dev); +void eth_set_current_to_next(void); + +#endif diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c new file mode 100644 index 00000000000..fa4ad2a65f8 --- /dev/null +++ b/net/lwip/net-lwip.c @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* xx:xx:xx:xx:xx:xx\0 */ +#define MAC_ADDR_STRLEN 18 + +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +void (*push_packet)(void *, int len) = 0; +#endif +int net_restart_wrap; +static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]; +uchar *net_rx_packets[PKTBUFSRX]; +uchar *net_rx_packet; +const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + +static err_t linkoutput(struct netif *netif, struct pbuf *p) +{ + struct udevice *udev = netif->state; + void *pp = NULL; + int err; + + if ((unsigned long)p->payload % PKTALIGN) { + /* + * Some net drivers have strict alignment requirements and may + * fail or output invalid data if the packet is not aligned. + */ + pp = memalign(PKTALIGN, p->len); + if (!pp) + return ERR_ABRT; + memcpy(pp, p->payload, p->len); + } + + err = eth_get_ops(udev)->send(udev, pp ? pp : p->payload, p->len); + free(pp); + if (err) { + log_err("send error %d\n", err); + return ERR_ABRT; + } + + return ERR_OK; +} + +static err_t net_lwip_if_init(struct netif *netif) +{ +#if LWIP_IPV4 + netif->output = etharp_output; +#endif + netif->linkoutput = linkoutput; + netif->mtu = 1500; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + + return ERR_OK; +} + +static void eth_init_rings(void) +{ + int i; + + for (i = 0; i < PKTBUFSRX; i++) + net_rx_packets[i] = net_pkt_buf + i * PKTSIZE_ALIGN; +} + +struct netif *net_lwip_get_netif(void) +{ + struct netif *netif, *found = NULL; + + NETIF_FOREACH(netif) { + if (!found) + found = netif; + else + printf("Error: more than one netif in lwIP\n"); + } + return found; +} + +static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip, + ip4_addr_t *mask, ip4_addr_t *gw) +{ + char *ipstr = "ipaddr\0\0"; + char *maskstr = "netmask\0\0"; + char *gwstr = "gatewayip\0\0"; + int idx = dev_seq(dev); + char *env; + + if (idx < 0 || idx > 99) { + log_err("unexpected idx %d\n", idx); + return -1; + } + + if (idx) { + sprintf(ipstr, "ipaddr%d", idx); + sprintf(maskstr, "netmask%d", idx); + sprintf(gwstr, "gatewayip%d", idx); + } + + ip4_addr_set_zero(ip); + ip4_addr_set_zero(mask); + ip4_addr_set_zero(gw); + + env = env_get(ipstr); + if (env) + ip4addr_aton(env, ip); + + env = env_get(maskstr); + if (env) + ip4addr_aton(env, mask); + + env = env_get(gwstr); + if (env) + ip4addr_aton(env, gw); + + return 0; +} + +static struct netif *new_netif(struct udevice *udev, bool with_ip) +{ + unsigned char enetaddr[ARP_HLEN]; + char hwstr[MAC_ADDR_STRLEN]; + ip4_addr_t ip, mask, gw; + struct netif *netif; + int ret = 0; + bool first_call = true; + + if (!udev) + return NULL; + + if (first_call) { + eth_init_rings(); + /* Pick a valid active device, if any */ + eth_init(); + first_call = false; + } + + if (eth_start_udev(udev) < 0) { + log_err("Could not start %s\n", udev->name); + return NULL; + } + + netif_remove(net_lwip_get_netif()); + + ip4_addr_set_zero(&ip); + ip4_addr_set_zero(&mask); + ip4_addr_set_zero(&gw); + + if (with_ip) + if (get_udev_ipv4_info(udev, &ip, &mask, &gw) < 0) + return NULL; + + eth_env_get_enetaddr_by_index("eth", dev_seq(udev), enetaddr); + ret = snprintf(hwstr, MAC_ADDR_STRLEN, "%pM", enetaddr); + if (ret < 0 || ret >= MAC_ADDR_STRLEN) + return NULL; + + netif = calloc(1, sizeof(struct netif)); + if (!netif) + return NULL; + + netif->name[0] = 'e'; + netif->name[1] = 't'; + + string_to_enetaddr(hwstr, netif->hwaddr); + netif->hwaddr_len = ETHARP_HWADDR_LEN; + debug("adding lwIP netif for %s with hwaddr:%s ip:%s ", udev->name, + hwstr, ip4addr_ntoa(&ip)); + debug("mask:%s ", ip4addr_ntoa(&mask)); + debug("gw:%s\n", ip4addr_ntoa(&gw)); + + if (!netif_add(netif, &ip, &mask, &gw, udev, net_lwip_if_init, + netif_input)) { + printf("error: netif_add() failed\n"); + free(netif); + return NULL; + } + + netif_set_up(netif); + netif_set_link_up(netif); + /* Routing: use this interface to reach the default gateway */ + netif_set_default(netif); + + return netif; +} + +struct netif *net_lwip_new_netif(struct udevice *udev) +{ + return new_netif(udev, true); +} + +struct netif *net_lwip_new_netif_noip(struct udevice *udev) +{ + + return new_netif(udev, false); +} + +void net_lwip_remove_netif(struct netif *netif) +{ + netif_remove(netif); + free(netif); +} + +int net_init(void) +{ + eth_set_current(); + + net_lwip_new_netif(eth_get_dev()); + + return 0; +} + +static struct pbuf *alloc_pbuf_and_copy(uchar *data, int len) +{ + struct pbuf *p, *q; + + /* We allocate a pbuf chain of pbufs from the pool. */ + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + if (!p) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + return NULL; + } + + for (q = p; q != NULL; q = q->next) { + memcpy(q->payload, data, q->len); + data += q->len; + } + + LINK_STATS_INC(link.recv); + + return p; +} + +int net_lwip_rx(struct udevice *udev, struct netif *netif) +{ + struct pbuf *pbuf; + uchar *packet; + int flags; + int len; + int i; + + if (!eth_is_active(udev)) + return -EINVAL; + + flags = ETH_RECV_CHECK_DEVICE; + for (i = 0; i < ETH_PACKETS_BATCH_RECV; i++) { + len = eth_get_ops(udev)->recv(udev, flags, &packet); + flags = 0; + + if (len > 0) { + pbuf = alloc_pbuf_and_copy(packet, len); + if (pbuf) + netif->input(pbuf, netif); + if (eth_get_ops(udev)->free_pkt) + eth_get_ops(udev)->free_pkt(udev, packet, len); + } + if (len <= 0) + break; + } + if (len == -EAGAIN) + len = 0; + + return len; +} + +void net_process_received_packet(uchar *in_packet, int len) +{ +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) + if (push_packet) + (*push_packet)(in_packet, len); +#endif +} + +u32_t sys_now(void) +{ + return get_timer(0); +} diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c new file mode 100644 index 00000000000..1fa246f55d9 --- /dev/null +++ b/net/lwip/tftp.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include + +int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + /* Not implemented */ + return CMD_RET_FAILURE; +} From patchwork Fri Sep 6 12:33:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825959 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778201wrb; Fri, 6 Sep 2024 05:35:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW54rC+xnGBBw3WsC3aVFOGXS9j599hLfInw3aEbD0n4hqc631VzJK1sqqH3ia0sxuYXuQ4MA==@linaro.org X-Google-Smtp-Source: AGHT+IFtLIBxJvwpjKUFXI52EjPLPdCOoqCAxi4MQg3zPrFRQLvO2gLdr9DWK/1XSK9AyrnqnxA3 X-Received: by 2002:a17:906:ef09:b0:a77:ab9e:9202 with SMTP id a640c23a62f3a-a8a42f8af0amr937250266b.4.1725626142092; Fri, 06 Sep 2024 05:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626142; cv=none; d=google.com; s=arc-20240605; b=HvOBgp0KJjlPjzV/jGXUoBXoAPIacbejdSuGZXGLMjraysqFr6d9m/19mikfl1fefs X+q13AhPE/SijCkLrRFIjhQDKwCMv5E/g4wnMO9JQPkwhnQpyIe6kmSpP3ejugo+zSSx BFooGkleh1OMCS+tgTjz3JIxv4eNVXaE+0wVAvafs2PvvPQNe/nVBAyyRz3+I7lspnX4 L0dYXyAeU/Ao68ZsniEcm9qfR8uc3cIJw9l0vx2R+wcm9aguWtMhc084lMPbadwqeiMQ ZgdUmH0aZhMao5Mv9YHAa9OrRe8lvTqzMSJ9BZskwz6xjUI4vrePwHw3Bu6mvkFDEooh aQnQ== 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=p+Lk/w69NsA/TI0A0wUcPiB48B6Rw/VrcXK6XGOpXwQ=; fh=BjN7hpemXuZuDoC1IU/AMMuzztG4vTywjdiyBHqo+EA=; b=aviBW6CMBqpwDpVPBjD9FdKEIPgn6D9AphfEQ6lTqFZzuV6p9d4IQW+HFQqWtNNje9 UeZEA3vqnq4F4mmktbvYz8vsMTMVxyAeZcTuyJ7/ZBAdJaa/PyL+if2oWX1cpY27h299 Y1pbZbqLZ8CmC7R2Hv95uWNYocbPX4lUUgw00oz6r6l0w+HQrWRLFat7EpGlELKFqroR cQ8JQyxWKieQbIM1f+cz1kf2qukKtwE0lUJbWJTLptP2S59JcQtZg2QP9PoLmoWP6wK5 9tJrGc76IXGYDl2ancllecgz2u2piAnsuc6JpYxYSkhxCh4jQFzRD6eKenfiQNtbu7Bi GH1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CDKIdGIm; 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; dara=neutral header.i=@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 4fb4d7f45d1cf-5c3cc6c6d72si2936126a12.692.2024.09.06.05.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:42 -0700 (PDT) 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=CDKIdGIm; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 77EFF88C9F; Fri, 6 Sep 2024 14:35:12 +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="CDKIdGIm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B84288CD1; Fri, 6 Sep 2024 14:35:11 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 8160388C5C for ; Fri, 6 Sep 2024 14:35:07 +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-wr1-x42e.google.com with SMTP id ffacd0b85a97d-374c5bab490so1843460f8f.1 for ; Fri, 06 Sep 2024 05:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626107; x=1726230907; 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=p+Lk/w69NsA/TI0A0wUcPiB48B6Rw/VrcXK6XGOpXwQ=; b=CDKIdGImJptSNKbE6n3lJ5IHaKuHwSMGEB3NR4XlmDQWgzR10SmoMso3LKfHfBH13o N5t258o48gNFw8AFYcN48k4zFzOuUFGtW/CgmIsbsSxfj+LKCE+UeblTgPgMI+GRPDrQ TrinZnIvXAwSdUQf+HiabB4eMSKF98y6uuar5VPIuQifHCpPRKLySknSaUcbWSFE4rST ARaVFLz+1rhv4IpEfRNxDxJfpaiNry86UfPeld2xAPRSYRx40Y1a73fXMedDbrzVNqZK bgp8F3Ko3e92MRZvO4elzk+wG6RJ6WAq0RAyjUOnp/wvJwxrNx+2DflIQ+f1z9BRc5Am cAWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626107; x=1726230907; 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=p+Lk/w69NsA/TI0A0wUcPiB48B6Rw/VrcXK6XGOpXwQ=; b=W0Tth7lS7XhfExRA44Rg9U5z82UWzcKB2P3PRV/A78pgaYrOiQvqOYUyAojcbzTSRf /cy3VJ3UA/zq+cm7Kd8K1RiH7Ca4fNskbbLwtwRR2HMTkcz+nUD4Z15ZmyEFt0YZDcZM MpUqHsiNggFa4k2TWsmhDqR1uU7o42fGtRalEFnmPVRFPflMfoYtSEnloB/ovbKmgRVR lHBT3dVGNxusrJJAmJ09FEar9TOofp411gEPNHcxX9Bo/rIl0wd1PZHqpYXk+5J9/kSU tKysv6D5JwzGIYMlf9GUz0iaaynIkID/3sfXr/GiXBQuwtZBwis4vIIeExaHSldojudu 7wJg== X-Gm-Message-State: AOJu0YwFyidKGg30PM4aS8q+K8H0AlCzmHfl0uX6VfaunSUpznlwc6kB TiMan9ZpLCNh6HMxBseUWumPg8vNf+tbxtVml4xZMClsaMJZg1M0aGzfSAu7sihWZUrxby4Cppv ZIPGeWixi X-Received: by 2002:a5d:4146:0:b0:367:938f:550 with SMTP id ffacd0b85a97d-3779bb2e591mr6227420f8f.25.1725626106689; Fri, 06 Sep 2024 05:35:06 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:06 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , Heinrich Schuchardt , AKASHI Takahiro , Masahisa Kojima , Marek Vasut , Sean Anderson Subject: [PATCH v10 09/25] net-lwip: add TFTP support and tftpboot command Date: Fri, 6 Sep 2024 14:33:25 +0200 Message-Id: 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 Implement do_tftpb(). This implementation of the tftp command supports an optional port number. For example: tftp 192.168.0.30:9069:file.bin It also supports taking the server IP from ${tftpserverip} if defined, before falling back to ${serverip}. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 3 +- cmd/net-lwip.c | 8 ++ include/net-common.h | 4 + include/net-lwip.h | 4 + net/lwip/dhcp.c | 11 +- net/lwip/net-lwip.c | 16 +++ net/lwip/tftp.c | 279 ++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 319 insertions(+), 6 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index c3281c97501..6691c2d6fa6 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2116,10 +2116,9 @@ config CMD_MDIO config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP - default n + default y help tftpboot - load file via network using TFTP protocol - Currently a placeholder (not implemented) when NET_LWIP=y. endif # if CMD_NET diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 82edb5fd2e6..80f0872bb8f 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -11,3 +11,11 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); #endif + +#if defined(CONFIG_CMD_TFTPBOOT) +U_BOOT_CMD( + tftpboot, 3, 0, do_tftpb, + "boot image via network using TFTP protocol\n", + "[loadAddress] [[hostIPaddr:]bootfilename]" +); +#endif diff --git a/include/net-common.h b/include/net-common.h index 68963a3e9ac..eb23a8883b4 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -440,6 +440,10 @@ static inline struct in_addr env_get_ip(char *var) int net_init(void); +/* NET compatibility */ +enum proto_t; +int net_loop(enum proto_t protocol); + /** * dhcp_run() - Run DHCP on the current ethernet device * diff --git a/include/net-lwip.h b/include/net-lwip.h index cfd06726577..37744b0e2cd 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -6,6 +6,10 @@ #include #include +enum proto_t { + TFTPGET +}; + struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c index e492ad82a9b..2b5d51924af 100644 --- a/net/lwip/dhcp.c +++ b/net/lwip/dhcp.c @@ -114,11 +114,20 @@ int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) int dhcp_run(ulong addr, const char *fname, bool autoload) { char *dhcp_argv[] = {"dhcp", NULL, }; +#ifdef CONFIG_CMD_TFTPBOOT + char *tftp_argv[] = {"tftpboot", boot_file_name, NULL, }; +#endif struct cmd_tbl cmdtp = {}; /* dummy */ if (autoload) { - /* Will be supported when TFTP is added */ +#ifdef CONFIG_CMD_TFTPBOOT + /* Assume DHCP was already performed */ + if (boot_file_name[0]) + return do_tftpb(&cmdtp, 0, 2, tftp_argv); + return 0; +#else return -EOPNOTSUPP; +#endif } return do_dhcp(&cmdtp, 0, 1, dhcp_argv); diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index fa4ad2a65f8..dd8e3deeff4 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -24,6 +24,7 @@ static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]; uchar *net_rx_packets[PKTBUFSRX]; uchar *net_rx_packet; const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +char net_boot_file_name[1024]; static err_t linkoutput(struct netif *netif, struct pbuf *p) { @@ -280,6 +281,21 @@ void net_process_received_packet(uchar *in_packet, int len) #endif } +int net_loop(enum proto_t protocol) +{ + char *argv[1]; + + switch (protocol) { + case TFTPGET: + argv[0] = "tftpboot"; + return do_tftpb(NULL, 0, 1, argv); + default: + return -EINVAL; + } + + return -EINVAL; +} + u32_t sys_now(void) { return get_timer(0); diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 1fa246f55d9..50b8fbad00d 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -2,10 +2,283 @@ /* Copyright (C) 2024 Linaro Ltd. */ #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PROGRESS_PRINT_STEP_BYTES (10 * 1024) + +enum done_state { + NOT_DONE = 0, + SUCCESS = 1, + FAILURE = 2 +}; + +struct tftp_ctx { + ulong daddr; + ulong size; + ulong block_count; + ulong start_time; + enum done_state done; +}; + +static void *tftp_open(const char *fname, const char *mode, u8_t is_write) +{ + return NULL; +} + +static void tftp_close(void *handle) +{ + struct tftp_ctx *ctx = handle; + ulong elapsed; + + if (ctx->done == FAILURE) { + /* Closing after an error */ + return; + } + ctx->done = SUCCESS; + + elapsed = get_timer(ctx->start_time); + if (elapsed > 0) { + puts("\n\t "); /* Line up with "Loading: " */ + print_size(ctx->size / elapsed * 1000, "/s"); + } + puts("\ndone\n"); + printf("Bytes transferred = %lu (%lx hex)\n", ctx->size, ctx->size); + + if (env_set_hex("filesize", ctx->size)) { + log_err("filesize not updated\n"); + return; + } +} + +static int tftp_read(void *handle, void *buf, int bytes) +{ + return 0; +} + +static int tftp_write(void *handle, struct pbuf *p) +{ + struct tftp_ctx *ctx = handle; + struct pbuf *q; + + for (q = p; q != NULL; q = q->next) { + memcpy((void *)ctx->daddr, q->payload, q->len); + ctx->daddr += q->len; + ctx->size += q->len; + ctx->block_count++; + if (ctx->block_count % 10 == 0) { + putc('#'); + if (ctx->block_count % (65 * 10) == 0) + puts("\n\t "); + } + } + + return 0; +} + +static void tftp_error(void *handle, int err, const char *msg, int size) +{ + struct tftp_ctx *ctx = handle; + char message[100]; + + ctx->done = FAILURE; + memset(message, 0, sizeof(message)); + memcpy(message, msg, LWIP_MIN(sizeof(message) - 1, (size_t)size)); + + printf("\nTFTP error: %d (%s)\n", err, message); +} + +static const struct tftp_context tftp_context = { + tftp_open, + tftp_close, + tftp_read, + tftp_write, + tftp_error +}; + +static int tftp_loop(struct udevice *udev, ulong addr, char *fname, + ip_addr_t srvip, uint16_t srvport) +{ + struct netif *netif; + struct tftp_ctx ctx; + err_t err; + + if (!fname || addr == 0) + return -1; + + if (!srvport) + srvport = TFTP_PORT; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + ctx.done = NOT_DONE; + ctx.size = 0; + ctx.block_count = 0; + ctx.daddr = addr; + + printf("Using %s device\n", udev->name); + printf("TFTP from server %s; our IP address is %s\n", + ip4addr_ntoa(&srvip), env_get("ipaddr")); + printf("Filename '%s'.\n", fname); + printf("Load address: 0x%lx\n", ctx.daddr); + printf("Loading: "); + + err = tftp_init_client(&tftp_context); + if (!(err == ERR_OK || err == ERR_USE)) + log_err("tftp_init_client err: %d\n", err); + + ctx.start_time = get_timer(0); + err = tftp_get(&ctx, &srvip, srvport, fname, TFTP_MODE_OCTET); + /* might return different errors, like routing problems */ + if (err != ERR_OK) { + printf("tftp_get() error %d\n", err); + net_lwip_remove_netif(netif); + return -1; + } + + while (!ctx.done) { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + if (ctrlc()) + break; + } + + tftp_cleanup(); + + net_lwip_remove_netif(netif); + + if (ctx.done == SUCCESS) { + if (env_set_hex("fileaddr", addr)) { + log_err("fileaddr not updated\n"); + return -1; + } + efi_set_bootdev("Net", "", fname, map_sysmem(addr, 0), + ctx.size); + return 0; + } + + return -1; +} int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - /* Not implemented */ - return CMD_RET_FAILURE; + char *arg = NULL; + char *words[3] = { }; + char *fname = NULL; + char *server_ip = NULL; + char *server_port = NULL; + char *end; + ip_addr_t srvip; + uint16_t port = TFTP_PORT; + ulong laddr; + ulong addr; + int ret; + int i; + + laddr = env_get_ulong("loadaddr", 16, image_load_addr); + + switch (argc) { + case 1: + fname = env_get("bootfile"); + break; + case 2: + /* + * Only one arg - accept two forms: + * Just load address, or just boot file name. The latter + * form must be written in a format which can not be + * mis-interpreted as a valid number. + */ + addr = hextoul(argv[1], &end); + if (end == (argv[1] + strlen(argv[1]))) { + laddr = addr; + fname = env_get("bootfile"); + } else { + arg = strdup(argv[1]); + } + break; + case 3: + laddr = hextoul(argv[1], NULL); + arg = strdup(argv[2]); + break; + default: + ret = CMD_RET_USAGE; + goto out; + } + + if (!arg) + arg = net_boot_file_name; + + if (arg) { + /* Parse [ip:[port:]]fname */ + i = 0; + while ((*(words + i) = strsep(&arg,":"))) + i++; + + switch (i) { + case 3: + server_ip = words[0]; + server_port = words[1]; + fname = words[2]; + break; + case 2: + server_ip = words[0]; + fname = words[1]; + break; + case 1: + fname = words[0]; + break; + default: + break; + } + } + + if (!server_ip) + server_ip = env_get("tftpserverip"); + if (!server_ip) + server_ip = env_get("serverip"); + if (!server_ip) { + log_err("error: tftpserverip/serverip has to be set\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (server_port) + port = dectoul(server_port, NULL); + + if (!ipaddr_aton(server_ip, &srvip)) { + log_err("error: ipaddr_aton\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (!fname) { + log_err("error: no file name\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (!laddr) { + log_err("error: no load address\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + eth_set_current(); + + if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0) + ret = CMD_RET_FAILURE; +out: + free(arg); + return ret; } From patchwork Fri Sep 6 12:33:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825960 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778243wrb; Fri, 6 Sep 2024 05:35:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLkILyirVToJqAG2wmSUP8F6JNO53CAUClqObSpHabPFvThTrB4byhSzAQcFZlLJUmrAlhOQ==@linaro.org X-Google-Smtp-Source: AGHT+IGwTvguXMRgpFg/iFCGWXnAUq4TzqyR045kTWOmUFbsansvOy6WkWocb1ND2cqFzWaOiby8 X-Received: by 2002:a17:907:987:b0:a80:f6a9:c311 with SMTP id a640c23a62f3a-a8a88273565mr196881866b.0.1725626152093; Fri, 06 Sep 2024 05:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626152; cv=none; d=google.com; s=arc-20240605; b=P0VsLvh1eckMpqabgl3EOY1S0I8zyjc6GA+VO7yRssFl6eLzBTdPnG5uWtWYmBFelO r7pRpo90Jccx4Ntb7vDNcw/CNYlWk8XkXuak/cPqL6ZsyzmpTQTXu40URquPoTArx4Qx Q6eqfUJa5sc7bXl7qA9V8diWyoKpcq2mIFaQeiImh1sSkkm9M4IBSpCi6qhJDDCuIsoq Z3Pk817hwgXWsqTqOYlBaGZnNi0VMbVPRzBaiewo6/b6Og50Ir2yZnvx4QZltNEgSHQ+ BEQqjcv53kHa2jkX/Sa0N2mHktFIwxOmSEDAtlyIhDaSaUipN187avSSzq8wMc/IIM2E heyQ== 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=a6UoK0GW2wBAOGrWoZP36IXGwuRg6upu/HX/ki4CUrY=; fh=Npu+gD/Goq5lITR8C++Do9EJooTFKHb/914IcqrF34I=; b=dSBQhTpd24WU7M1hZOS2q5lW7VrRu8qBva1IspEoAKTrKYrxtuijd6mdtSVC/x2XYt d9nBtZDv3ZB35lHiE6oGuhy6yhYtu6NGbLR4mkab+G3IeUW3d2VqNuzGBRF57rYHtPgz QhZIQhwTO/IT/fjvUZ8yT6dpqT09c9Gn4RIw0HhKLkKXSwLJXgSzGlLKr7Fy/1Eh3Zuk /AQdprvw8j0LurihhX+VN6qOlR9SWQ+AfoyrTkPNV9WVoVfQmnjhyM/vDLLJdQ79+Um7 IKMt5+Q95Pr9D1RWbGlX6g3yp4vifM1AkOhwWAtX0KXnfwWvgkMTMO/Q0FnEZRxxF1bs 2y3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xgp/h38X"; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a90168437si82400966b.830.2024.09.06.05.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:52 -0700 (PDT) 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="Xgp/h38X"; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C492988CF5; Fri, 6 Sep 2024 14:35:12 +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="Xgp/h38X"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE3A988C5C; Fri, 6 Sep 2024 14:35:11 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 BC91B88A1B for ; Fri, 6 Sep 2024 14:35:09 +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-wr1-x433.google.com with SMTP id ffacd0b85a97d-371ba7e46easo1222953f8f.0 for ; Fri, 06 Sep 2024 05:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626109; x=1726230909; 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=a6UoK0GW2wBAOGrWoZP36IXGwuRg6upu/HX/ki4CUrY=; b=Xgp/h38XG8haUeH3v2yRoONbgZB5M09bwfuywkSDcLOiv0fCPqkzevpqw3dUi8G3rm +kCJ7tcMIpywsbLt/K5gCcg4VNh4xnvR2u77MhpYFHmkQMD+2XaGsX6trKEFDul08JkJ jb78KRnr4ZdiBoWABxx5aNNb7zBP+4AUJaAFCt4ShUpycn8AjExcZM3+YI+OeIzLWJFW /c+L534K37zhya31SyYshg0im0YA3Jn0S1/15Ih6PmGzeWN+w9ZfbPbiKy0MQ+mbla6+ igKmXbZDtCOMt10370SvTOo5ywM+GDNHS2Z0BQAvKt5kp/YdSetoy5vfOK2YXj9rm3IG 0hpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626109; x=1726230909; 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=a6UoK0GW2wBAOGrWoZP36IXGwuRg6upu/HX/ki4CUrY=; b=RxPVyWSHrKEBTzGGENgM4Udbjmef5P9LQ4pR4MjCGiX87FUoeqJL3k7X6K/cqlzz94 zPa9E94ZoyeyJZaBx4bikkwn+P4ZTenfzxc66jr2ziFD1mfbtdk6qQlFBcSJ00RfGxYk UMQs3sYic4hEsFX3ZKBI9uwWD4cVg1p5PiJIFlWeUCFaHOTFxOHpmRi+6qEzLployYAl NyRz3do808Hi7lkePAUW2NSqT+3qIfsVLdaFPQwe6CoJANYzpX4SXadQE83COJ8SI8/C LVWy0/HXsl7yZjvHHADdnmtKdMx/7vxfFVjM8yYGXTQJQYQcfCKL+ckbdPT70Ls56lrw aYBA== X-Gm-Message-State: AOJu0YymJqBpTen4V2WnFgkPsuevcmaWRDGRIgv3APV8lPvhkB2ua9A3 Jou/t+ScHyIuwD0EQyWPQ4BiJYd90sP/IA0qSiRBxksPpp9iPDDS1Pn+DRmpB5nAwmv5aEO9Nvz p94YtjKjA X-Received: by 2002:adf:ab0d:0:b0:374:b31e:3b3b with SMTP id ffacd0b85a97d-378895c5c65mr1572961f8f.1.1725626108860; Fri, 06 Sep 2024 05:35:08 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:08 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Heinrich Schuchardt Subject: [PATCH v10 10/25] net-lwip: add ping command Date: Fri, 6 Sep 2024 14:33:26 +0200 Message-Id: <81528d7cde52099f1bedfef40b39f1dd90e7ca80.1725625913.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 Add support for the the ping command with NET_LWIP. The implementation is derived from lwIP's contrib/apps/ping/ping.c. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 11 +-- cmd/net-lwip.c | 8 ++ include/net-lwip.h | 1 + net/lwip/Makefile | 1 + net/lwip/ping.c | 177 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 net/lwip/ping.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 6691c2d6fa6..53e03a85b12 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2008,11 +2008,6 @@ config CMD_WGET wget is a simple command to download kernel, or other files, from a http server over TCP. -config CMD_PING - bool "ping" - help - Send ICMP ECHO_REQUEST to network host - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2113,6 +2108,12 @@ config CMD_MDIO The MDIO interface is orthogonal to the MII interface and extends it by adding access to more registers through indirect addressing. +config CMD_PING + bool "ping" + select PROT_RAW_LWIP if NET_LWIP + help + Send ICMP ECHO_REQUEST to network host + config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 80f0872bb8f..feed719beef 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -12,6 +12,14 @@ U_BOOT_CMD( ); #endif +#if defined(CONFIG_CMD_PING) +U_BOOT_CMD( + ping, 2, 1, do_ping, + "send ICMP ECHO_REQUEST to network host", + "pingAddress" +); +#endif + #if defined(CONFIG_CMD_TFTPBOOT) U_BOOT_CMD( tftpboot, 3, 0, do_tftpb, diff --git a/include/net-lwip.h b/include/net-lwip.h index 37744b0e2cd..9aa371e962c 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -17,5 +17,6 @@ struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index 4e92a101ddb..b5af37a9b18 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -2,4 +2,5 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/ping.c b/net/lwip/ping.c new file mode 100644 index 00000000000..8dafa25959f --- /dev/null +++ b/net/lwip/ping.c @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PING_DELAY_MS 1000 +#define PING_COUNT 5 +/* Ping identifier - must fit on a u16_t */ +#define PING_ID 0xAFAF + +struct ping_ctx { + ip_addr_t target; + struct raw_pcb *pcb; + struct icmp_echo_hdr *iecho; + uint16_t seq_num; + bool alive; +}; + +static u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr) +{ + struct ping_ctx *ctx = arg; + struct icmp_echo_hdr *iecho = ctx->iecho; + + if (addr->addr != ctx->target.addr) + return 0; + + if ((p->tot_len >= (IP_HLEN + sizeof(struct icmp_echo_hdr))) && + pbuf_remove_header(p, IP_HLEN) == 0) { + iecho = (struct icmp_echo_hdr *)p->payload; + + if ((iecho->id == PING_ID) && + (iecho->seqno == lwip_htons(ctx->seq_num))) { + ctx->alive = true; + printf("host %s is alive\n", ipaddr_ntoa(addr)); + pbuf_free(p); + return 1; /* eat the packet */ + } + /* not eaten, restore original packet */ + pbuf_add_header(p, IP_HLEN); + } + + return 0; /* don't eat the packet */ +} + +static int ping_raw_init(struct ping_ctx *ctx) +{ + ctx->pcb = raw_new(IP_PROTO_ICMP); + if (!ctx->pcb) + return -ENOMEM; + + raw_recv(ctx->pcb, ping_recv, ctx); + raw_bind(ctx->pcb, IP_ADDR_ANY); + + return 0; +} + +static void ping_raw_stop(struct ping_ctx *ctx) +{ + if (ctx->pcb) + raw_remove(ctx->pcb); +} + +static void ping_prepare_echo(struct ping_ctx *ctx) +{ + struct icmp_echo_hdr *iecho = ctx->iecho; + + ICMPH_TYPE_SET(iecho, ICMP_ECHO); + ICMPH_CODE_SET(iecho, 0); + iecho->chksum = 0; + iecho->id = PING_ID; + iecho->seqno = lwip_htons(ctx->seq_num); + + iecho->chksum = inet_chksum(iecho, sizeof(*iecho)); +} + +static void ping_send_icmp(struct ping_ctx *ctx) +{ + struct pbuf *p; + size_t ping_size = sizeof(struct icmp_echo_hdr); + + p = pbuf_alloc(PBUF_IP, (u16_t)ping_size, PBUF_RAM); + if (!p) + return; + + if ((p->len == p->tot_len) && !p->next) { + ctx->iecho = (struct icmp_echo_hdr *)p->payload; + ping_prepare_echo(ctx); + raw_sendto(ctx->pcb, p, &ctx->target); + } + + pbuf_free(p); +} + +static void ping_send(void *arg) +{ + struct ping_ctx *ctx = arg; + + ctx->seq_num++; + if (ctx->seq_num <= PING_COUNT) { + ping_send_icmp(ctx); + sys_timeout(PING_DELAY_MS, ping_send, ctx); + } +} + +static int ping_loop(struct udevice *udev, const ip_addr_t* addr) +{ + struct ping_ctx ctx = {}; + struct netif *netif; + int ret; + + netif = net_lwip_new_netif(udev); + if (!netif) + return CMD_RET_FAILURE; + + printf("Using %s device\n", udev->name); + + ret = ping_raw_init(&ctx); + if (ret < 0) { + net_lwip_remove_netif(netif); + return ret; + } + + ctx.target = *addr; + + ping_send(&ctx); + + do { + sys_check_timeouts(); + net_lwip_rx(udev, netif); + if (ctx.alive) + break; + if (ctrlc()) { + printf("\nAbort\n"); + break; + } + } while (ctx.seq_num <= PING_COUNT); + + sys_untimeout(ping_send, &ctx); + ping_raw_stop(&ctx); + + net_lwip_remove_netif(netif); + + if (ctx.alive) + return 0; + + printf("ping failed; host %s is not alive\n", ipaddr_ntoa(addr)); + return -1; +} + +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + ip_addr_t addr; + + if (argc < 2) + return CMD_RET_USAGE; + + if (!ipaddr_aton(argv[1], &addr)) + return CMD_RET_USAGE; + + eth_set_current(); + + if (ping_loop(eth_get_dev(), &addr) < 0) + return CMD_RET_FAILURE; + + return CMD_RET_SUCCESS; +} From patchwork Fri Sep 6 12:33:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825961 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778324wrb; Fri, 6 Sep 2024 05:36:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXJfiu/x6B0z3jAhOr/OP8Sm10fYpaG7H6GgJN9Q03SVKVJa9LdGJ0gVdHsEy9QW6nrXubklA==@linaro.org X-Google-Smtp-Source: AGHT+IHUYM/YUwcPMVHmK4nBHaS2MHZRBsv3BBwI8ORyBEc4oijI2GewCMH8mpkjiRJNj9ZptfAK X-Received: by 2002:a17:907:3e9e:b0:a7a:9ca6:528 with SMTP id a640c23a62f3a-a8a885be29fmr200572866b.11.1725626164926; Fri, 06 Sep 2024 05:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626164; cv=none; d=google.com; s=arc-20240605; b=lQMHY/xfkY41kNhfT8Jt2S21A9dHCB38+T1nxjm7AtPbOqyTaUz/i3+61axrxErC9U pqAy1DRBIVA3GHo6LIFjloP/cdI/Wa1wXChitzM76aCIxi1HAawoIfTq3qnRzh9dkANo Wc0wkPw24IeTQL5i/5Muj/EZnAAzcsdBxqc3ps97JPjBeVIWUi08AD2iLo/JgA6/Z8eJ diTMXGdtYA3CNN9UVVbTGj+s+RcI6ymCm/IVQCGv1zNHhL55J4NYyosVWYGQEGEsZHrz F57pQQBYhdJTENLwcNV84yPujrWrdllMkra6lkmbOKboclNW3GmTgYoW9ZnZig8+LNxv SXRg== 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=kxr9l8tl4KPdG2Ogv86zY/91VnfMtlTVI8Ik+nYxeuI=; fh=Npu+gD/Goq5lITR8C++Do9EJooTFKHb/914IcqrF34I=; b=BM7nuUDZalTBkuVpmXrUqSt3tEfpucs3WP+lDOR+Uplg1GADIvEdIVvq4oOa5OeZHj Hz1id0plEpUguD7CNOxQ4l+s45ecqx1ydKpSXJ7Y7YFMOrbw6nV2/8SGYn+Ji4rC002y S7y33niLN3rxwUvWAYaw83CRdYkd62dVmUN6l1UISRxOC+eZWdbygDGruo83rEjePv0l DbQeIHREgyJr8cwxcDVn92cgeaiTjNi6wqjEoy1a7hxRLzI1Zu6ldujOnLfJLXw1xbQi qISjkX34vwfjLNlOvdpFMBXCO17o90D3Ovr6M3Ck42HKQzS6UjE2bZBsCPKsFHS17E12 D9uA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PoGoXTls; 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-a8a62440d90si316566566b.968.2024.09.06.05.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:04 -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=PoGoXTls; 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 1B86388CF2; Fri, 6 Sep 2024 14:35: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=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="PoGoXTls"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D71A88D17; Fri, 6 Sep 2024 14:35:14 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 138D088A1B for ; Fri, 6 Sep 2024 14:35:12 +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-x332.google.com with SMTP id 5b1f17b1804b1-42bbe908380so15833085e9.2 for ; Fri, 06 Sep 2024 05:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626111; x=1726230911; 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=kxr9l8tl4KPdG2Ogv86zY/91VnfMtlTVI8Ik+nYxeuI=; b=PoGoXTlsrN0KgujCjIVhZwMAmj+3qw7e6FYcp8o+/nKPrDF2jxtK7FkDGnG6Uxl5es uQwah9sieCngKeycvzKuBMlips58bzzjnvEDebweFTdYMnF0OCQlEvYa2dR2BmmHtdqL 4Fx1t41Qss/CUwNybcfbb9/GuNmhFzQZj68J3lOGuKepN+deM67tISXvUmOfixsiwJl1 R2BxYeO2uG/6gUMmub8HUv4XoH7Mm4nNE30JyouITKBPGdjp115g+5TRauIP7tw1U4Ms Wm4APQmEtw/DVtw5sMtl8WERnZPL2ihLWXBvRiK7Y/wMX3IdxOD4O5U7HFlyGWA4Whuw oYJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626111; x=1726230911; 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=kxr9l8tl4KPdG2Ogv86zY/91VnfMtlTVI8Ik+nYxeuI=; b=l+YGR28ITuXd4XLUszKcwMJGrmZd4+0Z7oDkVqgp8YHVH+MAD92oaRcCtLNJ2VgV9a DM8yjMfVYGDEZgFmMG38678imnyd3JtxkJtKoe6TuaDtZypYtxjrsKol6kHdQ3wlP8Fd Tnujh797JkQb1UYhRBazr1lzmJ40NsPZlR7PmwfsTtHmiZeTiL7paaFEgeXXOH/LPocD GL4KChnodNizM6KM2Shxcd1+lIjEOjhaqdAv1W9Siu43hHKwPolPmneTjFa2+B+shacS mVTUiXCsUIipLrK6BlsLTQFtja629GPBIcolQqeHS6pPixxB9Leo4NZ9hAhV7t8h3lft 93PQ== X-Gm-Message-State: AOJu0YyOPoBffZaBUG0uiCEnaGvvwsWWHFH+Wi2D2o5d2E9uOZHe7vuu 6gN41Akgr11AfEh2mQt5mjRANAkqbqUppn4hlePYsoat27oAOyhFssBlPJL7+HZlK3p750CBRAc RFcgYac8H X-Received: by 2002:a05:6000:4007:b0:378:7e94:d613 with SMTP id ffacd0b85a97d-37889682ae1mr1915175f8f.42.1725626110998; Fri, 06 Sep 2024 05:35:10 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:10 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Heinrich Schuchardt Subject: [PATCH v10 11/25] net-lwip: add dns command Date: Fri, 6 Sep 2024 14:33:27 +0200 Message-Id: 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 Add CMD_DNS when NET_LWIP is enabled to provide the dns command using lwIP. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 11 ++-- cmd/net-lwip.c | 8 +++ include/net-lwip.h | 1 + net/lwip/Makefile | 1 + net/lwip/dns.c | 127 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 net/lwip/dns.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 53e03a85b12..3a92e18996c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2026,11 +2026,6 @@ config CMD_SNTP help Synchronize RTC via network -config CMD_DNS - bool "dns" - help - Lookup the IP of a hostname - config CMD_LINK_LOCAL bool "linklocal" select LIB_RAND @@ -2085,6 +2080,12 @@ config CMD_DHCP help Boot image via network using DHCP/TFTP protocol +config CMD_DNS + bool "dns" + select PROT_DNS_LWIP if NET_LWIP + help + Lookup the IP of a hostname + config CMD_MII bool "mii" imply CMD_MDIO diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index feed719beef..c021da6a674 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -27,3 +27,11 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); #endif + +#if defined(CONFIG_CMD_DNS) +U_BOOT_CMD( + dns, 3, 1, do_dns, + "lookup the IP of a hostname", + "hostname [envvar]" +); +#endif diff --git a/include/net-lwip.h b/include/net-lwip.h index 9aa371e962c..ff9d03b23e8 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -17,6 +17,7 @@ struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index b5af37a9b18..645d8a8c457 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -2,5 +2,6 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/dns.c b/net/lwip/dns.c new file mode 100644 index 00000000000..4b937feaee1 --- /dev/null +++ b/net/lwip/dns.c @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include + +#define DNS_RESEND_MS 1000 +#define DNS_TIMEOUT_MS 10000 + +struct dns_cb_arg { + ip_addr_t host_ipaddr; + const char *var; + bool done; +}; + +static void do_dns_tmr(void *arg) +{ + dns_tmr(); +} + +static void dns_cb(const char *name, const ip_addr_t *ipaddr, void *arg) +{ + struct dns_cb_arg *dns_cb_arg = arg; + char *ipstr = ip4addr_ntoa(ipaddr); + + dns_cb_arg->done = true; + + if (!ipaddr) { + printf("DNS: host not found\n"); + dns_cb_arg->host_ipaddr.addr = 0; + return; + } + + if (dns_cb_arg->var) + env_set(dns_cb_arg->var, ipstr); + + printf("%s\n", ipstr); +} + +static int dns_loop(struct udevice *udev, const char *name, const char *var) +{ + struct dns_cb_arg dns_cb_arg = { }; + bool has_server = false; + struct netif *netif; + ip_addr_t ipaddr; + ip_addr_t ns; + ulong start; + char *nsenv; + int ret; + + dns_cb_arg.var = var; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + dns_init(); + + nsenv = env_get("dnsip"); + if (nsenv && ipaddr_aton(nsenv, &ns)) { + dns_setserver(0, &ns); + has_server = true; + } + + nsenv = env_get("dnsip2"); + if (nsenv && ipaddr_aton(nsenv, &ns)) { + dns_setserver(1, &ns); + has_server = true; + } + + if (!has_server) { + log_err("No valid name server (dnsip/dnsip2)\n"); + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + dns_cb_arg.done = false; + + ret = dns_gethostbyname(name, &ipaddr, dns_cb, &dns_cb_arg); + + if (ret == ERR_OK) { + dns_cb(name, &ipaddr, &dns_cb_arg); + } else if (ret == ERR_INPROGRESS) { + start = get_timer(0); + sys_timeout(DNS_RESEND_MS, do_dns_tmr, NULL); + do { + net_lwip_rx(udev, netif); + if (dns_cb_arg.done) + break; + sys_check_timeouts(); + if (ctrlc()) { + printf("\nAbort\n"); + break; + } + } while (get_timer(start) < DNS_TIMEOUT_MS); + sys_untimeout(do_dns_tmr, NULL); + } + + net_lwip_remove_netif(netif); + + if (dns_cb_arg.done && dns_cb_arg.host_ipaddr.addr != 0) + return CMD_RET_SUCCESS; + + return CMD_RET_FAILURE; +} + +int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + char *name; + char *var = NULL; + + if (argc == 1 || argc > 3) + return CMD_RET_USAGE; + + name = argv[1]; + + if (argc == 3) + var = argv[2]; + + eth_set_current(); + + return dns_loop(eth_get_dev(), name, var); +} From patchwork Fri Sep 6 12:33:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825962 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778382wrb; Fri, 6 Sep 2024 05:36:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWtaoAiXz9ktaCR63R7X0LoGORZOF4K3bhLlw+//YOxmP7scuOYc1wSAQ96k66HF7ISbNZOcA==@linaro.org X-Google-Smtp-Source: AGHT+IGUnCAnpXQYjbCPI0/kd4sb6eYovQs4C+uyzvJwA4s7LoVDY9cA5Q766XWinLGGp7lpO6cG X-Received: by 2002:a05:6402:2554:b0:5c3:d0f5:86f3 with SMTP id 4fb4d7f45d1cf-5c3dc77ae91mr2170004a12.3.1725626173132; Fri, 06 Sep 2024 05:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626173; cv=none; d=google.com; s=arc-20240605; b=kfTnRVy0nfAisJZivF1E5BxWLONCfscroWn+mBtNJ5X/VbuGO1CDzJKEKUiA40nauP wUn3qMdJHYPHUyaRnug5q2AIOVHQYmWlpBE6tANjHkQmm37GocqP/xtjQNzTL0Z83NAC yu6E9WJcwPk9qVyJtWrHxGObcLT0GuoWxs4tA+Bw45EJWPbRrAJxnia03hojA4RUcfAD mfksyoAYqQ/ShdEXONQUl707OcxpbkcLGA+MC2UhaavQb8A1z08oAAHnp4FRViQVOqNy DzcPsyzR9E7p+XQk8d6Pcrso36vT+ayICdLQQggunnyrlEOs81UtR4GE+CS4WN52m3rN Sckg== 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=iVonNGzNZsYIUAIi+/WsLR7n6+fuHVplypDzeikmB/0=; fh=duDseGqdkK8moyCHwDev4NSoAoUqLF0mIR8IdrcJ7+U=; b=SqJkvfQVwjktVVmgDU0vuEM9GBoohXP0I3BpZYnr0TjWNDkLBLGvZbSsEgNKnAE2Hq GtTcoZhSwm9PnTUT7VXCVCoJ5kXgOehFShizTQkjDtxBr5tKob5xJq40kcJg6GfjlV// gflJrEVBdP0L8Blf0QnrdGfBE1UTz/sLJBZbo4NdMpVuPvceKbCZMinejHklgfSqE/7S xKrH0g9F1C0sEscAQKVo5CeONQF7Moc4aUfKoQyJ9ZUwyG37+LSCFbwngDxSOep0TmWQ YjE+eVORDYWajdzEtsjXG/PFK/TOMjdbwlytft+/VdZWDG5od5rKIPU+0DAFmDj+DXnI ZLtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nWcZjI1H; 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; dara=neutral header.i=@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 4fb4d7f45d1cf-5c3cc52dd6asi2925823a12.25.2024.09.06.05.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:13 -0700 (PDT) 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=nWcZjI1H; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6E1EF88D02; Fri, 6 Sep 2024 14:35:16 +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="nWcZjI1H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B32A588D03; Fri, 6 Sep 2024 14:35:15 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 A03D288D13 for ; Fri, 6 Sep 2024 14:35:13 +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-x335.google.com with SMTP id 5b1f17b1804b1-42c7b5b2d01so20660475e9.3 for ; Fri, 06 Sep 2024 05:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626113; x=1726230913; 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=iVonNGzNZsYIUAIi+/WsLR7n6+fuHVplypDzeikmB/0=; b=nWcZjI1HFoSJRTg593w7y0ICVQeZeISaj27Pm7V0Xxh1awJUYybImUEUlVVZw6SR0m oXaVu5IBjV3SlhIo49RyEamLvvEoFV+rNlHCw2ZIGF7Yg/+nvMJ+7n2x+jU+nYWwK96T IwhvBCVn/aULuXuhXsUPVoRVucapA24EtJgWA09MKvp9YafCKmhY90pFVyTUtJHCELLL OkCz0KPRnrUhCPMpNdaEjCvUQGVR3fJSK8qWeWq5Fvri1nky8XBnF8f1YfwkaZUG6kMs D+O7ivOKUEP0qUJqpdpwdI4YBtN5xHwGVlygPPt+N8Muna2c+kDzWZMO9mFq84avoLM1 VnXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626113; x=1726230913; 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=iVonNGzNZsYIUAIi+/WsLR7n6+fuHVplypDzeikmB/0=; b=THbRb9bKAJRI67XD9Av4ZJf3/jm74bhbyg5WfoMD8/y5x5vV463Ad6/etdKg0bz3vf mcWck1mE1445IqgjDDrTUOAbxF1v3rRDx9cdsZ/xNq8fhjbPdgnRXus9q1PzgFVcllSG oTlfMxFi1ohk1BiKHSiOWB0sB8Bhf03zgTDGsOh0k4dfRtm7hrVPby3/Xv3wVBRJ94HN IKsnSn58hPLjXZfG5e5/r5rlw04IU1CeiQcvbcmOKn1jFJQXZuhHtLiGbx5FmhFzW/ie 5IL9EoduUE+J9dBg93l+Hu6GrDkehr4Ta9SnZqQkQVGe699Ogtzq02izCK8SGq8qMTX/ 6meQ== X-Gm-Message-State: AOJu0Yy0Lpvoidhbc91YIOolmlQZp6oXpyJ0xNJ9cGzGr4BB3eLg7F5N rZa62BMzB5nxJHv9/r7L5+lfS41BTUv881AszHrEfC5wuEZosbI9RHeNEBtPyls6HxJp8DSiwZk vN4MUD2cc X-Received: by 2002:a05:600c:1d19:b0:429:c674:d9de with SMTP id 5b1f17b1804b1-42c9f97c7e2mr21279525e9.2.1725626112620; Fri, 06 Sep 2024 05:35:12 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:12 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Francis Laniel , Heinrich Schuchardt , Marek Vasut Subject: [PATCH v10 12/25] net: split cmd/net.c into cmd/net.c and cmd/net-common.c Date: Fri, 6 Sep 2024 14:33:28 +0200 Message-Id: <3adecadc0da3003199c71280a61b5798d5447053.1725625913.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 Extract some code from cmd/net.c that will be useful in a subsequent commit to implement wget with NET_LWIP. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- cmd/Makefile | 5 ++- cmd/net-common.c | 109 ++++++++++++++++++++++++++++++++++++++++++++ cmd/net.c | 115 ----------------------------------------------- 3 files changed, 113 insertions(+), 116 deletions(-) create mode 100644 cmd/net-common.c diff --git a/cmd/Makefile b/cmd/Makefile index 1c8cc42503d..75e85feb017 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -130,7 +130,10 @@ obj-$(CONFIG_CMD_NAND) += nand.o ifdef CONFIG_CMD_NET obj-$(CONFIG_NET) += net.o obj-$(CONFIG_NET_LWIP) += net-lwip.o -CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +obj-$(filter y,$(CONFIG_CMD_NET) $(CONFIG_CMD_NET_LWIP)) += net-common.o +lwip-includes := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +CFLAGS_net-lwip.o := $(lwip-includes) +CFLAGS_net-common.o := $(lwip-includes) endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o diff --git a/cmd/net-common.c b/cmd/net-common.c new file mode 100644 index 00000000000..1c9fb83b896 --- /dev/null +++ b/cmd/net-common.c @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#include +#include +#include +#include +#include +#include + +static int do_net_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + const struct udevice *current = eth_get_dev(); + unsigned char env_enetaddr[ARP_HLEN]; + const struct udevice *dev; + struct uclass *uc; + + uclass_id_foreach_dev(UCLASS_ETH, dev, uc) { + eth_env_get_enetaddr_by_index("eth", dev_seq(dev), env_enetaddr); + printf("eth%d : %s %pM %s\n", dev_seq(dev), dev->name, env_enetaddr, + current == dev ? "active" : ""); + } + return CMD_RET_SUCCESS; +} + +static int do_net_stats(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + int nstats, err, i, off; + struct udevice *dev; + u64 *values; + u8 *strings; + + if (argc < 2) + return CMD_RET_USAGE; + + err = uclass_get_device_by_name(UCLASS_ETH, argv[1], &dev); + if (err) { + printf("Could not find device %s\n", argv[1]); + return CMD_RET_FAILURE; + } + + if (!eth_get_ops(dev)->get_sset_count || + !eth_get_ops(dev)->get_strings || + !eth_get_ops(dev)->get_stats) { + printf("Driver does not implement stats dump!\n"); + return CMD_RET_FAILURE; + } + + nstats = eth_get_ops(dev)->get_sset_count(dev); + strings = kcalloc(nstats, ETH_GSTRING_LEN, GFP_KERNEL); + if (!strings) + return CMD_RET_FAILURE; + + values = kcalloc(nstats, sizeof(u64), GFP_KERNEL); + if (!values) + goto err_free_strings; + + eth_get_ops(dev)->get_strings(dev, strings); + eth_get_ops(dev)->get_stats(dev, values); + + off = 0; + for (i = 0; i < nstats; i++) { + printf(" %s: %llu\n", &strings[off], values[i]); + off += ETH_GSTRING_LEN; + }; + + kfree(strings); + kfree(values); + + return CMD_RET_SUCCESS; + +err_free_strings: + kfree(strings); + + return CMD_RET_FAILURE; +} + +static struct cmd_tbl cmd_net[] = { + U_BOOT_CMD_MKENT(list, 1, 0, do_net_list, "", ""), + U_BOOT_CMD_MKENT(stats, 2, 0, do_net_stats, "", ""), +}; + +static int do_net(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + struct cmd_tbl *cp; + + cp = find_cmd_tbl(argv[1], cmd_net, ARRAY_SIZE(cmd_net)); + + /* Drop the net command */ + argc--; + argv++; + + if (!cp || argc > cp->maxargs) + return CMD_RET_USAGE; + if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp)) + return CMD_RET_SUCCESS; + + return cp->cmd(cmdtp, flag, argc, argv); +} + +U_BOOT_CMD( + net, 3, 1, do_net, + "NET sub-system", + "list - list available devices\n" + "stats - dump statistics for specified device\n" +); diff --git a/cmd/net.c b/cmd/net.c index 53ce2bc5d0c..c90578e1b9f 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -674,118 +674,3 @@ U_BOOT_CMD( ); #endif /* CONFIG_CMD_LINK_LOCAL */ - -static int do_net_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - const struct udevice *current = eth_get_dev(); - unsigned char env_enetaddr[ARP_HLEN]; - const struct udevice *dev; - struct uclass *uc; - - uclass_id_foreach_dev(UCLASS_ETH, dev, uc) { - eth_env_get_enetaddr_by_index("eth", dev_seq(dev), env_enetaddr); - printf("eth%d : %s %pM %s\n", dev_seq(dev), dev->name, env_enetaddr, - current == dev ? "active" : ""); - } - return CMD_RET_SUCCESS; -} - -static int do_net_stats(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - int nstats, err, i, off; - struct udevice *dev; - u64 *values; - u8 *strings; - - if (argc < 2) - return CMD_RET_USAGE; - - err = uclass_get_device_by_name(UCLASS_ETH, argv[1], &dev); - if (err) { - printf("Could not find device %s\n", argv[1]); - return CMD_RET_FAILURE; - } - - if (!eth_get_ops(dev)->get_sset_count || - !eth_get_ops(dev)->get_strings || - !eth_get_ops(dev)->get_stats) { - printf("Driver does not implement stats dump!\n"); - return CMD_RET_FAILURE; - } - - nstats = eth_get_ops(dev)->get_sset_count(dev); - strings = kcalloc(nstats, ETH_GSTRING_LEN, GFP_KERNEL); - if (!strings) - return CMD_RET_FAILURE; - - values = kcalloc(nstats, sizeof(u64), GFP_KERNEL); - if (!values) - goto err_free_strings; - - eth_get_ops(dev)->get_strings(dev, strings); - eth_get_ops(dev)->get_stats(dev, values); - - off = 0; - for (i = 0; i < nstats; i++) { - printf(" %s: %llu\n", &strings[off], values[i]); - off += ETH_GSTRING_LEN; - }; - - return CMD_RET_SUCCESS; - -err_free_strings: - kfree(strings); - - return CMD_RET_FAILURE; -} - -static struct cmd_tbl cmd_net[] = { - U_BOOT_CMD_MKENT(list, 1, 0, do_net_list, "", ""), - U_BOOT_CMD_MKENT(stats, 2, 0, do_net_stats, "", ""), -}; - -static int do_net(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - struct cmd_tbl *cp; - - cp = find_cmd_tbl(argv[1], cmd_net, ARRAY_SIZE(cmd_net)); - - /* Drop the net command */ - argc--; - argv++; - - if (!cp || argc > cp->maxargs) - return CMD_RET_USAGE; - if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp)) - return CMD_RET_SUCCESS; - - return cp->cmd(cmdtp, flag, argc, argv); -} - -U_BOOT_CMD( - net, 3, 1, do_net, - "NET sub-system", - "list - list available devices\n" - "stats - dump statistics for specified device\n" -); - -#if defined(CONFIG_CMD_NCSI) -static int do_ncsi(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) -{ - if (!phy_interface_is_ncsi() || !ncsi_active()) { - printf("Device not configured for NC-SI\n"); - return CMD_RET_FAILURE; - } - - if (net_loop(NCSI) < 0) - return CMD_RET_FAILURE; - - return CMD_RET_SUCCESS; -} - -U_BOOT_CMD( - ncsi, 1, 1, do_ncsi, - "Configure attached NIC via NC-SI", - "" -); -#endif /* CONFIG_CMD_NCSI */ From patchwork Fri Sep 6 12:33:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825963 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778426wrb; Fri, 6 Sep 2024 05:36:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWBQNgIWRAr62+QeKgs4NZxpq/l9Y/DW8hyIM8Nh5AtT7PQ1Bq1aoN8080DYoEy1Vl9tXN0CQ==@linaro.org X-Google-Smtp-Source: AGHT+IFnwWqhe8T5Nffnp7HbCalaVM7Dd4Pbn+WJC+AItBCV+y28/9Nm3bqlU7TFMV3s0S9DPenz X-Received: by 2002:a17:907:e2d8:b0:a8b:6ee7:ba28 with SMTP id a640c23a62f3a-a8b70ee94camr83293666b.1.1725626184326; Fri, 06 Sep 2024 05:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626184; cv=none; d=google.com; s=arc-20240605; b=XVMF+s2fl8aCwzyXHNIjNo+msPJzXLP726DC/smJkPYNB2FLtSKLudLiPTN0/fAxe2 HdhLxJZR1jzlNFkBIZVPUSF/VU5RL0genJ/kfSQw0tN7ltSOw6uNZAfz/H3M4/7gbQkz 2ln9xCWPBJjLIzdtgG8wAz2dPIDTPdJ7PPe7Ii03Q/cWcnjuTGitXcksPdmHIp/a5qpe +dgVK8TMPQcW/pyPMcL/JUm+ezTNMP1zBa1kbzsYXoo1lfluJZEvUfS555eMtrd9tAIX dKpFlpkILhD2ReAL/J3gbPZ8v2kDBGZ1/SUAYpgzqlqXgx4xWKG9idhp3BQbIfFUAh00 HhNQ== 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=Dk1E6bbPmuHVmDWi+bXNHdS05tNkUb9LID8rauCyscc=; fh=v0kBBwJem7sslcp3S1a2zuV3vNhJ3X7sB2dy4njhZFc=; b=fkDyjoPj+XKy9ze5lbPQiyVsLusHUMJ4+1JpykT1lna/kTiPUjnFR18CxR33f+aljM apP8MnHMQVqtZ8zCUKTceVxEf7boK3Uk+fjw380Jic7FEqs0gGZNM9CkeWsdGFPhxa7F GguZMB/mGrSTAckOQcKHMpevcKkKlgm6MWvrYb6Rtxnb/rJ6VgxSqtowPx5MW+8YCuGK 5kJRtE3eTPiJwZb4seEvi5X2+y9cIWpZ0y4iluxyp8cWFobE0cMGipptruEB3yZwutX0 Ohf5mLU5QzWmN4maY07GgU22GJrHLens2WYp2amOvyJWaeKa5/M50eKRm51qhtOcCUg3 233w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbMK5VOy; 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-a8a792e4a48si208150966b.859.2024.09.06.05.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:24 -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=VbMK5VOy; 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 C3F1988D14; Fri, 6 Sep 2024 14:35:18 +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="VbMK5VOy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D02CE88C5C; Fri, 6 Sep 2024 14:35:17 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 A675B88D01 for ; Fri, 6 Sep 2024 14:35: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=jerome.forissier@linaro.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42c828c8863so15820375e9.3 for ; Fri, 06 Sep 2024 05:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626115; x=1726230915; 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=Dk1E6bbPmuHVmDWi+bXNHdS05tNkUb9LID8rauCyscc=; b=VbMK5VOyykPOvHs5js9bWfoGYk15c9unHK0sjSya+FdWXgYkQEHorGF/Q62u9VSN2w ev+t518ERwtBmwnBj5PpEecM83n1kmHmrEaa5QyOzFb6jLEoEeIkoMzJ7kul7kOcbg8j 218AHgaBVsuzEMb84lZ/62aHM+3JLp7IWvMkafL6f7fqZLk/Y8uZknowRP41bFpnmxpi zWSGoeloeQ3WapPSXe5Y/kKtEDLD6ZazqDDoFTnzmdUT/T6IjU+++iUEtiidF39Z0sek eQXU3d4apIjX7pukt9jd1NjtRtDuatk58NQbO07zB6o2WWIA3NX6+fEmwZhrrcDWKzNT sxOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626115; x=1726230915; 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=Dk1E6bbPmuHVmDWi+bXNHdS05tNkUb9LID8rauCyscc=; b=uNYFUs0rgj+YTw94xBzKGvqQr5SiciqCgqk+3kfDWhCvdbyQPf+CkIU5xew1CUAcvG kYo+TqIRmE9DjKTQYk9ckNBGUz+EtzepSl2gziffPFouRB/y6msQXyxNDViDYX1gJQoO EOvYFwoaulyNcsuPbiZXXo3+DeAKvSdrX4b3Q9xVUGxMT1xuUKJMuozik2h005FeZJLy +dGTDmNFvIevbmQcPUCrkVb+oEAssX6Yw6uY2jIDrYX1X2DLVvaTXQWM7uFdJfNoSR7d gLOQf8rnngQUFNdJK5ycXj+5CzmEz6at9phzT7B3d8YMSo+AKN6rmSZTbIQMk7MRDNmW kGIQ== X-Gm-Message-State: AOJu0YxSVZIoE2KCVaTFGA/HKjrib5uLL9B8Ajsn5oat4RuELOVPcWlu MXrOklRUVlcBTRKbBjcoqM+/rJj7mcfIATgRdezV3NgzJ6LRqDq6Vo0k/XW6co/L08IufiGnnMX jehEdMFYK X-Received: by 2002:a05:600c:1385:b0:426:66a2:b200 with SMTP id 5b1f17b1804b1-42c9f8eeed8mr17689175e9.0.1725626114778; Fri, 06 Sep 2024 05:35:14 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:14 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , Heinrich Schuchardt , AKASHI Takahiro , Jonathan Humphreys Subject: [PATCH v10 13/25] net-lwip: add wget command Date: Fri, 6 Sep 2024 14:33:29 +0200 Message-Id: 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 Add support for the wget command with NET_LWIP. The command normally expects a URL: wget [loadaddr] url, but it also accepts the legacy syntax: wget [loadaddr] [server:]file. The server IP may alternatively be supplied via ${httpserverip} which has higher priority than ${serverip}. Based on code initially developed by Maxim U. Signed-off-by: Jerome Forissier Co-developed-by: Maxim Uvarov Cc: Maxim Uvarov Signed-off-by: Jerome Forissier --- cmd/Kconfig | 18 ++- cmd/net-lwip.c | 8 + include/net-lwip.h | 18 +++ net/lwip/Makefile | 1 + net/lwip/wget.c | 363 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 400 insertions(+), 8 deletions(-) create mode 100644 net/lwip/wget.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 3a92e18996c..7a49042b4b8 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2000,14 +2000,6 @@ config SYS_DISABLE_AUTOLOAD is complete. Enable this option to disable this behavior and instead require files to be loaded over the network by subsequent commands. -config CMD_WGET - bool "wget" - select PROT_TCP - default y if SANDBOX - help - wget is a simple command to download kernel, or other files, - from a http server over TCP. - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2122,6 +2114,16 @@ config CMD_TFTPBOOT help tftpboot - load file via network using TFTP protocol +config CMD_WGET + bool "wget" + default y if SANDBOX + select PROT_TCP if NET + select PROT_TCP_LWIP if NET_LWIP + select PROT_DNS_LWIP if NET_LWIP + help + wget is a simple command to download kernel, or other files, + from a http server over TCP. + endif # if CMD_NET endif # if NET || NET_LWIP diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index c021da6a674..42f8bd6b259 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -35,3 +35,11 @@ U_BOOT_CMD( "hostname [envvar]" ); #endif + +#if defined(CONFIG_CMD_WGET) +U_BOOT_CMD( + wget, 3, 1, do_wget, + "boot image via network using HTTP protocol", + "[loadAddress] URL" +); +#endif diff --git a/include/net-lwip.h b/include/net-lwip.h index ff9d03b23e8..1c3583f82a1 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -16,8 +16,26 @@ void net_lwip_remove_netif(struct netif *netif); struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); +/** + * wget_with_dns() - runs dns host IP address resulution before wget + * + * @dst_addr: destination address to download the file + * @uri: uri string of target file of wget + * Return: downloaded file size, negative if failed + */ + +int wget_with_dns(ulong dst_addr, char *uri); +/** + * wget_validate_uri() - varidate the uri + * + * @uri: uri string of target file of wget + * Return: true if uri is valid, false if uri is invalid + */ +bool wget_validate_uri(char *uri); + int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index 645d8a8c457..f2558f8763a 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -5,3 +5,4 @@ obj-$(CONFIG_CMD_DHCP) += dhcp.o obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o +obj-$(CONFIG_CMD_WGET) += wget.o diff --git a/net/lwip/wget.c b/net/lwip/wget.c new file mode 100644 index 00000000000..e8768fc2acd --- /dev/null +++ b/net/lwip/wget.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SERVER_NAME_SIZE 200 +#define HTTP_PORT_DEFAULT 80 +#define PROGRESS_PRINT_STEP_BYTES (100 * 1024) + +enum done_state { + NOT_DONE = 0, + SUCCESS = 1, + FAILURE = 2 +}; + +struct wget_ctx { + char *path; + ulong daddr; + ulong saved_daddr; + ulong size; + ulong prevsize; + ulong start_time; + enum done_state done; +}; + +static int parse_url(char *url, char *host, u16 *port, char **path) +{ + char *p, *pp; + long lport; + + p = strstr(url, "http://"); + if (!p) { + log_err("only http:// is supported\n"); + return -EINVAL; + } + + p += strlen("http://"); + + /* Parse hostname */ + pp = strchr(p, ':'); + if (!pp) + pp = strchr(p, '/'); + if (!pp) + return -EINVAL; + + if (p + SERVER_NAME_SIZE <= pp) + return -EINVAL; + + memcpy(host, p, pp - p); + host[pp - p] = '\0'; + + if (*pp == ':') { + /* Parse port number */ + p = pp + 1; + lport = simple_strtol(p, &pp, 10); + if (pp && *pp != '/') + return -EINVAL; + if (lport > 65535) + return -EINVAL; + *port = (u16)lport; + } else { + *port = HTTP_PORT_DEFAULT; + } + if (*pp != '/') + return -EINVAL; + *path = pp; + + return 0; +} + +/* + * Legacy syntax support + * Convert [:]filename into a URL if needed + */ +static int parse_legacy_arg(char *arg, char *nurl, size_t rem) +{ + char *p = nurl; + size_t n; + char *col = strchr(arg, ':'); + char *env; + char *server; + char *path; + + if (strstr(arg, "http") == arg) { + n = snprintf(nurl, rem, "%s", arg); + if (n < 0 || n > rem) + return -1; + return 0; + } + + n = snprintf(p, rem, "%s", "http://"); + if (n < 0 || n > rem) + return -1; + p += n; + rem -= n; + + if (col) { + n = col - arg; + server = arg; + path = col + 1; + } else { + env = env_get("httpserverip"); + if (!env) + env = env_get("serverip"); + if (!env) { + log_err("error: httpserver/serverip has to be set\n"); + return -1; + } + n = strlen(env); + server = env; + path = arg; + } + + if (rem < n) + return -1; + strncpy(p, server, n); + p += n; + rem -= n; + if (rem < 1) + return -1; + *p = '/'; + p++; + rem--; + n = strlen(path); + if (rem < n) + return -1; + strncpy(p, path, n); + p += n; + rem -= n; + if (rem < 1) + return -1; + *p = '\0'; + + return 0; +} + +static err_t httpc_recv_cb(void *arg, struct altcp_pcb *pcb, struct pbuf *pbuf, + err_t err) +{ + struct wget_ctx *ctx = arg; + struct pbuf *buf; + + if (!pbuf) + return ERR_BUF; + + if (!ctx->start_time) + ctx->start_time = get_timer(0); + + for (buf = pbuf; buf; buf = buf->next) { + memcpy((void *)ctx->daddr, buf->payload, buf->len); + ctx->daddr += buf->len; + ctx->size += buf->len; + if (ctx->size - ctx->prevsize > PROGRESS_PRINT_STEP_BYTES) { + printf("#"); + ctx->prevsize = ctx->size; + } + } + + altcp_recved(pcb, pbuf->tot_len); + pbuf_free(pbuf); + return ERR_OK; +} + +static void httpc_result_cb(void *arg, httpc_result_t httpc_result, + u32_t rx_content_len, u32_t srv_res, err_t err) +{ + struct wget_ctx *ctx = arg; + ulong elapsed; + + if (httpc_result != HTTPC_RESULT_OK) { + log_err("\nHTTP client error %d\n", httpc_result); + ctx->done = FAILURE; + return; + } + if (srv_res != 200) { + log_err("\nHTTP server error %d\n", srv_res); + ctx->done = FAILURE; + return; + } + + elapsed = get_timer(ctx->start_time); + if (!elapsed) + elapsed = 1; + if (rx_content_len > PROGRESS_PRINT_STEP_BYTES) + printf("\n"); + printf("%u bytes transferred in %lu ms (", rx_content_len, elapsed); + print_size(rx_content_len / elapsed * 1000, "/s)\n"); + printf("Bytes transferred = %lu (%lx hex)\n", ctx->size, ctx->size); + efi_set_bootdev("Net", "", ctx->path, map_sysmem(ctx->saved_daddr, 0), + rx_content_len); + if (env_set_hex("filesize", rx_content_len) || + env_set_hex("fileaddr", ctx->saved_daddr)) { + log_err("Could not set filesize or fileaddr\n"); + ctx->done = FAILURE; + return; + } + + ctx->done = SUCCESS; +} + +static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri) +{ + char server_name[SERVER_NAME_SIZE]; + httpc_connection_t conn; + httpc_state_t *state; + struct netif *netif; + struct wget_ctx ctx; + char *path; + u16 port; + + ctx.daddr = dst_addr; + ctx.saved_daddr = dst_addr; + ctx.done = NOT_DONE; + ctx.size = 0; + ctx.prevsize = 0; + ctx.start_time = 0; + + if (parse_url(uri, server_name, &port, &path)) + return CMD_RET_USAGE; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + memset(&conn, 0, sizeof(conn)); + conn.result_fn = httpc_result_cb; + ctx.path = path; + if (httpc_get_file_dns(server_name, port, path, &conn, httpc_recv_cb, + &ctx, &state)) { + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + while (!ctx.done) { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + if (ctrlc()) + break; + } + + net_lwip_remove_netif(netif); + + if (ctx.done == SUCCESS) + return 0; + + return -1; +} + +int wget_with_dns(ulong dst_addr, char *uri) +{ + eth_set_current(); + + return wget_loop(eth_get_dev(), dst_addr, uri); +} + +int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) +{ + char *end; + char *url; + ulong dst_addr; + char nurl[1024]; + + if (argc < 2 || argc > 3) + return CMD_RET_USAGE; + + dst_addr = hextoul(argv[1], &end); + if (end == (argv[1] + strlen(argv[1]))) { + if (argc < 3) + return CMD_RET_USAGE; + url = argv[2]; + } else { + dst_addr = image_load_addr; + url = argv[1]; + } + + if (parse_legacy_arg(url, nurl, sizeof(nurl))) + return CMD_RET_FAILURE; + + if (wget_with_dns(dst_addr, nurl)) + return CMD_RET_FAILURE; + + return CMD_RET_SUCCESS; +} + +/** + * wget_validate_uri() - validate the uri for wget + * + * @uri: uri string + * + * This function follows the current U-Boot wget implementation. + * scheme: only "http:" is supported + * authority: + * - user information: not supported + * - host: supported + * - port: not supported(always use the default port) + * + * Uri is expected to be correctly percent encoded. + * This is the minimum check, control codes(0x1-0x19, 0x7F, except '\0') + * and space character(0x20) are not allowed. + * + * TODO: stricter uri conformance check + * + * Return: true on success, false on failure + */ +bool wget_validate_uri(char *uri) +{ + char c; + bool ret = true; + char *str_copy, *s, *authority; + + for (c = 0x1; c < 0x21; c++) { + if (strchr(uri, c)) { + log_err("invalid character is used\n"); + return false; + } + } + if (strchr(uri, 0x7f)) { + log_err("invalid character is used\n"); + return false; + } + + if (strncmp(uri, "http://", 7)) { + log_err("only http:// is supported\n"); + return false; + } + str_copy = strdup(uri); + if (!str_copy) + return false; + + s = str_copy + strlen("http://"); + authority = strsep(&s, "/"); + if (!s) { + log_err("invalid uri, no file path\n"); + ret = false; + goto out; + } + s = strchr(authority, '@'); + if (s) { + log_err("user information is not supported\n"); + ret = false; + goto out; + } + s = strchr(authority, ':'); + if (s) { + log_err("user defined port is not supported\n"); + ret = false; + goto out; + } + +out: + free(str_copy); + + return ret; +} From patchwork Fri Sep 6 12:33:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825964 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778486wrb; Fri, 6 Sep 2024 05:36:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsjkl8IhbjrMyEx+8jQFAZ6M/RX2ohJcY0z+JVvNMwkUgYehDrZPHBzpWUMXyHa+CwbW9Q+A==@linaro.org X-Google-Smtp-Source: AGHT+IHW3orh25FesJKtFIeM+Nz6t+QZBoT2Ss2te43kjLC/1dV193zbiVHIax6KiBJDYyW2FSLY X-Received: by 2002:a17:907:31c8:b0:a7a:c083:857b with SMTP id a640c23a62f3a-a8a8887333cmr218874066b.42.1725626195243; Fri, 06 Sep 2024 05:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626195; cv=none; d=google.com; s=arc-20240605; b=PWciIUqWJ09MVvnelZIOSmvWQbX4KL8YwnkcjeO1CGoH7p/OToswIkaxO5PqGzT05h P05qvOFalm4sweIyKDY7F51PQFpW3qnErDIvGWq0EurtwYYd13wMg57UBwwE+jc0cwo/ +TH6r/fskm26r2kMvhX1J/d+rAOdO8p1BmtUika/C3OmdIfKdcoItXIG/KYh4bPEblC4 yJHzFnuWmeURcFt0d0RELYU3Al06/Fhebeke7nRGfQ3TMgGnxJvNlZGI7Gk81zJwAtfE DwkaT+adkHi/Lk/WcCJLv+8N1ieFXIfwYYQziBb/oeGIiVaT4fYBWEaOU1DQM+VH7t2r MvKw== 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=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; fh=unfva7WENhDSyGD/OHzzL8mLaBX2u/JXKBZjiHda3XI=; b=Qfx7iGgZkfQHLB6XCWo/4ER0I3w51Xgbv7R7baxFOy1yUG/KTU/zrEMnvpsf7coPPM WUf+WZYPFUek60u9MDdH8H0wZ+q/ydSUFHzHxbBrx9W5DDF2YIk0gUfbsBZtMPsknwbo ks7n9r7cCUsgoCPavP0c5w4tpNNo4OpdwJz+XnO+0oQjGRC/SesHsp2xAxHSgEHFo1P3 Jcsm7uNXEQ8jnWl4KYbxHxdAbuh5pr0/Vd/9N2SRo3ItxBfncktJTSfgAtJhn967MIGW ofIECUgngZM/Kuiy7uNllyLbHj+ym0Dfv96Qg3KPvN8Bjv9NvkGttwfZsDcR0iyIU0bK 1fFw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sjiK+G3u; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a82883e75si143840866b.842.2024.09.06.05.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:35 -0700 (PDT) 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=sjiK+G3u; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2338B88D1F; Fri, 6 Sep 2024 14:35:20 +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="sjiK+G3u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B6F8388A24; Fri, 6 Sep 2024 14:35:18 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 D7ACD88D10 for ; Fri, 6 Sep 2024 14:35:16 +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-wr1-x435.google.com with SMTP id ffacd0b85a97d-3780c8d689aso1150677f8f.0 for ; Fri, 06 Sep 2024 05:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626116; x=1726230916; 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=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; b=sjiK+G3u4NokV/jxs58FBRDQe5I70tJdWgyG/6yaEwH5zStZ6WQ+W4Gfjet1FvWxYF lPS2TOS1Ao3E9pd70v5EwzJrHdoZ3nETTWN13OEv6efidfpbgtmnZksOLEhsm4oMrllB Q0XQo9YwTge7Zhy/4VFYC/KW3e2yNl+U9vxK0LPZvRdg8b3wXVCxItxvEy2XYfoC/gxm dk2lL6Bh4NjoC3ONNk1oC1ZoCx1VvvmTih7hfkASGsqvDJto3Bv4+i759GDAK/HROTqR 9vKgngWTXV5HqiTB5s0AQJF0YBnV7Z6AxC0M84WUEtp8F+VJll74kagmSeB3bLqgVD1R xsCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626116; x=1726230916; 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=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; b=Jg3/A1kq/AeRvbJCVFCFfvPrYyC9/2GWgAZj0B5Sl5J1uD4fK8FLwgRfAlQif8BiIu 3Rh7vBtAuymobQdLXbvtR3Ugutcg0xSuE83wmFBbP7nWPyO7A7fJPtcR7R1T+bS/N0mT eDIr1QbkwCHzriLEkzC8chqybO8rULef4GVrNRAK3atS9IZK5x03852GkiMkdAn1Pf+k 1W22fUPov280PjHKR7GOr4VYwpxvHc1sQdN5nRJV9WD9nZamyc/ik4s5og2/YL0DCBZd 89ET+ZnhBKVyCjb5FXTic/JB2rXV7PdshmuIqBOFdeh/lib17xuDFz7XlVlxR/VyYW4v 1ujw== X-Gm-Message-State: AOJu0Yx4FJe0YyBLXy9LN+3k5zT9dEMw6SxT6EL7LHkalU8oerI6450r n0Hs3WUJC/rDviUikJNrsjX7K16LZHqTbrb9vnS1vGgwnIaBX5ihNHPRwo41i04a1hCqPl3rQor G7Wb0BkdG X-Received: by 2002:adf:f089:0:b0:374:be28:d808 with SMTP id ffacd0b85a97d-378895cafdamr1584996f8f.20.1725626116089; Fri, 06 Sep 2024 05:35:16 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:15 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jonathan Humphreys , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH v10 14/25] net-lwip: lwIP wget supports user defined port in the uri, so allow it. Date: Fri, 6 Sep 2024 14:33:30 +0200 Message-Id: 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 From: Jonathan Humphreys Signed-off-by: Jonathan Humphreys Signed-off-by: Jerome Forissier --- net/lwip/wget.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/net/lwip/wget.c b/net/lwip/wget.c index e8768fc2acd..b495ebd1aa9 100644 --- a/net/lwip/wget.c +++ b/net/lwip/wget.c @@ -349,12 +349,6 @@ bool wget_validate_uri(char *uri) ret = false; goto out; } - s = strchr(authority, ':'); - if (s) { - log_err("user defined port is not supported\n"); - ret = false; - goto out; - } out: free(str_copy); From patchwork Fri Sep 6 12:33:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825965 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778548wrb; Fri, 6 Sep 2024 05:36:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXk0wwc081sr8HBwNUH1w27VZP/2rYOzSCjAZadbv4zftGB8p2zeCLwYL6ZYmvv8V8gV+N2UA==@linaro.org X-Google-Smtp-Source: AGHT+IG5C2piVQUpxTdzT3aGJYenybz5gRKBmSGUuxpS8POH4dcBj204qbsoSj+i/7rqJwqk0+Ay X-Received: by 2002:a17:907:2d2b:b0:a8b:58e3:ac1f with SMTP id a640c23a62f3a-a8b595ddc9bmr146127066b.12.1725626206132; Fri, 06 Sep 2024 05:36:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626206; cv=none; d=google.com; s=arc-20240605; b=QWsa0nvVC320BtL61XHQBNTW0xokVO1TIdmd5H/k/U/gAvRKY9NmMwVN+c+lC/kqTo mo4PPOZyjeG+s/8LuNZ0vVcxzftjmH3g50St5rJRxrbSNlv7Q2Ihyg2jQo81fAgzkx1W cLBKFTydsZUtPEnTrserLrV6BEzzbSeDi3V0LsKEpaIaVWjBVmMRYQRn8RMrKkKSHNP4 +lPpZk3GWa1EjXyjkukCub3KZ0K1YMw+yvS9COkPcOUsbr+hp4eFtGSCy2PzdK5TyB/H bZc1Zhw+euB2ClaDzm0XsvpMaQR2Wwt/OJsOCQ0X51XhLLUWCAg2YkS/e8Wm1iGTqNbE EWEw== 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=+9X+r8Q8NFzSd6Hb1M2hwnGKuGR3j9GDjlrMCZXXI9M=; fh=eGos3Vk2IgbznXK02juYbfSQo9F55l6bAOEVf1vmgKI=; b=czTnzcTERwgbDRgI0KF3xdfNp0G/Vfdm5afs8MSu1IPkddNRcQrfo6uVfrwKNmyWFf hN3D0mwoXBu5mGn9oM0CNZD0xdMLI/++vBEEGnh1LZw5WZVEF6vzxLLCj5ad0e6INUM5 EWUvmkREhjt4CJ2NOYOE4NhMaim29rNP30etXTMuuw2/gg9Zwbimh5SGhHBpmJxqzzfg lQ+NobTOadcDShk7fCcwPA59cMYpuQdReMhEE1EFflf6UDIbFNXMd5qPBslmX0HzgjTS aD+u7jCaiZ7D9ukRHhXm608bj/xY5XjMhCzGag1zJwa9HYS+8f1cn8S9rDnQ+LR2StKl kqcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MDY4V54F; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a8b137bbfsi100039266b.1030.2024.09.06.05.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:46 -0700 (PDT) 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=MDY4V54F; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7545B88D25; Fri, 6 Sep 2024 14:35:20 +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="MDY4V54F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D866688D1C; Fri, 6 Sep 2024 14:35:19 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 027E088C5C for ; Fri, 6 Sep 2024 14:35:18 +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-x331.google.com with SMTP id 5b1f17b1804b1-42bb885f97eso16986985e9.0 for ; Fri, 06 Sep 2024 05:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626117; x=1726230917; 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=+9X+r8Q8NFzSd6Hb1M2hwnGKuGR3j9GDjlrMCZXXI9M=; b=MDY4V54FS6ggxIyKloVtRDEKouQxYrCru4I1qdxhU4rUtii+bbJMRVCJFdx0SRdNAY SFUjLz5bvXKn0rA83lcfj48CfPBbDbCiAqF67pQlQgLrp/l7BUT52rjQ5sfLW+GasHmF jh0GZ7H11tL0vCJ0Urv1JrUGNYuoGkZ41hetipyDeiYt0RwtnNP2ByIWttnHMYkXQ5+Y LO1eMgJC1enT5zCcvUaabYYDaeI0UwQHJgBjd+TtNrSVuIqGZNMwZpkgoSGveWBHR+ff qTg+7XL8JPRqaTjyCKIVMw8KiRN4cDdUutHVs3siP+ioY9QQHnh15+VeLEoLm2izbfG4 x7Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626117; x=1726230917; 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=+9X+r8Q8NFzSd6Hb1M2hwnGKuGR3j9GDjlrMCZXXI9M=; b=Rm/Dr6UNkmgd+QK561uGqvQKL2QRflhOcvxPYngb2ReNUe9vzYzd1oDDzqOfkFN/k3 kcW4jhvd+kieotgNlwQH/XsAB6lCfpzmhHBkqIDbkadc2h7sazS3WMQ2DBZAS/DPJBSU NbzgQL6tGaoCID7GbZaFHwfz66Z8DALiPQ7Johnsvlrpm6osGp8fRUVf360FM7FWn0vx t/Nrq7IkHiCpbxc1TNJNiBzLn3XVEuCA27srMhRZJXmNqZ9a/MU4q+fdwc6ZPVKZ8Dw1 K/0BLYTwz4PqxN92gpqtB3RUWTOgiZ1HoqL0/EsBR32Mg4IjsYYC6Zc9W4JwZj3i/TXU ep7g== X-Gm-Message-State: AOJu0YwjsWpgSCyJ+8o2YwcSHPvvr8M5HJT8EZEkXU3Ej3XNcym+mtN4 GCNbE7gOUOcuROsWUZ4Yh72fFKrN6lfS6yilpSJEVcvaX79yioNA1LYT1iXY0Gfqw8sC633s1jf 2BIDE/afN X-Received: by 2002:a05:600c:4ed4:b0:42a:a92b:8e06 with SMTP id 5b1f17b1804b1-42c95ac1815mr56629075e9.4.1725626117025; Fri, 06 Sep 2024 05:35:17 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:16 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Marek Vasut , Sughosh Ganu Subject: [PATCH v10 15/25] cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y Date: Fri, 6 Sep 2024 14:33:31 +0200 Message-Id: <3134ad279d4d0d7fbce820ef1d565f75d4990c23.1725625913.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 Support "bdinfo -e" when lwIP is selected. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas Reviewed-by: Tom Rini --- cmd/bdinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index f6e534dd5bb..4c0e2adabc3 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -151,7 +151,7 @@ static int bdinfo_print_all(struct bd_info *bd) bdinfo_print_num_l("relocaddr", gd->relocaddr); bdinfo_print_num_l("reloc off", gd->reloc_off); printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8); - if (IS_ENABLED(CONFIG_CMD_NET)) + if (IS_ENABLED(CONFIG_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP)) print_eth(); bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob)); if (IS_ENABLED(CONFIG_VIDEO)) @@ -192,7 +192,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) case 'a': return bdinfo_print_all(bd); case 'e': - if (!IS_ENABLED(CONFIG_CMD_NET)) + if (!IS_ENABLED(CONFIG_CMD_NET) && + !IS_ENABLED(CONFIG_CMD_NET_LWIP)) return CMD_RET_USAGE; print_eth(); return CMD_RET_SUCCESS; From patchwork Fri Sep 6 12:33:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825966 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778640wrb; Fri, 6 Sep 2024 05:36:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNSM/cYqQD5r4nF48T65HnVbeWO1NbD8/dn840W1QlULJ1HCr25ymJXvWcMr89V4oJ6yVo/A==@linaro.org X-Google-Smtp-Source: AGHT+IF3hcbCqdPBYoxSirk8xMck0+Jo9Oz8mQPBT0/3fSsr9h9mpK7B++uut9/twEvxO/EHS/bC X-Received: by 2002:a05:6512:ba6:b0:52f:cc06:c483 with SMTP id 2adb3069b0e04-536587abeafmr1525465e87.24.1725626217547; Fri, 06 Sep 2024 05:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626217; cv=none; d=google.com; s=arc-20240605; b=UVZsIPl3N5Rh7eTOTdT7GK2ZodTc0CoGDGfKt46Xici5CNNBMST4nA/n2G9cqTTKAf AWWm1k4krdjJD0xMLpBCA4l/BXCjIhyoyNE3KB+Sj3vbOqS/4qRTkPbNFNFLtEyyfNk/ xce0LB0UDQjbbIZRB+jAs2LhVAgv8Q4vfVyZTUl2kzls57TKHqUXJWuW1VrKDStayEtl xQ9d32YEU+gIBWMkK7Rk+/itQAylmiNlsn5dWZT8kc1+I7A9Wt82t57FavyY3S4TALdr BHr9eXs2Uai7PpZ02crKGcYfs8Udy7Zz+Cn4paKBTZo1tS616TWI/4+zt09Vtj9aesA5 MZjA== 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=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; fh=ThdVVZAeTRhYRIsitiRafY870JZ08RRoQKK9619Vak0=; b=T6en6RNTfV6zr3sDrlOgaIWeQEUJoamDM0WsnlH6/FLhVV5ENPgJqsH6G6OTuSQGA3 YxK9znPPgf0HcgUqyk5wBJAn6aaJ9Dphui5MYHVZ2F88kOi+81Z3nOdf1Gb4s1WgCKyM bfjQdctJY3HV9NkqJXtRZqMJm3Q99Cngjx/UbdEkFjibeArS0RZRsQalTh1BTDc8PnhA jOhP5xPh43mEFe5cEbIfwC+eZXKorfPCPOp+YSeuW+VKI+m/mYAbVck0WTCC3O+2iMPb JVsZBSG8WE64YqoTIuW0H0xDFMBWMv5CTzOsW3b6NV1c8f9RGc2gsBXKSkwO/6WgKSD6 AIIw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TOLhmBCj; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a7a33f858si196680466b.251.2024.09.06.05.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:36:57 -0700 (PDT) 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=TOLhmBCj; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDC5188D2A; Fri, 6 Sep 2024 14:35:21 +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="TOLhmBCj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9983E88D2A; Fri, 6 Sep 2024 14:35:20 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 BF88688D04 for ; Fri, 6 Sep 2024 14:35:18 +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-x329.google.com with SMTP id 5b1f17b1804b1-42bb8cf8a5bso15434955e9.2 for ; Fri, 06 Sep 2024 05:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626118; x=1726230918; 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=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; b=TOLhmBCjBlhA0nnkcaJIurwpGFCm9KEQZX61VAiHgKr/Igd4oPv/EKjNXasw3gOwfg pRN9AAu+3H76UjxvXyzB0GFUggaPPtBn9kjhouJz0I3tmiSniUyv04bT4v5/JbVVjLoo zO3Z1D1f3sR5GQyo3L+JztA7sbna11V11QOkkeypylc5sPhPabkO74DqKjGg4pFq4Lhq QLEPk7xfaZhtkfxAdfE+avzUJXshWcojqeJUByiUDb5hi7qmCfqQ9MFIl1xKrS9Onwl5 zWFsfK61CHzkL9t2MIpl91gIF1I0vTbZrAfWMQMyYAFv+PS1Khid5dB0sCCSZ+dfICv6 UAEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626118; x=1726230918; 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=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; b=elQY1XlV+zqGmL8cSEHC4Ph7i9zBx7iIbUZjA0yXUyBg4KQqzFoUB9s6kQ53jLCmOE vT6g0fRZC+uYzaR29bpq5vVci0E6k4758L5LOZ72w5kA2O0OhtFaEv7FJ4e4qbAXnr51 nVXVP8sbittjuPZH9NNZy0ijnxBZncyAQLvmu1vw8JxNofEoMKnUJXjWNuLBs1t44WOZ wxXwrkhxvFbquQfcXaXc0vWFkIv7OHGOZOPOi2SYwlLXWJhjBRZ4Z7pNDjdRJnU1bAku XBLpBYW9aMX9lWD1rj7E3rlwhX9dwx4/4W0BxSWELOTiiyiDMzLLjpt/Ce3eW6lsHjDr 3KIw== X-Gm-Message-State: AOJu0YylxXSiN8EdCwwmMOSW6QQe3bhB9mzQ4Kkt4tZQH0g8VsE2H+T2 7Wb6PzA/RzslkhgS+jerD7S0YPT7cMeTARSkEdJhR73XU1cmdPKcdqGi3/Tc1cgL3H671qWAiAS TI0JFWD80 X-Received: by 2002:a05:600c:3483:b0:426:5440:854a with SMTP id 5b1f17b1804b1-42c9f97b8abmr18152775e9.1.1725626118094; Fri, 06 Sep 2024 05:35:18 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:17 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini Subject: [PATCH v10 16/25] configs: add qemu_arm64_lwip_defconfig Date: Fri, 6 Sep 2024 14:33:32 +0200 Message-Id: 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 Add qemu_arm64_lwip_defconfig which #include's qemu_arm64_defconfig and selects NET_LWIP instead of NET. This config has all the supported net commands enabled. Signed-off-by: Jerome Forissier --- configs/qemu_arm64_lwip_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 configs/qemu_arm64_lwip_defconfig diff --git a/configs/qemu_arm64_lwip_defconfig b/configs/qemu_arm64_lwip_defconfig new file mode 100644 index 00000000000..c7198340592 --- /dev/null +++ b/configs/qemu_arm64_lwip_defconfig @@ -0,0 +1,10 @@ +#include + +CONFIG_ARM=y +CONFIG_ARCH_QEMU=y + +CONFIG_NET_LWIP=y +CONFIG_CMD_DNS=y +CONFIG_CMD_WGET=y +CONFIG_EFI_HTTP_BOOT=y +CONFIG_LWIP_TCP_WND=8000 From patchwork Fri Sep 6 12:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825967 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778718wrb; Fri, 6 Sep 2024 05:37:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjcU3rb+qg2vIT8r6oZeciCo+6b+4oe5i1i8HGG1P7Ar//mcryN/Mbve9Hi/54dDQC9z1OUg==@linaro.org X-Google-Smtp-Source: AGHT+IHSc3sINvCqmYyapnPGInverYCA144In3vH/1lMVzJjAzkGWMFouLYdafKamU2oYclxsYzT X-Received: by 2002:a05:6512:2213:b0:536:5644:6086 with SMTP id 2adb3069b0e04-53658815e6amr2006769e87.52.1725626228865; Fri, 06 Sep 2024 05:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626228; cv=none; d=google.com; s=arc-20240605; b=V+qasd7meWywkIap3R7ExMxEbX9KudLVQRAt4ZPBpL2XnYWlW+xMa+zCyE4v8VRvgy vjZb71WFrNuFHPAsZMBC9UBRSXbDMjTiGunDUIRF4zYsC5XuJdVnW0rps+KSSZw5mpHu 2I/WM59sJ7Ne6Vxz8Nc94xcr8uo8/+UuaqC/5CXhDB5O8PDtGUP+gExdyqV841JydzE1 wjGf2ze78/EG0r0glNkmszG+jVhKvghEXScL+FL946H10C3Ou5hL9mXEU04SEwTBJCTB fMFbkGVwkXrantvELHSpyd3uQnm4pU5paF/dYAlRQmki5B74VO7AVdM10sgttVU4ot/I w0qQ== 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=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; fh=ThdVVZAeTRhYRIsitiRafY870JZ08RRoQKK9619Vak0=; b=bEzeSjAvZpnsyOsGdSu1hGjIiH33/gpbSYBuqAipSfdyc5lEOt7vJ1jH20vmcIAQg0 plXYRaLsIzClnfCC2BJATosuL+HQPadVludbXgwjPb8lOPNn018FasOvilvcRWnkR3Vi 1+q4OPstRuvpj4TRtucQju9WL6g+G/Bay30JSHqYCvdo11BpEEt/IC1fNiVcEY4bowbA F/vK9H+DDrKcCke+8bwka0uNE7SbnJ3nca6N9MDpW8kDoOUfRM+DysVi/RzECzTCL8Xu b8kmBD+Vj6EkUQLm7B6jHY4L6PcdlKLYzyGI/4UJnrUOsMv0yFQBUbhK1TCx+XwfxcRz FnpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GKrhmV/r"; 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-a8a6240c7e0si308015166b.735.2024.09.06.05.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:37:08 -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="GKrhmV/r"; 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 344BB88D28; Fri, 6 Sep 2024 14:35:23 +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="GKrhmV/r"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F167E88D2E; Fri, 6 Sep 2024 14:35:21 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 E478988C5C for ; Fri, 6 Sep 2024 14:35:19 +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-x333.google.com with SMTP id 5b1f17b1804b1-42c7856ed66so14749065e9.3 for ; Fri, 06 Sep 2024 05:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626119; x=1726230919; 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=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; b=GKrhmV/r2V61/jZ0CUY0au4EyFp77IDmeoi69y4wCydFUceTcjUc27MF/pVBjQn8Zd HA8Ly5bwjiJB/nGPuvNuEnkJ+ew+4yNRUmEPgMld3pNqYV2X9ybB6Ri3XXHiUivIocUI kcaZPQHAqi8JaEOijlSiKkoUu1fcQusMwE2hhLntKN3L9YzIJDrNAzDf7Cad/QKZrCEy i7T2llAs4bxnJGrR2BlR7uKWInZ/xt/h32qRLyMe6hWgte1bUIrZj7ryTBpF3y+kcely vAedgzc6BWYUyHcC6aB9IT5kHhtgcH8EKCil5kmFIp9bAF5bGDR4XWyEt0tRWQ/zY+fz GcZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626119; x=1726230919; 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=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; b=cWQ+eVcDncXHOJIXP5qm13ZHMiUM0yASkm3gxgYr9mp5qJByMMwLUbFaNLGDoGbcDu 3GZdkOJ7ruz6CKjLvptsTMQ6WUUJWugX+stpyxCiJSwgL1LvdgFyaoO3YVepoxVS4oge B65kD/2dtU/xL0YhCWXAtXDXtNJmqoQsGbHwgw1UkkmYt8/OLAXkdsDbQMxis5v7+ds4 qyHY/KOeqm+wlbFlgV+Fy1qn/iqR7yWhQxyPU+/uaJEEx1qd+Y2y6y/0cpRLe243ZTkx 5HiAFNiMcXGBb+tE1dFzC6EWNzyZoKINahURaJWGSX71RMraFjT2PZwZ3Nou4+mgEZyN K+ng== X-Gm-Message-State: AOJu0YwxGqP3icU0Xhe7XUUlQbfhQK0B642wE0LqPZ6k4g/70iS1BKzY DUwXy/P3NPfHGKc9cJoDoJJjkXKY+6Nvcgqek+JhAw37umt05Cz6IlGR1tMIvvx/6AFXBqYx5pv 9ZTL9f4AI X-Received: by 2002:a05:600c:1991:b0:426:5fbe:bf75 with SMTP id 5b1f17b1804b1-42bb27a9f2fmr209855095e9.23.1725626119008; Fri, 06 Sep 2024 05:35:19 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:18 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini Subject: [PATCH v10 17/25] lwip: tftp: add support of blksize option to client Date: Fri, 6 Sep 2024 14:33:33 +0200 Message-Id: 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 The TFTP protocol uses a default block size of 512 bytes. This value is sub-optimal for ethernet devices, which have a MTU (Maximum Transmission Unit) of 1500 bytes. When taking into acount the overhead of the IP and UDP layers, this leaves 1468 bytes for the TFTP payload. This patch introduces a new function: tftp_client_set_blksize() which may be used to change the block size from the default. It has to be called after tftp_client_init() and before tftp_get(). If the server does not support the option, the client will still accept to receive 512-byte blocks. Signed-off-by: Jerome Forissier --- lib/lwip/lwip/src/apps/tftp/tftp.c | 94 +++++++++++++++++-- .../lwip/src/include/lwip/apps/tftp_client.h | 1 + 2 files changed, 89 insertions(+), 6 deletions(-) diff --git a/lib/lwip/lwip/src/apps/tftp/tftp.c b/lib/lwip/lwip/src/apps/tftp/tftp.c index ddfdbfc0c1b..e08e9665124 100644 --- a/lib/lwip/lwip/src/apps/tftp/tftp.c +++ b/lib/lwip/lwip/src/apps/tftp/tftp.c @@ -57,7 +57,7 @@ #include "lwip/timeouts.h" #include "lwip/debug.h" -#define TFTP_MAX_PAYLOAD_SIZE 512 +#define TFTP_DEFAULT_BLOCK_SIZE 512 #define TFTP_HEADER_LENGTH 4 #define TFTP_RRQ 1 @@ -65,6 +65,7 @@ #define TFTP_DATA 3 #define TFTP_ACK 4 #define TFTP_ERROR 5 +#define TFTP_OACK 6 enum tftp_error { TFTP_ERROR_FILE_NOT_FOUND = 1, @@ -88,9 +89,11 @@ struct tftp_state { int timer; int last_pkt; u16_t blknum; + u16_t blksize; u8_t retries; u8_t mode_write; u8_t tftp_mode; + bool wait_oack; }; static struct tftp_state tftp_state; @@ -137,10 +140,24 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname, { size_t fname_length = strlen(fname)+1; size_t mode_length = strlen(mode)+1; - struct pbuf* p = init_packet(opcode, 0, fname_length + mode_length - 2); + size_t blksize_length = 0; + struct pbuf* p; char* payload; err_t ret; + if (tftp_state.blksize) { + blksize_length = 14; /* maximum (blksize is a u16_t): 'blksize\0XXXXX\0' */ + if (tftp_state.blksize < 10000) + blksize_length--; + if (tftp_state.blksize < 1000) + blksize_length--; + if (tftp_state.blksize < 100) + blksize_length--; + if (tftp_state.blksize < 10) + blksize_length--; + } + + p = init_packet(opcode, 0, fname_length + mode_length + blksize_length - 2); if (p == NULL) { return ERR_MEM; } @@ -148,7 +165,10 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname, payload = (char*) p->payload; MEMCPY(payload+2, fname, fname_length); MEMCPY(payload+2+fname_length, mode, mode_length); + if (tftp_state.blksize) + sprintf(payload+2+fname_length+mode_length, "blksize%c%d%c", 0, tftp_state.blksize, 0); + tftp_state.wait_oack = true; ret = udp_sendto(tftp_state.upcb, p, addr, port); pbuf_free(p); return ret; @@ -221,14 +241,14 @@ send_data(const ip_addr_t *addr, u16_t port) pbuf_free(tftp_state.last_data); } - tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_MAX_PAYLOAD_SIZE); + tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_DEFAULT_BLOCK_SIZE); if (tftp_state.last_data == NULL) { return; } payload = (u16_t *) tftp_state.last_data->payload; - ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_MAX_PAYLOAD_SIZE); + ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_DEFAULT_BLOCK_SIZE); if (ret < 0) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Error occurred while reading the file."); close_handle(); @@ -239,6 +259,28 @@ send_data(const ip_addr_t *addr, u16_t port) resend_data(addr, port); } +static u16_t payload_size(void) +{ + if (tftp_state.blksize) + return tftp_state.blksize; + return TFTP_DEFAULT_BLOCK_SIZE; +} + +static const char * +find_option(struct pbuf *p, const char *option) +{ + int i; + u16_t optlen = strlen(option); + const char *b = p->payload; + + for (i = 0; i + optlen + 1 < p->len; i++) { + if (lwip_strnstr(b + i, option, optlen)) + return b + i + optlen + 2; + } + + return NULL; +} + static void tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { @@ -338,6 +380,15 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr } blknum = lwip_ntohs(sbuf[1]); + if (tftp_state.blksize && tftp_state.wait_oack) { + /* + * Data received while we are expecting an OACK for our blksize option. + * This means the server doesn't support it, let's switch back to the + * default block size. + */ + tftp_state.blksize = 0; + tftp_state.wait_oack = false; + } if (blknum == tftp_state.blknum) { pbuf_remove_header(p, TFTP_HEADER_LENGTH); @@ -349,7 +400,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr send_ack(addr, port, blknum); } - if (p->tot_len < TFTP_MAX_PAYLOAD_SIZE) { + if (p->tot_len < payload_size()) { close_handle(); } else { tftp_state.blknum++; @@ -386,7 +437,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr lastpkt = 0; if (tftp_state.last_data != NULL) { - lastpkt = tftp_state.last_data->tot_len != (TFTP_MAX_PAYLOAD_SIZE + TFTP_HEADER_LENGTH); + lastpkt = tftp_state.last_data->tot_len != (TFTP_DEFAULT_BLOCK_SIZE + TFTP_HEADER_LENGTH); } if (!lastpkt) { @@ -405,6 +456,25 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr close_handle(); } break; + case PP_HTONS(TFTP_OACK): { + const char *optval = find_option(p, "blksize"); + u16_t srv_blksize = 0; + tftp_state.wait_oack = false; + if (optval) { + if (!tftp_state.blksize) { + /* We did not request this option */ + send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "blksize unexpected"); + } + srv_blksize = atoi(optval); + if (srv_blksize <= 0 || srv_blksize > tftp_state.blksize) { + send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Invalid blksize"); + } + LWIP_DEBUGF(TFTP_DEBUG | LWIP_DBG_STATE, ("tftp: accepting blksize=%d\n", srv_blksize)); + tftp_state.blksize = srv_blksize; + } + send_ack(addr, port, 0); + break; + } default: send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Unknown operation"); break; @@ -493,6 +563,18 @@ tftp_init_client(const struct tftp_context *ctx) return tftp_init_common(LWIP_TFTP_MODE_CLIENT, ctx); } +/** @ingroup tftp + * Set the block size to be used by the TFTP client. The server may choose to + * accept a lower value. + * @param blksize Block size in bytes + */ +void +tftp_client_set_blksize(u16_t blksize) +{ + if (blksize != TFTP_DEFAULT_BLOCK_SIZE) + tftp_state.blksize = blksize; +} + /** @ingroup tftp * Deinitialize ("turn off") TFTP client/server. */ diff --git a/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h b/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h index 24dbda6a8c9..e1e21d06b67 100644 --- a/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h +++ b/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h @@ -44,6 +44,7 @@ enum tftp_transfer_mode { }; err_t tftp_init_client(const struct tftp_context* ctx); +void tftp_client_set_blksize(u16_t blksize); err_t tftp_get(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode); err_t tftp_put(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode); From patchwork Fri Sep 6 12:33:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825968 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778790wrb; Fri, 6 Sep 2024 05:37:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWO7zt+qRdWBZP4I7609slsbUGMtzXD9M2Kk6kQ1F0C67TUUl2gpA6XQYO0IYO3V33MoVN3+A==@linaro.org X-Google-Smtp-Source: AGHT+IFGaeJa4sxNkjRo3i0h74FLjXNdxRQ1sZRkcqEVNTPBEO47F1Byj4AhxwM/c+I9SFlV4B4L X-Received: by 2002:a17:906:c14b:b0:a86:91ae:85e7 with SMTP id a640c23a62f3a-a8a885bfc28mr195664266b.8.1725626239231; Fri, 06 Sep 2024 05:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626239; cv=none; d=google.com; s=arc-20240605; b=Hf6N4vlwqkrq/FhhNzdwTJ3GqYTfeLKAb88s8jA+am/EdS6PTeTxryaST7jlzS2j5C n2ly4Zzk65gldePBuXJtYVSC6Wd7EEl4vu2HSSU+x7fj7ysKvOd5B/yZf5FMi71+yFHk TimnQUrYH5N2liL4OpT0wDIlq9rjkRzKfUQel278+O46Fy4k3KF5tDDZuA2uSDWYjxRj OMbdkRlVHLe6f1MZCZqiQLM09BszauTRPizUVpIkaRSZKeCTGuHGiC67PDZ4quUBt6Ub KW+JDwROpHz8LjH3n34g7W71cdK+1azqBzrsI+MTlVclB8XLMHdl2QWpQMbFxa6S3HGa Kijg== 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=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; fh=1xnSqnpYa1DPcifqqeRY0YER2OXRzj8zHA65PDZaCyQ=; b=AvIBsvr/K0GhfXTMvDVQWhD17ol+nvSKXiwUR568/B4NyI0dJQJUuq2XeuHo8SB5Ef QnLazeMekd4A+NxAcf+EJZcTfdWxSbKzL6yMto3jHShBb9MjNdzUg9Qnu26evoG9mbNo aQjFx2A7x0py3gWdAp8bsMlM9TfLAIjwiG9MtuCFtsEITi/gJk7JMjpEG5uyw1o3k+fJ BYMsh3xpxSwGYQwhUVwe7cOM4drhR7GqWAPYjuJWUI7hoWeXftRebUWU24jb6R6UAeWj 8YBSqdMu9nc6kTU5ecuagLbbxfQea0HdG0ozz+dhUoTZeCoIL8pc7JowcMb32+0z2RN/ MW0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUyLA1hM; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a62379a72si304042566b.425.2024.09.06.05.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:37:19 -0700 (PDT) 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=XUyLA1hM; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8458088D1C; Fri, 6 Sep 2024 14:35:25 +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="XUyLA1hM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E867688D2F; Fri, 6 Sep 2024 14:35:22 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 0CC4588D04 for ; Fri, 6 Sep 2024 14:35:21 +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-x32d.google.com with SMTP id 5b1f17b1804b1-42bbf138477so17070565e9.2 for ; Fri, 06 Sep 2024 05:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626120; x=1726230920; 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=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; b=XUyLA1hMQi5msT/FC9+rY9tyzD7j5ghe6kfR0BZTl7D+ShTUCN4rUuptJc782cssvV SW6cFUceSEInXpQrP3qOwgHHikr5pEGvSAYNcSBJ1Q2rselW+9VaQ41VYg2AyrK160kv wcdne49oqRFBx3xpVk9n9fi2BOOEU8HPXhJETfoni7HYxG4yJ0N/ZQDsGlcwErRpyRfK yazaNccLfK2l/Pj0WZpvefeRrELxM8JbmpoDY+fcrjn5ZGl1DFk8BPEI9nR0Ht3Pf8Fp UVz1H5yUO6AogHSCqPC2MeQxUFIvkvcGTI8h+JbTGJwffgEQZrMYjWWf3wxyTjrz1vLC zGaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626120; x=1726230920; 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=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; b=FpLeRS/2OHGaRdp8u/vkm4upMcPkauw/4jmVx9paZCXxCvvXSrZDXS1roVB1e6BCGh b5AS/uaL/P9MJm3sUOJ9Clek4m7nTTx74wqwJYMHAj//SBeofqe5S2Ay82jgbE2lrNot ACBGxBmI67Vx+jr46feDuk4yR4gLmJbTrMyfVIvhEC76vtN7RlH/82IQv7yad5FpxNVG bBsIkDkxKzhXYm/8fUWw3+5MtRebnRjDosBy8S94bhLkfFfYFHTot7zmQHs7pEXEOTTy N6k/3mXsV1qQ7Mrk4GZimgbw2XdN0zMJavaHBFRdaWoUF2dI+9eMhX2+JZIPID44N7zh 7YWw== X-Gm-Message-State: AOJu0YyUkVAfxN77u7aIo5VKb6DkGqbDSlmQQYOrhWe9VBPGAcHU8QTE ykffKiD455GWB3IeA3grdczqv1aYHvfab84xThKFoUsgp5gX4qgTWQrq1f6gkgksGIK2rBn6D6X g1UWzSN16 X-Received: by 2002:a05:600c:1c01:b0:42b:ac94:692c with SMTP id 5b1f17b1804b1-42c9f8eede2mr19209765e9.0.1725626120302; Fri, 06 Sep 2024 05:35:20 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:19 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Simon Glass , Anand Moon , Baruch Siach Subject: [PATCH v10 18/25] net-lwip: add TFTP_BLOCKSIZE Date: Fri, 6 Sep 2024 14:33:34 +0200 Message-Id: <318048700dfb511c4634505adb1e95ce8be189c0.1725625913.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 Add support for setting the TFTP block size. The default value (1468) is fine for Ethernet and allows a better throughput than the TFTP default (512), if the server supports the blksize option of course. I tested this change with qemu_arm64_lwip_defconfig. The throughput is now 875 KiB/s vs. 313 KiB/s before. That is still a low number, but I think we can't expect more without implementing the windowsize option. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- net/Kconfig | 20 ++++++++++---------- net/lwip/tftp.c | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index 16a9de47e94..76ab7d91eeb 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -60,16 +60,6 @@ config SYS_FAULT_ECHO_LINK_DOWN this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to be configured. -config TFTP_BLOCKSIZE - int "TFTP block size" - default 1468 - help - Default TFTP block size. - The MTU is typically 1500 for ethernet, so a TFTP block of - 1468 (MTU minus eth.hdrs) provides a good throughput with - almost-MTU block sizes. - You can also activate CONFIG_IP_DEFRAG to set a larger block. - config TFTP_PORT bool "Set TFTP UDP source/destination ports via the environment" help @@ -254,6 +244,16 @@ config NET_RANDOM_ETHADDR generated. It will be saved to the appropriate environment variable, too. +config TFTP_BLOCKSIZE + int "TFTP block size" + default 1468 + help + Default TFTP block size. + The MTU is typically 1500 for ethernet, so a TFTP block of + 1468 (MTU minus eth.hdrs) provides a good throughput with + almost-MTU block sizes. + You can also activate CONFIG_IP_DEFRAG to set a larger block. + endif # if NET || NET_LWIP config SYS_RX_ETH_BUFFER diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 50b8fbad00d..51cd1e0207c 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -138,6 +138,8 @@ static int tftp_loop(struct udevice *udev, ulong addr, char *fname, if (!(err == ERR_OK || err == ERR_USE)) log_err("tftp_init_client err: %d\n", err); + tftp_client_set_blksize(CONFIG_TFTP_BLOCKSIZE); + ctx.start_time = get_timer(0); err = tftp_get(&ctx, &srvip, srvport, fname, TFTP_MODE_OCTET); /* might return different errors, like routing problems */ From patchwork Fri Sep 6 12:33:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825969 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778844wrb; Fri, 6 Sep 2024 05:37:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW2rbZoU4eQeoagK0wCIh0AblXLfkYjrMx6HwZU0+L63hbnimJu7kyVnVuxZFbrdr4mQU34pQ==@linaro.org X-Google-Smtp-Source: AGHT+IH/NYZz2s7k1vGqVHzMjPmNOGFhkQGNj4fx18leprNTmjWC9BL4flTc5lfUIEodHbh4UCoA X-Received: by 2002:adf:e6ce:0:b0:367:991d:8b76 with SMTP id ffacd0b85a97d-378895c70ecmr1610629f8f.15.1725626249348; Fri, 06 Sep 2024 05:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626249; cv=none; d=google.com; s=arc-20240605; b=keGZ1iyDgLL8tVMxM6/5q2YXnW9iFw5AJzF8xyNO2jdS75b/4UGqKh7kP1T1KmOrlk EEkF/b+RecuNkyqS1AQEnz1WX4i/FoCbtpBLm9hij/MBOKN0z0TRL3X7J3YZuXC3fgm/ 6quMeQ+gEAWFQ1NunD/iR4n0qYIPVhqdu51JoCfpibSky3e24u3fDf2gGMu6UUn2CAFb qfqZp8VQDGogI1lWa+AXQsfvJW1PGa4+K0pyI7RmGvkfwWubBfJ6NW75uUZqev6QhTBW Ze1n8M8BJDatd7jUjb/oVNdOsSLtSx7yJ0Vkwi5zvU7+lvXKMlI8xNXzQxtD7t9x216Q MFcQ== 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=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; fh=KHBkO1cMxvxOf3oQBHi6yJaebUf7JU4mAfTIjGEYF08=; b=YbUf5JpWX63eRj7dt4ZsRVcZ3IGqJf5PfdYTQBliXYqZ11+F0IeJX0ygY1czeCBoCh 49hJevUYwqdG35CEo9L81AXM79VIBa5L3mDIcOY1tUHyKS0zdEMl6WubNCIMJkwtj0Hg cMizdIDsljijH8E0zR0YxeBmODyZkRhIpt5i11v3qf9TTIWMuUkXQOitrgVRRLnZUpCX WTidXvdtOfxum3uEGaSBT3zFYXBYFwl9vRFs4Y27DrT+B5yfzE+W3owlgWx76qt3Mp7S WIL/ezPjRVcNlMkwOMH6kyJC0pkOJ7lemwDvEHJRIexJZnejRWnEJ8mYdOrMTu2GXu7X Z8ww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BCItFVbo; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a7b64cae8si189982466b.844.2024.09.06.05.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:37:29 -0700 (PDT) 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=BCItFVbo; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DDAEE88D52; Fri, 6 Sep 2024 14:35:25 +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="BCItFVbo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 631EA88D47; Fri, 6 Sep 2024 14:35:24 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 2E85188D01 for ; Fri, 6 Sep 2024 14:35:22 +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-x332.google.com with SMTP id 5b1f17b1804b1-42c94eb9822so15018845e9.0 for ; Fri, 06 Sep 2024 05:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626121; x=1726230921; 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=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; b=BCItFVbo72sdRpXuMboLvWSs2PkOmMbpmEkfe/5Mo0vE5aTRb8Mf5ESV6NoQM6K1C8 3hV8TuH/9PSx3wZCSenyKQNHEqDq0pXoqlDh/yHo+x8vyFxhl6X05GyJlKnXOFLwsv/r 3/iEAqIz/nhfi0JezIBGZnqi9R5UcjKS4y2ffTTpc3TyaHYUy1Me6oyUJjJIw0gETaMi bUakJiyYUzZOU+9MOFCRGGh7DdKvC9u8t2/Meo3pDInnnvech8i28pHgbYqm6hkhh1VE BsSBgIJUk09MndT2Omv0gnciFLj84I8WqiwKn4REX+gnkGyCAXILEZsZXYnbIIaW2QGR m6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626121; x=1726230921; 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=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; b=cDOO5lKo7ZZuN75+xTa6iBzjSWqW2PPqu+lVDGdYzaigyKuScl/CzBMe4fALxT0jbj lYG6m8isYruVJcUwZAgc0qIoZ+NRKdW7QU2/Pw2uOtrOFZL78RMmRIWktaSo6l+Jk4lq oD2SNJmOkGvErkoQkZuxZ2RfJx30jy6rs+syMnJ95KtV7GkP/cg6WoJwOcityET1hZpn rtjTTSH3xYPJeqL1n6FtPbYgNDP6Ng6LqSintWyPRZGnPmeUANPOEjEKV/+DKrXQxgRZ OZC3KYnZZQvNNOXJ8ePaLJI9Yuiagx4zULgZjckBkWrn28J3NwRrA8O1ZcYyfmdGMVqu wG0w== X-Gm-Message-State: AOJu0Yx3jvQlMNRtfAfdgO/SZZnKsMCGznEOZPIDFgNh0sYZJVFyTNme cStlgkJB58eW1Bd6XjET5SKfXLPUgNgAL6iFKrZQOvQ1oWY/vMXajuvwSAz6yOf/dDACIuRjXPO gk+OjoDCd X-Received: by 2002:a05:600c:c08:b0:42c:9e32:d26f with SMTP id 5b1f17b1804b1-42c9f9879famr17905015e9.19.1725626121205; Fri, 06 Sep 2024 05:35:21 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:20 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Jiaxun Yang Subject: [PATCH v10 19/25] CI: add qemu_arm64_lwip to the test matrix Date: Fri, 6 Sep 2024 14:33:35 +0200 Message-Id: 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 Build and run qemu_arm64_lwip_defconfig in CI. This tests the lightweight IP (lwIP) implementation of the dhcp, tftpboot and ping commands. Signed-off-by: Jerome Forissier --- .azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 93111eb6127..59fddb96a48 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -238,6 +238,10 @@ stages: cd \${WORK_DIR} git config --global --add safe.directory \${WORK_DIR} git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks + # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled. + # The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks + ln -s conf.qemu_arm64_na /tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na + ln -s u_boot_boardenv_qemu_arm64_na.py /tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\` ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\` grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd @@ -415,6 +419,9 @@ stages: qemu_arm64: TEST_PY_BD: "qemu_arm64" TEST_PY_TEST_SPEC: "not sleep" + qemu_arm64_lwip: + TEST_PY_BD: "qemu_arm64_lwip" + TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot" qemu_m68k: TEST_PY_BD: "M5208EVBE" TEST_PY_ID: "--id qemu" From patchwork Fri Sep 6 12:33:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825970 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778918wrb; Fri, 6 Sep 2024 05:37:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1+g9rZU/HcZ/WWOYywnabYKcQKc5HtsrLtesenfep/RRChS5AEm/3c9uaZW+9lNVBtfvL9A==@linaro.org X-Google-Smtp-Source: AGHT+IFV3fTOrXEraBZYqqoTUZ34M5DRas4kzmu8ddUya4DLiAKAzqKcy0adgxJaokbFI5oxMb/Z X-Received: by 2002:a17:907:c10:b0:a86:e168:609f with SMTP id a640c23a62f3a-a8a85994156mr276595366b.0.1725626259224; Fri, 06 Sep 2024 05:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626259; cv=none; d=google.com; s=arc-20240605; b=KsA0irBrAfkSMEyIh2ScPMLohDb4eJGGP+w8+nUYBvTRLRPKok6m3J4wYpn80RdSsj IHJvaGjYaM7ac+ObLLRCRoiJULUCcjXfHw85NNhBHhEqmRWopB6LpgRxH2v0YFycM6eD 3vC8ViKmOyM/qEJsUrcsVU5ajGf2M5RPs1aCJ+Mrl0d3exw9mM7WZk1QKPpx4db2mSPR xnqoahiF2YdEQruMt0+boNHoBWZBa0Q9M74CJuKV+i2QA2kRkkRUu0RDdljGPu06Y6Cy Cekrx/OkHC/pNXRdFTV0LOO+cYwcEK5CawzjXuvGitku2NoEUA6oCjuVSnFey8AuwXVK SobQ== 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=X31r2+WwWvTBRJFNZIhR9Hju6vvkRpqu0GGZrnMp3kw=; fh=jQyt5uC4XS1lU4hWefz8zg9vUVrljOdaU409r/Um7+M=; b=JjIaNg9J4n3uFcVDQL/GhA3F2KwA33eN7WjLIcFDl2f+swFEYYH36xNkYZ7BP05mjp jX2aGiTgvxGi05XDbqobICFraWTb47nZpG9Xh5wjwKHBfTif8pJ0mFS/m3cEBzWJKo/d 2z5MdYOxg5KpGj92/k4VdPpoPTePJrSEVFFFr2a88DrEhfW5GRU4LyjDQP1wip5cfW/Y hvRGCs/5KKzQPNTUbHoFQdHDKt1yH4D3FB19F+3iC9GWXZQH7G0TACKGRe/R5Qxx/t45 gMAgFi3vzQ0q8/qGyDzO0a+8/170NSDTxJnF/cpL54k00Q53ARoIfNUHOWs/srJEfjpE d1fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lUBAkIky; 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; dara=neutral header.i=@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 a640c23a62f3a-a8b8848178fsi49127666b.897.2024.09.06.05.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:37:39 -0700 (PDT) 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=lUBAkIky; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DBDA88D38; Fri, 6 Sep 2024 14:35:27 +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="lUBAkIky"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 69BA888D1C; Fri, 6 Sep 2024 14:35:25 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 4A1F288D33 for ; Fri, 6 Sep 2024 14:35:23 +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-x32a.google.com with SMTP id 5b1f17b1804b1-42c94e59b93so16908375e9.1 for ; Fri, 06 Sep 2024 05:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626122; x=1726230922; 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=X31r2+WwWvTBRJFNZIhR9Hju6vvkRpqu0GGZrnMp3kw=; b=lUBAkIkyEbkQtlZryKcq+1r/60JY3OfiwDFJZ05AHLLhITWAMIDVbhUCHiv4MRe4zu HIpwHQKDVNa3uDmk1Lz6Nfw0iEWPjP03dAiAxW8Kkdt5UvtrKW0SZo9b6vswVe2abchq uYBSnFo75E5zSnCixmvLYDorF92rLF6jep4lMH8bSYCCHqx/hsy/d/q3qeRtjhuYcdiE 2LBbdo9o8NaHW+ZP+6BQpKj+RJcB7NwiyGimPSz2nlJd3CzrrFpNQXKkXbBgE3nX3nwl dXDe7NUewDnlEAbbYEBJngcHrHUvXu09rDjqFBVINl3mkXUlJN44HyI/OVJ+HFrbRTFT Wbbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626122; x=1726230922; 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=X31r2+WwWvTBRJFNZIhR9Hju6vvkRpqu0GGZrnMp3kw=; b=AK0Riq1pZoxitLCUGZea+8JGa+2B2yAZYPigZQ3XYNXjjJ1Ok1chFRiCbJoRD8sP2x NI8WMuAf3eEiQka/TGbwuO7dZSwDPEd4xKNnE/SPf+NHYvFYCP0AfhIOGFFxgyt5cF8y w2vyX8Qv8aINNcJ8ya0XyJUOykkRdauSln+pb8v8B6chRYvD0NuwQeyiIwWV26l4sF75 vuUbIbITDvsrFJ8NQbpk9bIFOru0hpEmePfZZjCAdECTOI0kha3sBI85thxFC2RoJiEz XNSZiOfPFgdvl/sooLASdqLKJG/2dQubeiJdH45Rh/JKkLvIfQOf3X1nsceEgPJjBz9K SQSA== X-Gm-Message-State: AOJu0Yw7VQSxRT61iTnxnKpoNxNs95MkBegbRhPQEx4Gn06BBqDoGTNV G7r/e0l56Ip2Mg5D2qCqT6V/gFaYolfcrNY+wwnqRl4noKGRVhlJvrncA2wgatU/McD2ODAPvoo 7l2ZknEKq X-Received: by 2002:a7b:cbd4:0:b0:428:e820:37dc with SMTP id 5b1f17b1804b1-42c9f49f2d3mr16437975e9.7.1725626122332; Fri, 06 Sep 2024 05:35:22 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:22 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Mattijs Korpershoek , Sumit Garg , Neil Armstrong , Marek Vasut , Caleb Connolly , Robert Marko , Sam Protsenko Subject: [PATCH v10 20/25] MAINTAINERS: net-lwip: add myself as a maintainer Date: Fri, 6 Sep 2024 14:33:36 +0200 Message-Id: <9904f9b2e4c0122c44d7327b0d8ac9dc74c8a903.1725625913.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 Add myself as a maintainer for the lwIP network stack integration code and network commands. The library code itself (i.e., most files under lib/lwip/ except README, Makefile and integration files in u-boot) is unmodified from upstream and therefore does not need a maintainer. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index daaf0345d0e..f915db0c1d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1351,6 +1351,17 @@ F: drivers/net/ F: include/net.h F: net/ +NETWORK (LWIP) +M: Jerome Forissier +S: Maintained +F: cmd/net-lwip.c +F: configs/qemu_arm64_lwip_defconfig +F: include/net-lwip.h +F: lib/lwip/Makefile +F: lib/lwip/README +F: lib/lwip/u-boot/ +F: net/lwip/ + NIOS M: Thomas Chou S: Maintained From patchwork Fri Sep 6 12:33:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825971 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp778985wrb; Fri, 6 Sep 2024 05:37:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBGn5Ba3J5wwx4UfbQs0NEImbCy5lll0c2i2Tn8gwgTxjQ/Jouc1XNdfvkueiF4ml+HHMaTA==@linaro.org X-Google-Smtp-Source: AGHT+IEBQvu8Ae2/Q7LzCbachk3E6tOet4l7BK8kr+8buJ8s5pdp5PsdS4MPoLRWySldDJCOZk/X X-Received: by 2002:a05:6402:35ca:b0:5c2:50a2:98a7 with SMTP id 4fb4d7f45d1cf-5c250a327e7mr13316019a12.4.1725626269892; Fri, 06 Sep 2024 05:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626269; cv=none; d=google.com; s=arc-20240605; b=A4vgvGQPl7K5tcLVvvz3303/6GRH9KOOZNko6qSTJ32zWMCn8AwOSGOZQznwaH6+yT jpYVmnUHNu1rTp32RXGxgmpLmlh5lWUzlM7pqbvJC1IR5WjBPNX+pFnM6q42KvLFQJJ9 gjKQAAmu6vC13blrW/isPsESIkRcZTGcORAnN8kAlgHUqaM9FMfbOmZUk4xjvZxpAAEe 8WlwWZoAodxOymcDoSq4wsLR389D+/8TPb/hEMjwigzMnoot1CyD7bPQgLC5/2tmahcD HmBWgMVc5a2XTEWaq8COJuT8EOkyrVKZWL9zWhtYD40hww3YqMVdD4sBJDUVbymTbGqS sZjA== 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=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; fh=fh3grNxHwkzrFLR1hmhMLj1tjcCtJoKghH8CFKsFGls=; b=VkCuoT1rlRHx/vsJVXrXjO2+k/QlhQtx227ojzqJBn8yXZzKkN8W5NzZBVRWgI0GCg qgo/sDr2X8M0txURbZSZgnbjfpPJQ7b3oEFCKfvcQXiYj9IMsjI4f08B8MdMsv+JuB+F XDWhDhwmR9nSJrLNSFmmzcq3o0zqzmgJJuUFC0RGEhzkSeL64qZuIUQTlNWUg5SCrh1Y akrI9tNnu3x88Uk54x9XYtb1F4l/A6TBli7YlIu12IRsQrQ2JFITT9HgzVNgih/tqmJ0 ToJgPeMPAp6AhWZtJpLRow+XuC24J390n7B3OI/LTk3fKeTVo55X0PL9+JYQtYJFe7bk 3VPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZoDwgqZV; 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; dara=neutral header.i=@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 4fb4d7f45d1cf-5c3cc6b6e22si3042471a12.607.2024.09.06.05.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:37:49 -0700 (PDT) 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=ZoDwgqZV; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9202D88D04; Fri, 6 Sep 2024 14:35:29 +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="ZoDwgqZV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6D00C88D10; Fri, 6 Sep 2024 14:35:28 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 56F8388D45 for ; Fri, 6 Sep 2024 14:35:24 +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-wr1-x432.google.com with SMTP id ffacd0b85a97d-374ca7a10d4so1257985f8f.3 for ; Fri, 06 Sep 2024 05:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626123; x=1726230923; 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=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; b=ZoDwgqZVNo70MB6tB+j6BY+Q6i6ZOmGgTsK+g5CtqdHGUN/cX38/lGco2nszEYlqJ+ QGLYiPxeM/YttlnkL+gfNXQXwFcxzXy8P9t4UxfKrmQ7aJ8caQQLWrmuUzIPKj6pL3LU blfIdWR/M06CJRUZrGjBNiKQLQd0nSGcqsDPArCUviVUlcp0WcBirUDpZPpy+J8Wkkrt 0vt6zxbccqHeKCgNB1MyVKWgXHnZM7IgAQfPTMnWwr6zuD8a5HIqzWNbe1FkzegevkQE mEMszqtd2AePSUUX7SxbWW/bLgWe5zrQ2LSByLALcSWiXzxNympOuJ+p6J8pTEw9hryy t1Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626123; x=1726230923; 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=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; b=Sa5bh+45fm9YisuryUS8anAs1rPi/3W2BA3mmBjvRt9Bl65jaXk3lG2kJM463oEHvv FWO1BegbkS+TKhgHCHTHcxddTCPBf5ayZk/9GjkAbuiM9BfNSTScytYmFHP0FRDMZHGi KZzK2SmA5sr4oUggAwHucvATKOrEnc3oGTaQNwv/waGNhnzk0ThA74MBOZETs/UBJNP+ XNiKrlVT+F1eAvMDIIIDm0AkoBPHYz74ccmGWdgG3aChB9hqsGVnn7h1vsD1EQ8Dsknf WdMm0a2+SDo+RcH1wTzyqa6lO+uR/6C2LpOYLqW8pn+iWlLlv82WmkiieoYqTsUVgrqC HHyQ== X-Gm-Message-State: AOJu0Yzt5SXIEL5m779JxtOuWm0UKbmbK+QG102hL7zLrgnVztZhCcKk 9iov8E8gfRX82vW9G6oe5rnSQ+J2yx/dZWmiw8f2aFAs9ra0Uo44m+0iY6DKp30mu1uYtOmydiQ mgAaTjVeQ X-Received: by 2002:adf:a155:0:b0:374:cb17:c62f with SMTP id ffacd0b85a97d-374cb17c6b4mr11172386f8f.11.1725626123543; Fri, 06 Sep 2024 05:35:23 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:23 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Lukasz Majewski , Mattijs Korpershoek , Tom Rini , Marek Vasut , Jaehoon Chung , Heinrich Schuchardt , Jonas Karlman , Miquel Raynal Subject: [PATCH v10 21/25] Kconfig: fix undefined symbols (g_dnl*) when NET_LWIP is default enabled Date: Fri, 6 Sep 2024 14:33:37 +0200 Message-Id: <9462e25d33d93c670a882e6ee329ca7e6668d7ab.1725625913.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 Fix for link errors on am62px_evm_a53and other platforms when NET_LWIP is enabled: common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach [...] common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget' - DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach() which is implemented in drivers/usb/gadget/g_dnl.c which needs USB_GADGET_DOWNLOAD - SPL_DFU compiles common/spl/spl_dfu.c which calls run_usb_dnl_gadget() which is implemented in common/dfu.c which needs DFU_OVER_USB Therefore add these dependencies to Kconfig. Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini --- drivers/dfu/Kconfig | 1 + drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index d034b501360..7de629f103a 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -8,6 +8,7 @@ config DFU_OVER_USB bool select HASH depends on USB_GADGET + depends on USB_GADGET_DOWNLOAD config DFU_OVER_TFTP bool diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 03fe3bca197..ce9364c3172 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -324,6 +324,7 @@ config SPL_DFU select SPL_HASH select SPL_DFU_NO_RESET depends on SPL_RAM_SUPPORT + depends on DFU_OVER_USB help This feature enables the DFU (Device Firmware Upgrade) in SPL with RAM memory device support. The ROM code will load and execute From patchwork Fri Sep 6 12:33:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825972 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp779054wrb; Fri, 6 Sep 2024 05:38:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcorzGm/Sqo+3+jumYuPqNYLnAxaHZz250qZfsNObYVts5C6ins1PUAWdxLyif8oYorBvgVA==@linaro.org X-Google-Smtp-Source: AGHT+IFUMKJlC5hdeZNWn9DsEuYD+r9a6+Ih2rjvffjS430ls0rSDlNIE/yoNdoVLttguDsW1NvG X-Received: by 2002:a17:907:9307:b0:a86:80b7:4743 with SMTP id a640c23a62f3a-a8a885ff1bfmr192672266b.24.1725626280476; Fri, 06 Sep 2024 05:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626280; cv=none; d=google.com; s=arc-20240605; b=eDbuENk7Yrts5Rpx+KTQmlC+3Eky4Ca17k0RSGCP4S6CFxXyLKw0PVm1Z641Toq4PT TYX277jFJ09GhlH8wd/PNiDRCX72YaoHxcaLXkRMX8U70Flo4BepwrKx3Vx30wzJzR5L bNlnKPPaYSD/P60uKGFcR2Ii7Y9fS7RUMJGuIlSI0fU85wkQ4fHFtJZ5s4ucEsZgjST2 1Itz1xhfAKfR2C5e911GXNMsxqEYygChIQkLibSnr4RrbmMwVus0EiJCbJweTSFnXvaU hFb4HGOz6hm4RJGR/QACYYP947Yjh9nE2eSifKbBNIgjnW085wVGwXt/WbrfZL5dy4xn FbCw== 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=MktPFMTO7Kpc7/pKSJ53v9OJ+XoE2+jn+aez6r7cU7Q=; fh=jsFXu3iLijXIN2uYmlfqKS6I1KzGXFCz88a7kH8+wjU=; b=UCmFG/cwTZOEFR1wTxLksK4+elyB6eyDxM3Izl27Jz/2PIV1wehFHgO/ym1Eu7km9I NcE3MnZlBG5QoY3J1O5+lyYVikiFp8JYYB9glig3GVigRz+pfOk4f918R0TfKubnaE11 GWKAoR8dLUTOIGTQ1l4Tfa04+Ud305hAGL1b6eDCMLh5wKFOWNWhMBMQ8qwnDbcq4I7y 19hkQEWvrasYNhOQZ7v343WHs8bbBZX2bHRy/Bk9Z3ZYxYafFM7njYIQ0jMiqSteJDa6 +H2JzEusvRC1j6blNT6+AJWQiGOrilFhqolKa6gYwgR/NeSNJ3y2EUmt+LmWzxarUBF2 aBLg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KMWJm62D; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a6a60881fsi254321166b.784.2024.09.06.05.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:38:00 -0700 (PDT) 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=KMWJm62D; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EBE0488D34; Fri, 6 Sep 2024 14:35:29 +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="KMWJm62D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A08C88D01; Fri, 6 Sep 2024 14:35:29 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 A50A088D4E for ; Fri, 6 Sep 2024 14:35:25 +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-x330.google.com with SMTP id 5b1f17b1804b1-42bbd0a40faso17101305e9.1 for ; Fri, 06 Sep 2024 05:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626125; x=1726230925; 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=MktPFMTO7Kpc7/pKSJ53v9OJ+XoE2+jn+aez6r7cU7Q=; b=KMWJm62D4bC4FT+z2BZBPA8gMhZItt82TCibNPWJ2u+wPVL5IZy7fWBeJXQSiSCChh 36u7LGUeLY4Q6bLvAI1FORjpV9QyDk6nVeMoCE51oXDQhor8Go6ymjb+MC0YMbY/8JsG boACg2p33i+vLlkxLh+HlFuCS4yflppw1koDiWQJeShXpvdB6F53xCj63/xC+eV7QOpI 8a6XrCVPZE3ndiGMXlhN+zhBHLseqmRDeACWThY/JXB7R5yn3OOrncRQg43nuivnMqVr Cg4097r+DLCMFIuUcFvNPCYLVIyk8B36yaB4eX0sJkrFlfNEKSDpYc940vWsqTKGES95 Tdmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626125; x=1726230925; 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=MktPFMTO7Kpc7/pKSJ53v9OJ+XoE2+jn+aez6r7cU7Q=; b=DjXLteks5TSprEiz8oEb/h+x0n1frGptapjErS7GKoqXmHFUPfUUhphfxAltQpJ2ML i5hTzxQ4iVrbwSNAFCsk8218YR5PbtjLHP1QrwX9jAXHz5RwzGqLp1OjAWsX/STsd93h KlC7W8C2pjzJVjQr3/TdsfzZPDoePPqgoducfnadiAUQd9DSwVn2ifgbmUIIQHY01PgX TPaeDdJcvtb7V5FT1fUzSm5D5EpmnCFprQ7GXsFnPU9Mfe9svJ9l74YehJDoWJLsIWUY vE5/podDzTdSeFG46+Q2mS3z6H7vhfrSf82Vn+lH6tQiQ7q5HPzXhFMEOpqQzL5QqhBN Hd4g== X-Gm-Message-State: AOJu0YwN4j8WRdFCeh9XemNXmPG2BGa16BzDeR9zYtRTXkLHw9NuRIwh ZXchafV8C2qiXjR9gE8/Le+eSgaU6DFTcSnz1bIRQtar5N+pUJFqwJoQkzLRNm+5B3DL4Px2d3P +m9EdnuGh X-Received: by 2002:a05:600c:3ba6:b0:428:e09d:3c with SMTP id 5b1f17b1804b1-42c9f9e19demr15756455e9.33.1725626124693; Fri, 06 Sep 2024 05:35:24 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:24 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass Subject: [PATCH v10 22/25] configs: use syntax CONFIG_FOO=n in tools-only_defconfig Date: Fri, 6 Sep 2024 14:33:38 +0200 Message-Id: <38745fe0314a9acb00394425f7ab37db7ac5fc2e.1725625913.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 The tools-only defconfig causes troubles on MacOSX due to the default C compiler being Clang (LLVM) rather than GCC and more specifically due to [1]. Therefore replace "# CONFIG_FOO is not set" with the equivalent "CONFIG_FOO=n" using the following command: $ sed -i -e 's/# \(CONFIG_[^ ]*\) is not set/\1=n/' \ configs/tools-only_defconfig This fixes the tools_only_macOS CI job on GitHub [2]. [1] https://github.com/llvm/llvm-project/issues/78778 [2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9105&view=results Suggested-by: Tom Rini Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini --- configs/tools-only_defconfig | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index e00f2c48598..7511e30d709 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -4,26 +4,26 @@ CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_SYS_LOAD_ADDR=0x0 CONFIG_PCI=y -# CONFIG_SANDBOX_SDL is not set +CONFIG_SANDBOX_SDL=n CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_TIMESTAMP=y CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y -# CONFIG_BOOTSTD_FULL is not set -# CONFIG_BOOTMETH_CROS is not set -# CONFIG_BOOTMETH_VBE is not set +CONFIG_BOOTSTD_FULL=n +CONFIG_BOOTMETH_CROS=n +CONFIG_BOOTMETH_VBE=n CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run distro_bootcmd" -# CONFIG_CMD_BOOTD is not set -# CONFIG_CMD_BOOTM is not set -# CONFIG_CMD_BOOTI is not set -# CONFIG_CMD_ELF is not set -# CONFIG_CMD_EXTENSION is not set -# CONFIG_CMD_DATE is not set +CONFIG_CMD_BOOTD=n +CONFIG_CMD_BOOTM=n +CONFIG_CMD_BOOTI=n +CONFIG_CMD_ELF=n +CONFIG_CMD_EXTENSION=n +CONFIG_CMD_DATE=n CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NO_NET=y -# CONFIG_ACPIGEN is not set +CONFIG_ACPIGEN=n CONFIG_AXI=y CONFIG_AXI_SANDBOX=y CONFIG_SANDBOX_GPIO=y @@ -32,9 +32,9 @@ CONFIG_DM_RTC=y CONFIG_SOUND=y CONFIG_SYSRESET=y CONFIG_TIMER=y -# CONFIG_VIRTIO_MMIO is not set -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_SANDBOX is not set -# CONFIG_GENERATE_ACPI_TABLE is not set -# CONFIG_EFI_LOADER is not set +CONFIG_VIRTIO_MMIO=n +CONFIG_VIRTIO_PCI=n +CONFIG_VIRTIO_SANDBOX=n +CONFIG_GENERATE_ACPI_TABLE=n +CONFIG_EFI_LOADER=n CONFIG_TOOLS_MKEFICAPSULE=y From patchwork Fri Sep 6 12:33:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825973 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp779121wrb; Fri, 6 Sep 2024 05:38:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7/MuXAPZkv3ePENhmowzuqv3p8vVb2z0cA8rRK2jLP/tvm2AIF5l2i8i3YyoAuDD/pJvumw==@linaro.org X-Google-Smtp-Source: AGHT+IEbTFFEbt8uHtE513/tyx0USPqBHMaJfbyEBTiO4yAYvuMIkVlGTwG6ReDyVDo45FSdE4UP X-Received: by 2002:a05:6402:2686:b0:5c2:5620:f72 with SMTP id 4fb4d7f45d1cf-5c3dc61afbfmr1940642a12.0.1725626293005; Fri, 06 Sep 2024 05:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626292; cv=none; d=google.com; s=arc-20240605; b=aM+eSdgc3kRe4+kvM/5RM7pQMmbNOaVeFNnbEG52kY45JYuQNDuXwjNBaqocbFtzGB w2q2J4x5may1AEHtr+X50IMzC8iA4M59MW9Q44OVtI2HOz6jB5GRPCFJtJC+2xwJ81mx luCBXa/DE2iL+RF8kapEneGcfeUyBFAQybENn/IRqGydfOPVs9GeFxRhXlf5EsAs3qj3 jRJ+sNqEDgAza9juME9y+T854wuteqmHuGxiMhpEFSTYKy1Mp2CEzrYFuz7CoV7AlbIP jbTXVJhUrgcBUsm47u+SVX2g02IthyF1LnAhl2kTRbd/F1g70EXuhT3ulaTc7wOTHtwv qObA== 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=7RhZvZ3tdk5Mh8Ow/UvFZRPsh9uBCSvtkeaZiSHafRM=; fh=nLctY+piC3brlioq4edsEUEEvenyLuk7uWE+vv4aaas=; b=QjsO8B+kuTw4buqG2rK3p4TtE33O+zrtWKuniMw49IEjgy0r6jeNNZ6VOUaKmtU1SC OKwhzz04dakWJB1dne+lDN/nziZ6rSsxQIwR3RwmqI14tq0ZiaFprOKzQnq/KzyDaMMg CLsGucKK5oNqJDPltbYH+jfctDm40ISQbs5K7V0OKFSrvxXnoRqv+0vOR8npG/2YqX9d /BUdrVPXJIpRAZOFVcOl3fVKEN0FwMI9WDlXYAFVbdML7G7teRnLpvPQ95agRIHCaq18 oBLhyA34GAvys0LmAGX0U4vXoG5Cq5xI3TAlcJjOy8rvqzuer7wOV9MhZuOPgJsUBO2u N27g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RbAvXJ6M; 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 4fb4d7f45d1cf-5c3cc54e6a0si3157223a12.156.2024.09.06.05.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:38:12 -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=RbAvXJ6M; 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 4AB4988D33; Fri, 6 Sep 2024 14:35:32 +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="RbAvXJ6M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58FF288D10; Fri, 6 Sep 2024 14:35:29 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 91EC188D39 for ; Fri, 6 Sep 2024 14:35:26 +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-x332.google.com with SMTP id 5b1f17b1804b1-42bb7298bdeso20709525e9.1 for ; Fri, 06 Sep 2024 05:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626126; x=1726230926; 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=7RhZvZ3tdk5Mh8Ow/UvFZRPsh9uBCSvtkeaZiSHafRM=; b=RbAvXJ6M3stKutu9e97vDc5eCTK4c8xSNITvahb55dqdct1J9eigxx5/q70GDr/+0D aiYEL0CeQykGmEj4ENrSSkm3CG0OIDRT7RTko3K6sEj1jSbff/LQizbx0PQJ56li8uHP W9rNa5rjoR+11Hhk8i7VpwflIIBq8YrqfhPzIvabykKDDcNEHUwjDydH1NDl0BkDXCpL kKrTFL4YFJXUDc5JJ7+LY6XAmE6SeJljf8iCMAsPNqDEefz5Skw8AnvubE9p7n0X1ldy ZJzu1yaPlCJ+aoc/NtOQaqBWK1zMw0mkHhBBqcrPGNTVCp37DDqFBW+fI2a2BzPXTLhI O1GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626126; x=1726230926; 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=7RhZvZ3tdk5Mh8Ow/UvFZRPsh9uBCSvtkeaZiSHafRM=; b=A8zmUfR91tJfMWVgONVopf6k9UxnChatBHby8LgSp0BLLSfV4M5o6+cDCyW8qpUPgh aLdt4TxXJynUqzipiT9KoOCCw/tYNZNNtgBuNzv26HKp26Ue7YDMOkdwk8HMZdKf0bb2 Bgoutlv4A9j2717E3XT0gtChlDHEb+WavATatOfZwbFbYvGkU+dxV825pI49l4e11Mm+ fccO9oPEJA5lTzExSTQHqf5rDMN4aKIi6iGqasI6fMG8IVwifS60dtJ76+HCHQX7jXlJ z+a+68HT8JRSrnEQYrRrasRRrPPr7BBzMBWMYlByhF9LWzF5Znm3tLTUvIeO3WYSYoiC 82Kg== X-Gm-Message-State: AOJu0YzinxhlRjMMtp0sI2AVCKVB3bRDI8TXGxV8ySgicothAQf9N0oA vlNdlrjk8PrIZWwe1Dw/cfZHp3+9phcLf1aqX7bh22u4cO664Afbj4SMairxlJMnFfepj7Vt8jj f6yggKiQ9 X-Received: by 2002:a05:600c:3b21:b0:426:6714:5415 with SMTP id 5b1f17b1804b1-42c9fa0b26cmr19825765e9.30.1725626125753; Fri, 06 Sep 2024 05:35:25 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:25 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Chia-Wei Wang , Maxim Sloyko , Tom Rini Subject: [PATCH v10 23/25] [TESTING] configs: set CONFIG_NET=y for FTGMAC100 Date: Fri, 6 Sep 2024 14:33:39 +0200 Message-Id: <899c2f112327af9fc697113e07dd7aeeb8c1f4c4.1725625913.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 FTGMAC100 is not compatible with NET_LWIP which was enabled as the default stack in a previous commit. So enable NET in the defconfig. Signed-off-by: Jerome Forissier Reviewed-by: Chia-Wei Wang --- configs/evb-ast2500_defconfig | 1 + configs/evb-ast2600_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/evb-ast2500_defconfig b/configs/evb-ast2500_defconfig index 6685f37e3f5..d20ccf16797 100644 --- a/configs/evb-ast2500_defconfig +++ b/configs/evb-ast2500_defconfig @@ -35,6 +35,7 @@ CONFIG_CMD_NCSI=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_REGMAP=y CONFIG_CLK=y diff --git a/configs/evb-ast2600_defconfig b/configs/evb-ast2600_defconfig index e6a4e4d1b7c..47faf05a242 100644 --- a/configs/evb-ast2600_defconfig +++ b/configs/evb-ast2600_defconfig @@ -78,6 +78,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SECT_SIZE_AUTO=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y From patchwork Fri Sep 6 12:33:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825987 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp809344wrb; Fri, 6 Sep 2024 06:42:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVs/OHgDlhAlDnE6cP4WN1af795ST9Tc4BcN5H/0NaWXPQO6XTJVGANNmGzqwAn1Ul9bf07hg==@linaro.org X-Google-Smtp-Source: AGHT+IFLWpwjvxQtXeqE8FLlffubQVYDCNeF3iUPpd6Ws3Sp5n6nE9oORS/TjBtmkBRwztk4Ei01 X-Received: by 2002:a2e:bc10:0:b0:2f7:4e61:38b4 with SMTP id 38308e7fff4ca-2f74e613a55mr43675321fa.5.1725630122340; Fri, 06 Sep 2024 06:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725630122; cv=none; d=google.com; s=arc-20240605; b=aqM4PvMX+F201jMWe5+tvQ5SO1FTSXi/Arp33kZDofs2DPrPJsBTVXowUPGeEWTlQb DQkQYS2nudHHJE91mx0d0Gr30n5+oQ467rhFeiTIfYdEN34tFGLj8Pc9m5Bq4CJc2afJ UojHNf8nBBbBuGJy5tNpzNMpA8CoiYceIVCRHKJDbkseh11qODSfDFJ3oz/ur/vtlIG4 xcbXgavA+A7JWB6JTlIrEXpjywL0R6bxJhtUm73pUUvfarPBiDLn0uZTIUvo6V9pxmU1 /NzCOTkYHUOEnXD2YuuGRhKgCGMl3HVjhz+ICvImvfQ9rVKI2C2MVus3KmJ6b/KuvTjk tyPQ== 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=4GEuAyOK2LOUsojnIaTjq4wghylfQYiixiwaPjThXl0=; fh=WIklySvQGcTbl0InsSl8j52skUSJtSbRHwJ008yBp9E=; b=F+TPv038LnC1De+vqQGLp6aBnBnl04VwZuyOwvbWGC9xOTS92Ttwb2RzAUcT64jj11 3xmpuzcX/8EMJZHfrPYneI0rjA5XCTJ/QEnNwYAPCbjfNcEyxNi2JXzWELr575SxxCCF 8FQAtFv2JY/nyX1TPBgCzMundFsm6Ltq2rn76j/nlc7QHcYRw4pY4X3YAd1HIFJ+NGST HL2pn1et+JRjMP6ywxKV9+GolBIbpkzV/VRaQXqNbFoKY0eDoAjD136WGvKHkHPTCpXC MTWwWJRvoklc1ty70lREuH0Go10Gt2Aiy8sCWFfaHnWMlqS5OAsHxsN4CpdU6tui4tQh BdUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PSmf4tVV; 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; dara=neutral header.i=@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 a640c23a62f3a-a8a7a0e4094si202352466b.746.2024.09.06.06.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 06:42:02 -0700 (PDT) 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=PSmf4tVV; 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; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35C2288D10; Fri, 6 Sep 2024 15:41: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=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="PSmf4tVV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0218888D55; Fri, 6 Sep 2024 14:35:46 +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, T_SCC_BODY_TEXT_LINE 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 AC4C588CD8 for ; Fri, 6 Sep 2024 14:35:40 +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-42c7bc97423so20770915e9.0 for ; Fri, 06 Sep 2024 05:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626140; x=1726230940; 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=4GEuAyOK2LOUsojnIaTjq4wghylfQYiixiwaPjThXl0=; b=PSmf4tVVzCJlM+TjXeSTGdcwXKJM/kDOrJ/4mEpcd1C8q4Vq69GvyzTt/MpHGFScgb HEFKAWyNg/AlYo2eValKoeNrabHwKZBMN8FnEB8jctM6AcgS5bWblxpL0CWtRTUOi3NZ 94iyqklcvaxRTbBueRGylLg4wy4aD/6X4NSzI//o18Fg3QsuO51OXjp3FzVM/ymKtYGj p0sLO5ngHFwi9r61pm8J1kCSCvBUUC20G1dV84J4ejLS958U7Iv9IERw9f67E5H0oceC kgL3fQBECw3Wmo/rkSHcXP4DeiWAz8q+guRuyb8jnV5r3+UpqiHAlrNqS5IjIdrcbKV9 Th5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626140; x=1726230940; 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=4GEuAyOK2LOUsojnIaTjq4wghylfQYiixiwaPjThXl0=; b=Byzi1idtjs3VBI88bQqaYWRm+PNgLwHuQI4La7glTVwYMVG5/SZSBfw+ax5oLPeLh/ RwFZr6hVDUNMm/JsSm+463cU5VrzyXKXGQWwKJlKSPDRJLSktH/X3f3u347lXUz7RRNo P537BKPGu2UWWkRKAdbiejbBlPoA2pBofw4vxOUxNVyNx/57WIYpPuNuOgf/dVKMpgSH sWp43WzCv6oyOaeNc0SukSw3AiVB7y5/pCAqHBN7aCfsmabjoOLWgP6jYgoqtW5kilZ9 Or3TPCLLHOHskDZ1VMXb0yYR3oUmU6MSIgJDZxqgTBUVp44qI1/2/iU0Rb3YZ++HG+2m be/A== X-Gm-Message-State: AOJu0Yzz+97USRXYPSnUJW9wWTRZ8a7F73SmTDSlYHlwENrq1SfkhEqB N6wzqRTMSNFFTGxjh/PkZZbek5Fp33SPkPi/5PJ8qCBzSpsrbmEovbxdWTTfGfK95c9Rj4NH+N2 jEr2jnmIi X-Received: by 2002:a05:600c:35ce:b0:425:81bd:e5ee with SMTP id 5b1f17b1804b1-42c9f98b2ddmr23579835e9.16.1725626139624; Fri, 06 Sep 2024 05:35:39 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:39 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Neil Armstrong , Tom Rini , "Andrew F. Davis" , Krzysztof Kozlowski , Christian Hewitt , Stefan Roese , Dennis Gilmore , Hugo Villeneuve , Viacheslav Bocharov , Frieder Schrempf , Heiko Thiery , Michael Walle , =?utf-8?q?Eric_B=C3=A9nard?= , Kostya Porotchkin , Luka Kovacic , Luka Perkov , Patrick Bruenn , Baruch Siach , Fabio Estevam , Adrian Alonso , Parthiban Nallathambi , Beniamino Galvani , Marek Vasut , Jaehoon Chung , Lukasz Majewski , Martyn Welch , Richard Hu , Otavio Salvador , Navin Sankar Velliangiri , Simon Glass , Mathew McBride , =?utf-8?q?Marek_Beh=C3=BAn?= , Linus Walleij , Liviu Dudau , Peter Hoyes , Josef Holzmayr , Alexey Romanov , Igor Prusov , Sean Anderson , Paul Kocialkowski , Marcel Ziswiler , Svyatoslav Ryhel , Sumit Garg , Josua Mayer , Quentin Schulz , Anatolij Gustschin , Mattijs Korpershoek , Benjamin Hahn , =?utf-8?q?Marek_Moj=C3=ADk?= , "Ole P. Orhagen" , Patryk Biel , Kristian Amlie Subject: [PATCH v10 24/25] [TESTING] configs: set CONFIG_NET=y when PXE is enabled Date: Fri, 6 Sep 2024 14:33:40 +0200 Message-Id: <8c743ef6c6a9b3dac33df7d777c19a586fca65d0.1725625913.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2024 15:41:12 +0200 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 Many platforms won't build when NET_LWIP is the default choice in Kconfig: include/config_distro_bootcmd.h:443:9: error: expected '}' before 'BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE' [...] Set the legacy stack (CONFIG_NET=y) for these platforms. Signed-off-by: Jerome Forissier --- configs/ad401_defconfig | 1 + configs/am43xx_evm_defconfig | 1 + configs/am43xx_evm_qspiboot_defconfig | 1 + configs/am43xx_evm_rtconly_defconfig | 1 + configs/am43xx_evm_usbhost_boot_defconfig | 1 + configs/am43xx_hs_evm_defconfig | 1 + configs/am43xx_hs_evm_qspi_defconfig | 1 + configs/am57xx_evm_defconfig | 1 + configs/am57xx_hs_evm_defconfig | 1 + configs/am57xx_hs_evm_usb_defconfig | 1 + configs/arndale_defconfig | 1 + configs/bananapi-cm4-cm4io_defconfig | 1 + configs/bananapi-m2-pro_defconfig | 1 + configs/bananapi-m2s_defconfig | 1 + configs/bananapi-m5_defconfig | 1 + configs/beelink-gsking-x_defconfig | 1 + configs/beelink-gt1-ultimate_defconfig | 1 + configs/beelink-gtking_defconfig | 1 + configs/beelink-gtkingpro_defconfig | 1 + configs/clearfog_defconfig | 1 + configs/clearfog_gt_8k_defconfig | 1 + configs/clearfog_sata_defconfig | 1 + configs/clearfog_spi_defconfig | 1 + configs/dra7xx_evm_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 1 + configs/dra7xx_hs_evm_usb_defconfig | 1 + configs/helios4_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/jethub_j100_defconfig | 1 + configs/jethub_j80_defconfig | 1 + configs/khadas-vim2_defconfig | 1 + configs/khadas-vim3_defconfig | 1 + configs/khadas-vim3l_defconfig | 1 + configs/khadas-vim_defconfig | 1 + configs/kontron-sl-mx6ul_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/libretech-ac_defconfig | 1 + configs/libretech-cc_defconfig | 1 + configs/libretech-cc_v2_defconfig | 1 + configs/libretech-s905d-pc_defconfig | 1 + configs/libretech-s912-pc_defconfig | 1 + configs/marsboard_defconfig | 1 + configs/mvebu_crb_cn9130_defconfig | 1 + configs/mvebu_db_armada8k_defconfig | 1 + configs/mvebu_db_cn9130_defconfig | 1 + configs/mvebu_mcbin-88f8040_defconfig | 1 + configs/mvebu_puzzle-m801-88f8040_defconfig | 1 + configs/mx53cx9020_defconfig | 1 + configs/mx6cuboxi_defconfig | 1 + configs/mx7dsabresd_defconfig | 1 + configs/mx7dsabresd_qspi_defconfig | 1 + configs/myir_mys_6ulx_defconfig | 1 + configs/nanopi-k2_defconfig | 1 + configs/novena_defconfig | 1 + configs/odroid-c2_defconfig | 1 + configs/odroid-c4_defconfig | 1 + configs/odroid-go-ultra_defconfig | 1 + configs/odroid-hc4_defconfig | 1 + configs/odroid-n2_defconfig | 1 + configs/odroid-n2l_defconfig | 1 + configs/odroid-xu3_defconfig | 1 + configs/p200_defconfig | 1 + configs/p201_defconfig | 1 + configs/p212_defconfig | 1 + configs/peach-pi_defconfig | 1 + configs/peach-pit_defconfig | 1 + configs/phycore_pcl063_defconfig | 1 + configs/pico-dwarf-imx6ul_defconfig | 1 + configs/pico-dwarf-imx7d_defconfig | 1 + configs/pico-hobbit-imx6ul_defconfig | 1 + configs/pico-hobbit-imx7d_defconfig | 1 + configs/pico-imx6ul_defconfig | 1 + configs/pico-imx7d_bl33_defconfig | 1 + configs/pico-imx7d_defconfig | 1 + configs/pico-nymph-imx7d_defconfig | 1 + configs/pico-pi-imx6ul_defconfig | 1 + configs/pico-pi-imx7d_defconfig | 1 + configs/radxa-zero2_defconfig | 1 + configs/radxa-zero_defconfig | 1 + configs/riotboard_defconfig | 1 + configs/s400_defconfig | 1 + configs/seeed_npi_imx6ull_defconfig | 1 + configs/smdk5250_defconfig | 1 + configs/smdk5420_defconfig | 1 + configs/snow_defconfig | 1 + configs/spring_defconfig | 1 + configs/ten64_tfa_defconfig | 1 + configs/turris_mox_defconfig | 1 + configs/turris_omnia_defconfig | 1 + configs/u200_defconfig | 1 + configs/vexpress_aemv8a_juno_defconfig | 1 + configs/vexpress_aemv8a_semi_defconfig | 1 + configs/vexpress_aemv8r_defconfig | 1 + configs/vexpress_ca9x4_defconfig | 1 + configs/vexpress_fvp_defconfig | 1 + configs/videostrong-kii-pro_defconfig | 1 + configs/wandboard_defconfig | 1 + configs/wetek-core2_defconfig | 1 + configs/wetek-hub_defconfig | 1 + configs/wetek-play2_defconfig | 1 + 102 files changed, 102 insertions(+) diff --git a/configs/ad401_defconfig b/configs/ad401_defconfig index b44b9c63e83..9502523b447 100644 --- a/configs/ad401_defconfig +++ b/configs/ad401_defconfig @@ -56,3 +56,4 @@ CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_GADGET=y CONFIG_WDT=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index 0fc4c0f269a..3d478615734 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -106,3 +106,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_ETHER=y CONFIG_SPL_USB_ETHER=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index c538c1ae352..fec1e57db42 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -68,3 +68,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig index 0fe5479757b..6e42869ffc0 100644 --- a/configs/am43xx_evm_rtconly_defconfig +++ b/configs/am43xx_evm_rtconly_defconfig @@ -85,3 +85,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index c4693bc9824..0d0791b3dfa 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -106,3 +106,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index 980ef13f104..4be7c6fbef2 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -103,3 +103,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_ETHER=y CONFIG_SPL_USB_ETHER=y +CONFIG_NET=y diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig index 75725e179d7..4ca30fd07ff 100644 --- a/configs/am43xx_hs_evm_qspi_defconfig +++ b/configs/am43xx_hs_evm_qspi_defconfig @@ -69,3 +69,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 587af53acb6..282979769bb 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -120,3 +120,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index b790897645f..eb45b0d75ee 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -116,3 +116,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig index 450751b354f..de63ff515e1 100644 --- a/configs/am57xx_hs_evm_usb_defconfig +++ b/configs/am57xx_hs_evm_usb_defconfig @@ -117,3 +117,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/arndale_defconfig b/configs/arndale_defconfig index b664ad58773..9a8439a24df 100644 --- a/configs/arndale_defconfig +++ b/configs/arndale_defconfig @@ -57,3 +57,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y +CONFIG_NET=y diff --git a/configs/bananapi-cm4-cm4io_defconfig b/configs/bananapi-cm4-cm4io_defconfig index cb78dabc13a..a2baec987b6 100644 --- a/configs/bananapi-cm4-cm4io_defconfig +++ b/configs/bananapi-cm4-cm4io_defconfig @@ -88,3 +88,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m2-pro_defconfig b/configs/bananapi-m2-pro_defconfig index 196bc4077d6..fad40f49fdc 100644 --- a/configs/bananapi-m2-pro_defconfig +++ b/configs/bananapi-m2-pro_defconfig @@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m2s_defconfig b/configs/bananapi-m2s_defconfig index 7b137d5e1c4..d3e2bb9aeac 100644 --- a/configs/bananapi-m2s_defconfig +++ b/configs/bananapi-m2s_defconfig @@ -86,3 +86,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m5_defconfig b/configs/bananapi-m5_defconfig index 99ed7c9669a..0505283a061 100644 --- a/configs/bananapi-m5_defconfig +++ b/configs/bananapi-m5_defconfig @@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/beelink-gsking-x_defconfig b/configs/beelink-gsking-x_defconfig index c1e60ede4a0..28e13a155b3 100644 --- a/configs/beelink-gsking-x_defconfig +++ b/configs/beelink-gsking-x_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/beelink-gt1-ultimate_defconfig b/configs/beelink-gt1-ultimate_defconfig index 0e30e13c823..73a843f9e5a 100644 --- a/configs/beelink-gt1-ultimate_defconfig +++ b/configs/beelink-gt1-ultimate_defconfig @@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/beelink-gtking_defconfig b/configs/beelink-gtking_defconfig index 0b644f0e349..281f6ae496b 100644 --- a/configs/beelink-gtking_defconfig +++ b/configs/beelink-gtking_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/beelink-gtkingpro_defconfig b/configs/beelink-gtkingpro_defconfig index a694617a968..93ac53fb1dc 100644 --- a/configs/beelink-gtkingpro_defconfig +++ b/configs/beelink-gtkingpro_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 62dbf2aa48f..bd21d3e0f02 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/clearfog_gt_8k_defconfig b/configs/clearfog_gt_8k_defconfig index df7e04a75bb..5e1292dc7e7 100644 --- a/configs/clearfog_gt_8k_defconfig +++ b/configs/clearfog_gt_8k_defconfig @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_sata_defconfig index 41382f995d3..16d052223b3 100644 --- a/configs/clearfog_sata_defconfig +++ b/configs/clearfog_sata_defconfig @@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/clearfog_spi_defconfig b/configs/clearfog_spi_defconfig index f345b12e6c7..820f3575316 100644 --- a/configs/clearfog_spi_defconfig +++ b/configs/clearfog_spi_defconfig @@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 6264d9fa7ad..b6bca2ad99c 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -144,3 +144,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 4e7929718fd..0fedb21a362 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -138,3 +138,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig index 68d342b277c..528a4fcec24 100644 --- a/configs/dra7xx_hs_evm_usb_defconfig +++ b/configs/dra7xx_hs_evm_usb_defconfig @@ -125,3 +125,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 29b6230e901..1a2166d3778 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/imx8mn_var_som_defconfig b/configs/imx8mn_var_som_defconfig index 0155cb2044e..d8aea3b474c 100644 --- a/configs/imx8mn_var_som_defconfig +++ b/configs/imx8mn_var_som_defconfig @@ -114,3 +114,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/jethub_j100_defconfig b/configs/jethub_j100_defconfig index 9de6b4b44d9..805223551a3 100644 --- a/configs/jethub_j100_defconfig +++ b/configs/jethub_j100_defconfig @@ -73,3 +73,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_RANDOM_UUID=y +CONFIG_NET=y diff --git a/configs/jethub_j80_defconfig b/configs/jethub_j80_defconfig index 85306872f9a..c22d81a755b 100644 --- a/configs/jethub_j80_defconfig +++ b/configs/jethub_j80_defconfig @@ -77,3 +77,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_RANDOM_UUID=y +CONFIG_NET=y diff --git a/configs/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig index 50f8b306505..5eb7106b674 100644 --- a/configs/khadas-vim2_defconfig +++ b/configs/khadas-vim2_defconfig @@ -77,3 +77,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 32579b8ac36..d0f03dad0a8 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/khadas-vim3l_defconfig b/configs/khadas-vim3l_defconfig index b9f4690045a..94dd1055b3c 100644 --- a/configs/khadas-vim3l_defconfig +++ b/configs/khadas-vim3l_defconfig @@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/khadas-vim_defconfig b/configs/khadas-vim_defconfig index ac00e8975e1..13be376ebd7 100644 --- a/configs/khadas-vim_defconfig +++ b/configs/khadas-vim_defconfig @@ -68,3 +68,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/kontron-sl-mx6ul_defconfig b/configs/kontron-sl-mx6ul_defconfig index f295ecfe4b7..7096d21468b 100644 --- a/configs/kontron-sl-mx6ul_defconfig +++ b/configs/kontron-sl-mx6ul_defconfig @@ -109,3 +109,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig index d85a4335c63..facdedd22b0 100644 --- a/configs/kontron-sl-mx8mm_defconfig +++ b/configs/kontron-sl-mx8mm_defconfig @@ -150,3 +150,4 @@ CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/kontron_pitx_imx8m_defconfig index 52238831229..b35d9aa0283 100644 --- a/configs/kontron_pitx_imx8m_defconfig +++ b/configs/kontron_pitx_imx8m_defconfig @@ -114,3 +114,4 @@ CONFIG_USB_DWC3=y CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index c4493e50a32..aebcdaea9e5 100644 --- a/configs/kontron_sl28_defconfig +++ b/configs/kontron_sl28_defconfig @@ -132,3 +132,4 @@ CONFIG_WDT_SP805=y CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig index 6ad04570022..874153174df 100644 --- a/configs/libretech-ac_defconfig +++ b/configs/libretech-ac_defconfig @@ -96,3 +96,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig index beb919ca6e8..fe40804f9fc 100644 --- a/configs/libretech-cc_defconfig +++ b/configs/libretech-cc_defconfig @@ -79,3 +79,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-cc_v2_defconfig b/configs/libretech-cc_v2_defconfig index 6859dfd517c..646f71be6a0 100644 --- a/configs/libretech-cc_v2_defconfig +++ b/configs/libretech-cc_v2_defconfig @@ -83,3 +83,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_NET=y diff --git a/configs/libretech-s905d-pc_defconfig b/configs/libretech-s905d-pc_defconfig index 0adc0afdf30..eb02012a21d 100644 --- a/configs/libretech-s905d-pc_defconfig +++ b/configs/libretech-s905d-pc_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-s912-pc_defconfig b/configs/libretech-s912-pc_defconfig index cbce0cf4000..1be8ab43e4b 100644 --- a/configs/libretech-s912-pc_defconfig +++ b/configs/libretech-s912-pc_defconfig @@ -89,3 +89,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig index 198fec2cb2c..24c48b101ee 100644 --- a/configs/marsboard_defconfig +++ b/configs/marsboard_defconfig @@ -71,3 +71,4 @@ CONFIG_IMX_HDMI=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/mvebu_crb_cn9130_defconfig b/configs/mvebu_crb_cn9130_defconfig index 4d5f575b038..722fe226b43 100644 --- a/configs/mvebu_crb_cn9130_defconfig +++ b/configs/mvebu_crb_cn9130_defconfig @@ -86,3 +86,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_db_armada8k_defconfig b/configs/mvebu_db_armada8k_defconfig index 6913796c010..9964c5d8244 100644 --- a/configs/mvebu_db_armada8k_defconfig +++ b/configs/mvebu_db_armada8k_defconfig @@ -75,3 +75,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_db_cn9130_defconfig b/configs/mvebu_db_cn9130_defconfig index 9133e25b241..3cf83522e67 100644 --- a/configs/mvebu_db_cn9130_defconfig +++ b/configs/mvebu_db_cn9130_defconfig @@ -91,3 +91,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig index eef612a261e..c89d6c33d4e 100644 --- a/configs/mvebu_mcbin-88f8040_defconfig +++ b/configs/mvebu_mcbin-88f8040_defconfig @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_puzzle-m801-88f8040_defconfig b/configs/mvebu_puzzle-m801-88f8040_defconfig index b00e92908b3..8304fd6cd87 100644 --- a/configs/mvebu_puzzle-m801-88f8040_defconfig +++ b/configs/mvebu_puzzle-m801-88f8040_defconfig @@ -83,3 +83,4 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y # CONFIG_EFI_LOADER is not set +CONFIG_NET=y diff --git a/configs/mx53cx9020_defconfig b/configs/mx53cx9020_defconfig index c20c6a40a1d..9d127dd2d64 100644 --- a/configs/mx53cx9020_defconfig +++ b/configs/mx53cx9020_defconfig @@ -41,3 +41,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_IPUV3=y CONFIG_IMX_VIDEO_SKIP=y +CONFIG_NET=y diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig index e3aba715aa5..cd400eec02f 100644 --- a/configs/mx6cuboxi_defconfig +++ b/configs/mx6cuboxi_defconfig @@ -93,3 +93,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig index 7811b17bf0f..2072fea5bc7 100644 --- a/configs/mx7dsabresd_defconfig +++ b/configs/mx7dsabresd_defconfig @@ -89,3 +89,4 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/mx7dsabresd_qspi_defconfig b/configs/mx7dsabresd_qspi_defconfig index 2ee8bd36252..36464c1387e 100644 --- a/configs/mx7dsabresd_qspi_defconfig +++ b/configs/mx7dsabresd_qspi_defconfig @@ -91,3 +91,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/myir_mys_6ulx_defconfig b/configs/myir_mys_6ulx_defconfig index b165dd407d1..39ceea85115 100644 --- a/configs/myir_mys_6ulx_defconfig +++ b/configs/myir_mys_6ulx_defconfig @@ -70,3 +70,4 @@ CONFIG_SPL_USB_HOST=y CONFIG_USB_GADGET=y CONFIG_SPL_USB_GADGET=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/nanopi-k2_defconfig b/configs/nanopi-k2_defconfig index 2e1c756bf7a..db0a6f8c079 100644 --- a/configs/nanopi-k2_defconfig +++ b/configs/nanopi-k2_defconfig @@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/novena_defconfig b/configs/novena_defconfig index dd3541bc59a..9dc80863d9d 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -106,3 +106,4 @@ CONFIG_IMX_VIDEO_SKIP=y CONFIG_IMX_HDMI=y CONFIG_SPLASH_SCREEN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig index ce5eaec3cd2..e922314e54a 100644 --- a/configs/odroid-c2_defconfig +++ b/configs/odroid-c2_defconfig @@ -71,3 +71,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index 4ef1e681666..9b59ecea421 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-go-ultra_defconfig b/configs/odroid-go-ultra_defconfig index 06437fe3ae0..20e4bdea976 100644 --- a/configs/odroid-go-ultra_defconfig +++ b/configs/odroid-go-ultra_defconfig @@ -75,3 +75,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/odroid-hc4_defconfig b/configs/odroid-hc4_defconfig index 60233fb9cee..ffcdb4f4a2e 100644 --- a/configs/odroid-hc4_defconfig +++ b/configs/odroid-hc4_defconfig @@ -99,3 +99,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-n2_defconfig b/configs/odroid-n2_defconfig index a4cc766f84a..72a0c2e51c7 100644 --- a/configs/odroid-n2_defconfig +++ b/configs/odroid-n2_defconfig @@ -79,3 +79,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-n2l_defconfig b/configs/odroid-n2l_defconfig index 3f657d18812..45617f04705 100644 --- a/configs/odroid-n2l_defconfig +++ b/configs/odroid-n2l_defconfig @@ -74,3 +74,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig index c80900e2cc5..66e51ad1b79 100644 --- a/configs/odroid-xu3_defconfig +++ b/configs/odroid-xu3_defconfig @@ -72,3 +72,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x04e8 CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/p200_defconfig b/configs/p200_defconfig index b6946034795..1a84f5cfb5b 100644 --- a/configs/p200_defconfig +++ b/configs/p200_defconfig @@ -45,3 +45,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/p201_defconfig b/configs/p201_defconfig index dcc1454be16..dfbe1b79ed0 100644 --- a/configs/p201_defconfig +++ b/configs/p201_defconfig @@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/p212_defconfig b/configs/p212_defconfig index 9cf22ca4db7..1ae033bc804 100644 --- a/configs/p212_defconfig +++ b/configs/p212_defconfig @@ -54,3 +54,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_MESON_GXL=y +CONFIG_NET=y diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig index 27d438efb79..b420b278764 100644 --- a/configs/peach-pi_defconfig +++ b/configs/peach-pi_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig index 1c7e0114a85..42323d5e547 100644 --- a/configs/peach-pit_defconfig +++ b/configs/peach-pit_defconfig @@ -89,3 +89,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/phycore_pcl063_defconfig b/configs/phycore_pcl063_defconfig index 2f6b158a677..fdc2b1493d9 100644 --- a/configs/phycore_pcl063_defconfig +++ b/configs/phycore_pcl063_defconfig @@ -68,3 +68,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/pico-dwarf-imx6ul_defconfig b/configs/pico-dwarf-imx6ul_defconfig index 8b90285980f..668a9321504 100644 --- a/configs/pico-dwarf-imx6ul_defconfig +++ b/configs/pico-dwarf-imx6ul_defconfig @@ -79,3 +79,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig index 9d5241a50d0..e390cd4e304 100644 --- a/configs/pico-dwarf-imx7d_defconfig +++ b/configs/pico-dwarf-imx7d_defconfig @@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-hobbit-imx6ul_defconfig b/configs/pico-hobbit-imx6ul_defconfig index e3aca6e82e1..7283a6754d1 100644 --- a/configs/pico-hobbit-imx6ul_defconfig +++ b/configs/pico-hobbit-imx6ul_defconfig @@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index 690139c09ca..a48ce623f2b 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -94,3 +94,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig index ce29718a903..2d4e68ca76e 100644 --- a/configs/pico-imx6ul_defconfig +++ b/configs/pico-imx6ul_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_LOGO=y CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig index 1327523e289..c63a4620089 100644 --- a/configs/pico-imx7d_bl33_defconfig +++ b/configs/pico-imx7d_bl33_defconfig @@ -94,3 +94,4 @@ CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index 6009b1c65c1..f614c6fbc40 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -96,3 +96,4 @@ CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig index 9d5241a50d0..e390cd4e304 100644 --- a/configs/pico-nymph-imx7d_defconfig +++ b/configs/pico-nymph-imx7d_defconfig @@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-pi-imx6ul_defconfig b/configs/pico-pi-imx6ul_defconfig index 81f3e9bbebb..2b86127d59b 100644 --- a/configs/pico-pi-imx6ul_defconfig +++ b/configs/pico-pi-imx6ul_defconfig @@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 28c46abed78..6a14e3bcd72 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -98,3 +98,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/radxa-zero2_defconfig b/configs/radxa-zero2_defconfig index 92e0a8833cc..ba90842e973 100644 --- a/configs/radxa-zero2_defconfig +++ b/configs/radxa-zero2_defconfig @@ -77,3 +77,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/radxa-zero_defconfig b/configs/radxa-zero_defconfig index 5179c58dadc..b734fa8c6a4 100644 --- a/configs/radxa-zero_defconfig +++ b/configs/radxa-zero_defconfig @@ -73,3 +73,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig index a1e806be421..3f61fe5831e 100644 --- a/configs/riotboard_defconfig +++ b/configs/riotboard_defconfig @@ -89,3 +89,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_SPL_OF_LIBFDT=y +CONFIG_NET=y diff --git a/configs/s400_defconfig b/configs/s400_defconfig index d75d296fa0e..01607562552 100644 --- a/configs/s400_defconfig +++ b/configs/s400_defconfig @@ -60,3 +60,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/seeed_npi_imx6ull_defconfig b/configs/seeed_npi_imx6ull_defconfig index e7557025dd2..f093c26dd7f 100644 --- a/configs/seeed_npi_imx6ull_defconfig +++ b/configs/seeed_npi_imx6ull_defconfig @@ -75,3 +75,4 @@ CONFIG_SPL_USB_HOST=y CONFIG_USB_GADGET=y CONFIG_SPL_USB_GADGET=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig index 8b42c8bdb32..abc601da69f 100644 --- a/configs/smdk5250_defconfig +++ b/configs/smdk5250_defconfig @@ -73,3 +73,4 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX88179=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig index 55a53178f9c..dd4e4fb9849 100644 --- a/configs/smdk5420_defconfig +++ b/configs/smdk5420_defconfig @@ -58,3 +58,4 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_HOST_ETHER=y +CONFIG_NET=y diff --git a/configs/snow_defconfig b/configs/snow_defconfig index 2c0757194bd..664ea4032f7 100644 --- a/configs/snow_defconfig +++ b/configs/snow_defconfig @@ -108,3 +108,4 @@ CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y CONFIG_TPM=y CONFIG_ERRNO_STR=y CONFIG_UNIT_TEST=y +CONFIG_NET=y diff --git a/configs/spring_defconfig b/configs/spring_defconfig index 2bd45cb9d60..4b5a4e61896 100644 --- a/configs/spring_defconfig +++ b/configs/spring_defconfig @@ -101,3 +101,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/ten64_tfa_defconfig b/configs/ten64_tfa_defconfig index 88609d8401f..5cb2c6070ad 100644 --- a/configs/ten64_tfa_defconfig +++ b/configs/ten64_tfa_defconfig @@ -97,3 +97,4 @@ CONFIG_WDT=y CONFIG_WDT_SP805=y CONFIG_TPM=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_NET=y diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index c62e0d04c9c..7b394a904cf 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -106,3 +106,4 @@ CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_WDT=y CONFIG_WDT_ARMADA_37XX=y +CONFIG_NET=y diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index c8756a3a788..e82e1e727ed 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -129,3 +129,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_WDT=y CONFIG_WDT_ORION=y +CONFIG_NET=y diff --git a/configs/u200_defconfig b/configs/u200_defconfig index 879ae0defa7..6079f68d82a 100644 --- a/configs/u200_defconfig +++ b/configs/u200_defconfig @@ -63,3 +63,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig index 7ac70edc2ea..63647b0ff8d 100644 --- a/configs/vexpress_aemv8a_juno_defconfig +++ b/configs/vexpress_aemv8a_juno_defconfig @@ -36,3 +36,4 @@ CONFIG_SYS_FLASH_PROTECTION=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=259 CONFIG_USB=y +CONFIG_NET=y diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig index 29f8213e6e0..234d7d86cd1 100644 --- a/configs/vexpress_aemv8a_semi_defconfig +++ b/configs/vexpress_aemv8a_semi_defconfig @@ -31,3 +31,4 @@ CONFIG_SYS_FLASH_EMPTY_INFO=y CONFIG_SYS_FLASH_PROTECTION=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=256 +CONFIG_NET=y diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig index 96fbef5fa19..2d8810782ff 100644 --- a/configs/vexpress_aemv8r_defconfig +++ b/configs/vexpress_aemv8r_defconfig @@ -14,3 +14,4 @@ CONFIG_SYS_PBSIZE=541 # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SYS_PROMPT="VExpress64# " # CONFIG_MMC is not set +CONFIG_NET=y diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig index 67adba437bf..ec33e22a982 100644 --- a/configs/vexpress_ca9x4_defconfig +++ b/configs/vexpress_ca9x4_defconfig @@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_FLASH=y +CONFIG_NET=y CONFIG_CLK=y CONFIG_ARM_PL180_MMCI=y CONFIG_SYS_MMC_MAX_BLK_COUNT=127 diff --git a/configs/vexpress_fvp_defconfig b/configs/vexpress_fvp_defconfig index 7362c1fc35c..c054cbef539 100644 --- a/configs/vexpress_fvp_defconfig +++ b/configs/vexpress_fvp_defconfig @@ -3,3 +3,4 @@ CONFIG_ARCH_VEXPRESS64=y CONFIG_DEFAULT_DEVICE_TREE="arm_fvp" CONFIG_IDENT_STRING=" arm_fvp" # CONFIG_DISPLAY_CPUINFO is not set +CONFIG_NET=y diff --git a/configs/videostrong-kii-pro_defconfig b/configs/videostrong-kii-pro_defconfig index 7a5af234471..6f9b2f15e92 100644 --- a/configs/videostrong-kii-pro_defconfig +++ b/configs/videostrong-kii-pro_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig index e9deab38038..df41406a7ef 100644 --- a/configs/wandboard_defconfig +++ b/configs/wandboard_defconfig @@ -91,3 +91,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/wetek-core2_defconfig b/configs/wetek-core2_defconfig index c4b126c2b7e..2f601f8c008 100644 --- a/configs/wetek-core2_defconfig +++ b/configs/wetek-core2_defconfig @@ -76,3 +76,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_NET=y diff --git a/configs/wetek-hub_defconfig b/configs/wetek-hub_defconfig index 85cff73f50f..6fd4cc1410a 100644 --- a/configs/wetek-hub_defconfig +++ b/configs/wetek-hub_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/wetek-play2_defconfig b/configs/wetek-play2_defconfig index efdf820165b..fa270b4db66 100644 --- a/configs/wetek-play2_defconfig +++ b/configs/wetek-play2_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y From patchwork Fri Sep 6 12:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 825974 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp779183wrb; Fri, 6 Sep 2024 05:38:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBeI/IIuzK9+Vtf8wF4sPiP5zUfkZY9aZBO4fHCfGFH9yxpsBkrGPckRLnBT/2qnXJoWZF4g==@linaro.org X-Google-Smtp-Source: AGHT+IEmjh+VaPTnvChWyocSELOJx2eoXaD2T1O9aP/kAlzYxrInY3Lmu3DHMQhXgOAMZ4RmNwI0 X-Received: by 2002:a17:907:26ca:b0:a86:685c:742 with SMTP id a640c23a62f3a-a8a88663a24mr205019866b.28.1725626302158; Fri, 06 Sep 2024 05:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725626302; cv=none; d=google.com; s=arc-20240605; b=Eq5rEga2eGMozq5vv5Z4bNknoM6EjH5safzLxgyQXc94zwkbtv+lAE12MU3UmPcA1w oJMHZy2Qe+asfzByhDcT34jXLmeSFCAYWXNZ9YcBTU4itYgXHlOFHxNKx7eItdH1kBlu ti4a2UbQB4eGH3uPBtpoN6NPMLRw6baFKy0cirmC8pAPRxzyfpGtFWN+cl3SKfPZoiW3 T2QY56ST4cV5VfY8sypvdj9dvypuaOT+XuLCQptd9HL5EXQMEDh9SfI8txp62R66AcQs UJoXuolOAXxkTNBG5wdlyCqaLEeEd6HxeO68GIEs7mE7SYurAZsGTXsR3+4V7X6tTDL9 zn1Q== 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=IJgJyKf2hgj2NwtVc1eR/E8iwPMAwTPP4I3hf6px6RA=; fh=pXXq39T/gDmIHfwcsDtFqxZSeBGJyQZ8s0Jr1ylGfDk=; b=gKSww+D7151fX1BYUy3s7sCP5GaU2TUFEoiqt8u+LDm6K0ogMIpkdMzFD6TzBXYwPJ GV0QEt7w0Z0rGrW0Lb10ByNoMQg0mxWb/0SYhILSKVvjxzm24iaGe9w4LjbLDoy0dw/q nyvMq/HNLr5dztdFqa1RLXTX8j7fMFbxH5QDAlBmZHkbsvUTGtaZhznuFWStB/4rCzc/ OHeF7Iq7mBTxvaEtf3TfsPqjiwkuPP/OQY2EgzhPef24DpT9jt1GBoQ6vWb4j6hcXpTK GPTuvnggqNoEvnB30/2bPvFgZAylgkrjahLKsaPIAlj4OvvpQQNAFljLGqk3smD+K7rn OBSQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ifChex9/"; 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-a8d1095bd55si2041766b.209.2024.09.06.05.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:38:22 -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="ifChex9/"; 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 A665D88D56; Fri, 6 Sep 2024 14:35: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="ifChex9/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2858188D01; Fri, 6 Sep 2024 14:35:45 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 5544388D59 for ; Fri, 6 Sep 2024 14:35:41 +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-x32e.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so14946605e9.3 for ; Fri, 06 Sep 2024 05:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725626140; x=1726230940; 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=IJgJyKf2hgj2NwtVc1eR/E8iwPMAwTPP4I3hf6px6RA=; b=ifChex9/hx7OtTowK3CYxIn7drszExOkMsjiiqwX8TvSLvnSEuPYTrIztAXADDtpdk PjtuoviZRuKWGUkYVwrdCLG77qUdQjTNOcxRk81IIKEsQ10GyGky5C8C+z9WNwCtq9Je 4qc4mpJy9cdqZiZ0UmzoUjFI3f1qX/6ugumc4dTOz6Fes/zjloIUyUP85bx3iAk+tTf0 01T/KRfeGRrZqRzSqs06Mljpf6G07VP0K7MI0CAn0WribiygkHtbEGY6BXLXnsRFfKz/ BUyTfr8rBh6y9a1iflH6FLBjAzulZRH6nurZDlvx304g7pRPN8DIzJp23gRiDsAKTfiD xO5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725626140; x=1726230940; 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=IJgJyKf2hgj2NwtVc1eR/E8iwPMAwTPP4I3hf6px6RA=; b=Q7/9ywpCLySKHJ98rUBA62tP8lcsap4EX1nRYK0Mxyx/I/qPEvTqb0Bap32vHtMl0E 7pK2zHNEg1Hp/Nfz5UseTS8EhB5Cuuicm6cj+gTuLEY7QKnSeS6V/6zX/AFfr/DIHA0O RVowy4M5pAfN/D9MHVfH3T+5Ods9W5aFwlfaeoA8Cfobvv4BMY0JYQd3Q4u21agVwEMG zgjuSj59QacTXX4IuMio/kBadCzs60JxSW+qeNi9QhBois6AdtxfG7KINOtsHtBfFiN+ KDMQS2flUHZqiCiNqDTQetsGEJecVb/JrEbnQaSFhQNv9rZuhE0o6WRnXOYeUTYlDs4P 3wlw== X-Gm-Message-State: AOJu0Yy/BHpVbtFECI7k5vQaoP23GvtxJK97PPLL0KBFPAdtYxIAGJ4e DDAQRCNKc8sHOdK0bSbcZ8eLLUYOb6kgRAggTLyk6/cOfB/88XzZM3zB8+uL/hOlxnX9K4K5VEk eGdMhSonz X-Received: by 2002:a05:600c:5250:b0:42b:a356:a75c with SMTP id 5b1f17b1804b1-42c9f987f95mr17894635e9.21.1725626140664; Fri, 06 Sep 2024 05:35:40 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:1ff1:215c:d8a4:9f99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ca05cf0e8sm19640125e9.27.2024.09.06.05.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 05:35:40 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Paul Kocialkowski , Kever Yang , Jonas Karlman , John Keeping , Marek Vasut , Jesse Taube , Greg Malysa Subject: [PATCH v10 25/25] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX Date: Fri, 6 Sep 2024 14:33:41 +0200 Message-Id: <8fbbdba748190de13a9e39581e9c58b576a570e7.1725625913.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 Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case. Signed-off-by: Jerome Forissier --- Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Kconfig b/Kconfig index 35e34e16789..e3796e397a1 100644 --- a/Kconfig +++ b/Kconfig @@ -756,6 +756,7 @@ menu Networking choice prompt "Networking stack" + default NET_LWIP if !SANDBOX default NET config NO_NET