net: migrate NO_NET out of the networking stack choice
Subsystems (12)
cover net: migrate NO_NET out of the networking stack choice
This migrates the net options away from the main Kconfig to net/Kconfig, rename the current NET option to NET_LEGACY to really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keep NO_NET as an alias to NET=n for now) which then allows us to replace all the "if legacy_stack || lwip_stack" checks with "if net_support" which is easier to read and maintain.
The only doubt I have is wrt SYS_RX_ETH_BUFFER which seems to be needed for now even when no network is configured? Likely due to include/net-common.h with PKTBUFSRX?
No change in behavior is intended. Only change in defconfig including other defconfigs where NO_NET=y or NET is not set, in which case NO_NET is not set or NET=y should be set in the top defconfig. Similar change required for config fragments. See commit log in patch adding NET menuconfig for details.
This was tested based on 70fd0c3bb7c2 ("x86: there is no CONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up similarly as in "build all platforms in a single job" GitLab CI job.
#!/usr/bin/env bash
set -o pipefail
set -eux
ARGS="-BvelPEWM --reproducible-builds --step 0" ./tools/buildman/buildman -o ${O} --force-build $ARGS -CE $* ./tools/buildman/buildman -o ${O} $ARGS -Ssd $*
O=../build/u-boot/ ../u-boot.sh -b master^..b4/net-kconfig |& tee ../log.txt
I can't really decipher the log.txt, but there's no line starting with
+ which would be an error according to tools/buildman/builder.py help text. Additionally, because I started the script with set -e set and because buildman has an exit code != 0 when it fails to build a board, and I have the summary printed (which is the second buildman call), I believe it means all builds passed.
The summary is the following:
aarch64: (for 537/537 boards) all +0.0 rodata +0.0
uniphier_v8 : all +1 rodata +1
u-boot: add: 0/0, grow: 1/0 bytes: 1/0 (1)
function old new delta
data_gz 10640 10641 +1
arm: (for 733/733 boards) all -0.0 rodata -0.0
uniphier_v7 : all -1 rodata -1
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-1 (-1)
function old new delta
data_gz 11919 11918 -1
opos6uldev : all -3 rodata -3
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
function old new delta
data_gz 18778 18775 -3
uniphier_ld4_sld8: all -3 rodata -3
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
function old new delta
data_gz 11276 11273 -3
stemmy : all -20 rodata -20
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-20 (-20)
function old new delta
data_gz 15783 15763 -20
As far as I could tell this data_gz is an automatically generated array when CONFIG_CMD_CONFIG is enabled. It is the compressed .config stored in binary form. Because I'm changing the name of symbols, replacing a menu with a menuconfig, additional text makes it to .config and the "# Networking" section in .config disappears.
Here is the diff for the 5 defconfigs listed above, generated with:
for f in build/*-m; do
diff --unified=0 $f/.config $(dirname $f)/$(basename -a -s '-m' $f)/.config
done
(-m is the build directory for master, and without the suffix, it's the top commit of this series)
"""
--- build/opos6uldev-m/.config 2026-04-20 10:53:49.804528526 +0200
+++ build/opos6uldev/.config 2026-04-20 11:03:37.430242767 +0200
@@ -970,4 +969,0 @@
-
-#
-# Networking
-#
@@ -975,0 +972 @@
+CONFIG_NET_LEGACY=y
--- build/stemmy-m/.config 2026-04-20 11:01:33.653698123 +0200
+++ build/stemmy/.config 2026-04-20 11:04:53.452577311 +0200
@@ -733,4 +732,0 @@
-
-#
-# Networking
-#
@@ -738,2 +733,0 @@
-# CONFIG_NET is not set
-# CONFIG_NET_LWIP is not set
--- build/uniphier_ld4_sld8-m/.config 2026-04-20 11:00:41.605469071 +0200
+++ build/uniphier_ld4_sld8/.config 2026-04-20 11:04:22.226439899 +0200
@@ -997,4 +996,0 @@
-
-#
-# Networking
-#
@@ -1002,0 +999 @@
+CONFIG_NET_LEGACY=y
--- build/uniphier_v7-m/.config 2026-04-20 10:53:04.019307319 +0200
+++ build/uniphier_v7/.config 2026-04-20 11:03:01.688085486 +0200
@@ -1004,4 +1003,0 @@
-
-#
-# Networking
-#
@@ -1009,0 +1006 @@
+CONFIG_NET_LEGACY=y
--- build/uniphier_v8-m/.config 2026-04-20 10:43:05.614441175 +0200
+++ build/uniphier_v8/.config 2026-04-20 10:41:03.214852130 +0200
@@ -875,4 +874,0 @@
-
-#
-# Networking
-#
@@ -880,0 +877 @@
+CONFIG_NET_LEGACY=y
"""
This is fine:
- Networking menu doesn't exist anymore so "#\n# Networking\n#\n" won't be in .config anymore.
- opos6uldev, uniphier_ld4_sld8, uniphier_v7 and uniphier_v8 all have (old) CONFIG_NET enabled, (new) CONFIG_NET will still be set but CONFIG_NET_LEGACY also needs to be defined now to reflect the stack choice (even if default),
- stemmy has CONFIG_NO_NET set, which means CONFIG_NET and CONFIG_NET_LWIP are not reachable anymore hence why they don't need to be part of .config,
GitLab CI was run on this series (well, not exactly, but it's only changes to the git logs that were made):
https://source.denx.de/u-boot/contributors/qschulz/u-boot/-/pipelines/29849
It passes.
---
Quentin Schulz (6):
move networking menu in net/Kconfig
rename NET to NET_LEGACY
net: make NET a menuconfig (and downgrade NO_NET to a simple config) simplify NET_LEGACY || NET_LWIP condition with NET condition
doc: remove mention to non-existing TPL_NET
boot: remove NO_NET use
Kconfig | 34 ---------------- Makefile | 4 +- arch/arm/mach-stm32mp/soc.c | 2 +- board/beacon/imx8mp/imx8mp_beacon.c | 2 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/gateworks/venice/venice.c | 4 +- board/nxp/ls1043ardb/Makefile | 2 +- board/nxp/ls1046afrwy/Makefile | 2 +- board/nxp/ls1046ardb/Makefile | 2 +- .../imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/siemens/iot2050/board.c | 2 +- board/sophgo/milkv_duo/Makefile | 2 +- board/sophgo/milkv_duo/board.c | 2 +- board/theadorable/theadorable.c | 4 +- board/ti/am335x/board.c | 2 +- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 2 +- board/xilinx/common/board.c | 3 +- boot/Kconfig | 8 ++-- cmd/Kconfig | 12 +++--- cmd/Makefile | 2 +- cmd/bdinfo.c | 7 ++-- cmd/fastboot.c | 4 +- cmd/ufetch.c | 2 +- common/Kconfig | 2 +- common/board_r.c | 4 +- common/spl/Kconfig | 5 ++- configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- doc/develop/bootstd/overview.rst | 2 +- doc/develop/pytest/usage.rst | 4 +- doc/usage/cmd/bdinfo.rst | 7 ++-- doc/usage/cmd/sntp.rst | 2 +- doc/usage/cmd/wget.rst | 2 +- doc/usage/spl_boot.rst | 2 +- drivers/dfu/Kconfig | 2 +- drivers/fastboot/Kconfig | 4 +- drivers/fastboot/fb_common.c | 4 +- drivers/net/Kconfig | 6 +-- drivers/net/phy/Kconfig | 4 +- drivers/net/sandbox.c | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 ++--- include/configs/stm32mp15_common.h | 2 +- include/configs/stm32mp23_common.h | 2 +- include/configs/stm32mp25_common.h | 2 +- include/env_callback.h | 2 +- include/env_flags.h | 6 +-- include/net-common.h | 4 +- include/net-legacy.h | 2 +- lib/Kconfig | 2 +- lib/efi_loader/Kconfig | 4 +- net/Kconfig | 45 +++++++++++++++++++--- net/Makefile | 6 +-- test/cmd/Makefile | 2 +- test/cmd/bdinfo.c | 6 +-- test/dm/eth.c | 6 +-- test/py/tests/test_efi_fit.py | 2 +- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 +- test/py/tests/test_net.py | 2 +- 60 files changed, 139 insertions(+), 138 deletions(-)
---
base-commit: 70fd0c3bb7c26d42f24d10145dd5f3168ac92eac
change-id: 20251216-net-kconfig-0f63d9de716b
Best regards,
Signature · 1 line
Quentin Schulz <[email protected]>
PATCH 1/6 move networking menu in net/Kconfig
From: Quentin Schulz <[email protected]>
In the main Kconfig, there are only two more menus, General Setup and Expert, in addition to the net menu. Since the part in the main Kconfig is mostly about selecting the network stack (legacy or lwIP), and that we already have a net/Kconfig, let's move those to net/Kconfig to have everything in the same place.
No intended change in behavior.
--- Kconfig | 34 ---------------------------------- net/Kconfig | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-)
Kconfig +0 -34
@@ -791,42 +791,8 @@ source "dts/Kconfig" source "env/Kconfig" -menu "Networking" - -choice - prompt "Networking stack" - default NET - -config NO_NET - bool "No networking support" - help - Do not include networking support - -config NET - bool "Legacy U-Boot networking stack" - select NETDEVICES - help - Include networking support with U-Boot's internal implementation of - the TCP/IP protocol stack. - -config NET_LWIP - bool "Use lwIP for networking stack" - select NETDEVICES - 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"
net/Kconfig +34 -0
@@ -2,6 +2,38 @@ # Network configuration # +menu "Networking" + +choice + prompt "Networking stack" + default NET + +config NO_NET + bool "No networking support" + help + Do not include networking support + +config NET + bool "Legacy U-Boot networking stack" + select NETDEVICES + help + Include networking support with U-Boot's internal implementation of + the TCP/IP protocol stack. + +config NET_LWIP + bool "Use lwIP for networking stack" + select NETDEVICES + 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 + if NET config ARP_TIMEOUT
@@ -254,3 +286,5 @@ config SYS_RX_ETH_BUFFER 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. + +endmenu
Signature · 1 line
2.53.0
Re: [PATCH 1/6] move networking menu in net/Kconfig
Quoted 8 lines · Quentin Schulz
move networking menu in net/Kconfig
In the main
Kconfig, there are only two more menus, General Setup and Expert, in addition to the net menu. Since the part in the mainKconfigis mostly about selecting the network stack (legacy or lwIP), and that we already have a net/Kconfig, let's move those to net/Kconfig to have everything in the same place.
Quoted 7 lines
No intended change in behavior.
Signed-off-by Quentin Schulz <[email protected]>
Kconfig| 34 ----------------------------------net/Kconfig | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-)
Re: [PATCH 1/6] move networking menu in net/Kconfig
In reply to Quentin SchulzQuoted 9 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
In the main
Kconfig, there are only two more menus, General Setup and Expert, in addition to the net menu. Since the part in the mainKconfigis mostly about selecting the network stack (legacy or lwIP), and that we already have a net/Kconfig, let's move those to net/Kconfig to have everything in the same place.
Quoted 3 lines
No intended change in behavior.
Signed-off-by Quentin Schulz <[email protected]>
Quoted 105 lines
--- Kconfig | 34 ---------------------------------- net/Kconfig | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-)Kconfig +0
-34@@ -791,42 +791,8 @@ source "dts/Kconfig" source "env/Kconfig" -menu "Networking" - -choice - prompt "Networking stack" - default NET - -config NO_NET - bool "No networking support" - help - Do not include networking support - -config NET - bool "Legacy U-Boot networking stack" - select NETDEVICES - help - Include networking support with U-Boot's internal implementation of - the TCP/IP protocol stack. - -config NET_LWIP - bool "Use lwIP for networking stack" - select NETDEVICES - 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"net/Kconfig +34
-1@@ -2,6 +2,38 @@ # Network configuration # +menu "Networking" + +choice + prompt "Networking stack" + default NET + +config NO_NET + bool "No networking support" + help + Do not include networking support + +config NET + bool "Legacy U-Boot networking stack" + select NETDEVICES + help + Include networking support with U-Boot's internal implementation of + the TCP/IP protocol stack. + +config NET_LWIP + bool "Use lwIP for networking stack" + select NETDEVICES + 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 + if NET config ARP_TIMEOUT@@ -254,3 +286,5 @@ config SYS_RX_ETH_BUFFER 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. + +endmenu --2.53.0
PATCH 2/6 rename NET to NET_LEGACY
In reply to Quentin SchulzFrom: Quentin Schulz <[email protected]>
Highlight that NET really is the legacy networking stack by renaming the option to NET_LEGACY.
This requires us to add an SPL_NET_LEGACY alias to SPL_NET as otherwise CONFIG_IS_ENABLED(NET_LEGACY) will not work for SPL.
The "depends on !NET_LWIP" for SPL_NET clearly highlights that it is using the legacy networking app so this seems fine to do.
This also has the benefit of removing potential confusion on NET being a specific networking stack instead of "any" network stack.
--- Makefile | 4 ++-- arch/arm/mach-stm32mp/soc.c | 2 +- board/beacon/imx8mp/imx8mp_beacon.c | 2 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/gateworks/venice/venice.c | 4 ++-- board/nxp/ls1043ardb/Makefile | 2 +- board/nxp/ls1046afrwy/Makefile | 2 +- board/nxp/ls1046ardb/Makefile | 2 +- .../imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/siemens/iot2050/board.c | 2 +- board/sophgo/milkv_duo/Makefile | 2 +- board/sophgo/milkv_duo/board.c | 2 +- board/theadorable/theadorable.c | 4 ++-- board/ti/am335x/board.c | 2 +- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 2 +- board/xilinx/common/board.c | 2 +- cmd/Kconfig | 12 ++++++------ cmd/Makefile | 2 +- cmd/bdinfo.c | 6 +++--- cmd/fastboot.c | 4 ++-- cmd/ufetch.c | 2 +- common/Kconfig | 2 +- common/board_r.c | 4 ++-- common/spl/Kconfig | 5 ++++- configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- doc/develop/bootstd/overview.rst | 2 +- doc/develop/pytest/usage.rst | 4 ++-- doc/usage/cmd/bdinfo.rst | 6 +++--- doc/usage/cmd/sntp.rst | 2 +- doc/usage/cmd/wget.rst | 2 +- drivers/dfu/Kconfig | 2 +- drivers/fastboot/Kconfig | 4 ++-- drivers/fastboot/fb_common.c | 4 ++-- drivers/net/Kconfig | 6 +++--- drivers/net/phy/Kconfig | 4 ++-- drivers/net/sandbox.c | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 +++++----- include/configs/stm32mp15_common.h | 2 +- include/configs/stm32mp23_common.h | 2 +- include/configs/stm32mp25_common.h | 2 +- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/net-common.h | 4 ++-- include/net-legacy.h | 2 +- lib/Kconfig | 2 +- lib/efi_loader/Kconfig | 4 ++-- net/Kconfig | 20 ++++++++++---------- net/Makefile | 6 +++--- test/cmd/Makefile | 2 +- test/cmd/bdinfo.c | 6 +++--- test/dm/eth.c | 6 +++--- test/py/tests/test_efi_fit.py | 2 +- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 ++-- test/py/tests/test_net.py | 2 +- 57 files changed, 104 insertions(+), 101 deletions(-)
Makefile +2 -2
@@ -1081,7 +1081,7 @@ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += env/ libs-y += lib/ libs-y += fs/ -libs-$(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)) += net/ +libs-$(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)) += net/ libs-y += disk/ libs-y += drivers/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
@@ -1373,7 +1373,7 @@ expect = $(foreach cfg,$(1),y) # 1: List of options to migrate to (e.g. "CONFIG_DM_MMC CONFIG_BLK") # 2: Name of component (e.g . "Ethernet drivers") # 3: Release deadline (e.g. "v202.07") -# 4: Condition to require before checking (e.g. "$(CONFIG_NET)") +# 4: Condition to require before checking (e.g. "$(CONFIG_NET_LEGACY)") # Note: Script avoids bash construct, hence the strange double 'if' # (patches welcome!) define deprecated
arch/arm/mach-stm32mp/soc.c +1 -1
@@ -64,7 +64,7 @@ __weak int setup_mac_address(void)struct udevice *dev;int nb_eth, nb_otp, index; -if (!IS_ENABLED (CONFIG_NET )) +if (!IS_ENABLED (CONFIG_NET_LEGACY ))return 0 ; nb_eth =get_eth_nb ();
board/beacon/imx8mp/imx8mp_beacon.c +1 -1
@@ -14,7 +14,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if IS_ENABLED (CONFIG_NET ) +#if IS_ENABLED (CONFIG_NET_LEGACY )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/engicam/imx8mp/icore_mx8mp.c +1 -1
@@ -30,7 +30,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/gateworks/venice/venice.c +2 -2
@@ -47,7 +47,7 @@ int board_fit_config_name_match(const char *path)return -1 ; } -#if (IS_ENABLED (CONFIG_NET )) +#if (IS_ENABLED (CONFIG_NET_LEGACY ))int board_phy_config (struct phy_device *phydev) {unsigned short val;
@@ -71,7 +71,7 @@ int board_phy_config(struct phy_device *phydev) return 0; } -#endif // IS_ENABLED(CONFIG_NET) +#endif // IS_ENABLED(CONFIG_NET_LEGACY) int board_init (void ) {
board/nxp/ls1043ardb/Makefile +1 -1
@@ -5,6 +5,6 @@ obj-y += ddr.o obj-y += ls1043ardb.o ifndef CONFIG_XPL_BUILD -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.o obj-y += cpld.o endif
board/nxp/ls1046afrwy/Makefile +1 -1
@@ -4,4 +4,4 @@ obj-y += ddr.o obj-y += ls1046afrwy.o -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.o
board/nxp/ls1046ardb/Makefile +1 -1
@@ -5,6 +5,6 @@ obj-y += ddr.o obj-y += ls1046ardb.o ifndef CONFIG_XPL_BUILD -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.o obj-y += cpld.o endif
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1 -1
@@ -26,7 +26,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/siemens/iot2050/board.c +1 -1
@@ -232,7 +232,7 @@ void set_board_info_env(void)env_set ("seboot_version" , buf);env_set ("fw_version" ,PLAIN_VERSION ); -if (IS_ENABLED (CONFIG_NET )) { +if (IS_ENABLED (CONFIG_NET_LEGACY )) {int mac_cnt; mac_cnt =sysinfo_get_item_count (sysinfo,SYSID_BOARD_MAC_ADDR );
board/sophgo/milkv_duo/Makefile +1 -1
@@ -3,4 +3,4 @@ # Copyright (c) 2024, Kongyang Liu <[email protected]> obj-y += board.o -obj-$(CONFIG_NET) += ethernet.o +obj-$(CONFIG_NET_LEGACY) += ethernet.o
board/sophgo/milkv_duo/board.c +1 -1
@@ -12,7 +12,7 @@ int board_init(void)if (IS_ENABLED (CONFIG_SYSRESET_CV1800B ))device_bind_driver (gd->dm_root,"cv1800b_sysreset" ,"sysreset" ,NULL ); -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))cv1800b_ephy_init ();return 0 ;
board/theadorable/theadorable.c +2 -2
@@ -20,7 +20,7 @@#include <asm/arch/soc.h> #include <linux/delay.h> #include <linux/mbus.h> -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #include <netdev.h> #endif #include <u-boot/crc.h>
@@ -244,7 +244,7 @@ int checkboard(void)return 0 ; } -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY int board_eth_init (struct bd_info *bis) {cpu_eth_init (bis);/* Built in controller(s) come first */
board/ti/am335x/board.c +1 -1
@@ -911,7 +911,7 @@ int board_late_init(void)#endif /* CPSW plat */ -#if (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) && \ +#if (CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP)) && \ !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { {
board/toradex/verdin-imx8mp/verdin-imx8mp.c +1 -1
@@ -46,7 +46,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if IS_ENABLED (CONFIG_NET ) +#if IS_ENABLED (CONFIG_NET_LEGACY )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/xilinx/common/board.c +1 -1
@@ -508,7 +508,7 @@ int board_late_init_xilinx(void) ret |=env_set_by_index ("uuid" , id, uuid); } -if (!(CONFIG_IS_ENABLED (NET ) || +if (!(CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )))continue ;
cmd/Kconfig +6 -6
@@ -1946,7 +1946,7 @@ config CMD_XXD endmenu -if NET || NET_LWIP +if NET_LEGACY || NET_LWIP menuconfig CMD_NET bool "Network commands"
@@ -1954,7 +1954,7 @@ menuconfig CMD_NET if CMD_NET -if NET +if NET_LEGACY config CMD_BOOTP bool "bootp"
@@ -2198,12 +2198,12 @@ config CMD_WOL help Wait for wake-on-lan Magic Packet -endif # if NET +endif # if NET_LEGACY config CMD_DHCP bool "dhcp" select PROT_DHCP_LWIP if NET_LWIP - select CMD_BOOTP if NET + select CMD_BOOTP if NET_LEGACY help Boot image via network using DHCP/TFTP protocol
@@ -2259,7 +2259,7 @@ config CMD_PING config CMD_SNTP bool "sntp" - select PROT_UDP if NET + select PROT_UDP if NET_LEGACY select PROT_UDP_LWIP if NET_LWIP help Synchronize RTC via network
@@ -2329,7 +2329,7 @@ config CMD_PXE endif # if CMD_NET -endif # NET || NET_LWIP +endif # NET_LEGACY || NET_LWIP menu "Misc commands"
cmd/Makefile +1 -1
@@ -131,7 +131,7 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -ifdef CONFIG_NET +ifdef CONFIG_NET_LEGACY obj-$(CONFIG_CMD_NET) += net.o net-common.o else ifdef CONFIG_NET_LWIP obj-$(CONFIG_CMD_NET) += net-common.o
cmd/bdinfo.c +3 -3
@@ -152,7 +152,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_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))print_eth ();bdinfo_print_num_l ("fdt_blob" , (ulong )map_to_sysmem (gd->fdt_blob));if (IS_ENABLED (CONFIG_VIDEO ))
@@ -194,7 +194,7 @@ 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_NET ) && +if (!IS_ENABLED (CONFIG_NET_LEGACY ) && !IS_ENABLED (CONFIG_NET_LWIP ))return CMD_RET_USAGE ;print_eth ();
@@ -221,7 +221,7 @@ U_BOOT_CMD( " - print all Board Info structure"#if CONFIG_IS_ENABLED (GETOPT ) "\n" -#if IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP ) +#if IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )"bdinfo -e\n" " - print Board Info related to network\n"#endif
cmd/fastboot.c +2 -2
@@ -16,7 +16,7 @@#include <linux/printk.h> #include <linux/stringify.h> -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int do_fastboot_udp (int argc,char *const argv[],uintptr_t buf_addr,size_t buf_size) {
@@ -162,7 +162,7 @@ NXTARG:fastboot_init ((void *)buf_addr, buf_size); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )if (!strcmp (argv[1 ],"udp" ))return do_fastboot_udp (argc, argv, buf_addr, buf_size);if (!strcmp (argv[1 ],"tcp" ))
cmd/ufetch.c +1 -1
@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,break ;case FEATURES :printf ("Features:" RESET " " ); -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))printf ("Net" );if (IS_ENABLED (CONFIG_EFI_LOADER ))printf (", EFI" );
common/Kconfig +1 -1
@@ -425,7 +425,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers.
common/board_r.c +2 -2
@@ -495,7 +495,7 @@ static int initr_boot_led_on(void)return 0 ; } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )static int initr_net (void ) {puts ("Net: " );
@@ -756,7 +756,7 @@ static void initcall_run_r(void)#if CONFIG_IS_ENABLED (PCI_ENDPOINT )INITCALL (pci_ep_init);#endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )WATCHDOG_RESET ();INITCALL (initr_net);#endif
common/spl/Kconfig +4 -1
@@ -1151,7 +1151,7 @@ config SPL_DM_SPI_FLASH config SPL_NET bool "Support networking" - depends on NET + depends on NET_LEGACY select SPL_USE_TINY_PRINTF_POINTER_SUPPORT if SPL_USE_TINY_PRINTF help Enable support for network devices (such as Ethernet) in SPL.
@@ -1160,6 +1160,9 @@ config SPL_NET the network stack uses a number of environment variables. See also SPL_ETH. +config SPL_NET_LEGACY + def_bool y if SPL_NET + config SPL_NET_VCI_STRING string "BOOTP Vendor Class Identifier string sent by SPL" depends on SPL_NET
configs/am62px_evm_r5_ethboot_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_AM62P5=y CONFIG_TARGET_AM62P5_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk" -CONFIG_NET=y +CONFIG_NET_LEGACY=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y
configs/j722s_evm_r5_ethboot_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_J722S=y CONFIG_TARGET_J722S_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-j722s-r5-evm" -CONFIG_NET=y +CONFIG_NET_LEGACY=y CONFIG_SPL_DRIVERS_MISC=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=y
doc/develop/bootstd/overview.rst +1 -1
@@ -422,7 +422,7 @@ includes the full set of commands, more error messages when things go wrong and bootmeth ordering with the bootmeths environment variable. You should probably also enable `CONFIG_BOOTSTD_DEFAULTS`, which provides -several filesystem and network features (if `CONFIG_NET` is enabled) so that +several filesystem and network features (if `CONFIG_NET_LEGACY` is enabled) so that a good selection of boot options is available. Some devicetree properties are supported in the bootstd node when
doc/develop/pytest/usage.rst +2 -2
@@ -546,11 +546,11 @@ following annotation for a test requires ``CONFIG_EFI_LOADER=y``: Sometimes multiple configuration option supply the same functionality. If multiple arguments are passed to ``buildconfigspec()``, only one of the configuration options needs to be set. The following annotation requires that -either of ``CONFIG_NET`` or ``CONFIG_NET_LWIP`` is set: +either of ``CONFIG_NET_LEGACY`` or ``CONFIG_NET_LWIP`` is set: .. code-block:: python - @pytest.mark.buildconfigspec('net', 'net_lwip') + @pytest.mark.buildconfigspec('net_legacy', 'net_lwip') The ``notbuildconfigspec()`` annotation can be used to require a configuration option not to be set. The following annotation requires ``CONFIG_RISCV=n``:
doc/usage/cmd/bdinfo.rst +3 -3
@@ -124,12 +124,12 @@ Build current eth name of the active network device - Only shown if CONFIG_NET=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. IP addr network address, value of the environment variable *ipaddr* - Only shown if CONFIG_NET=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. fdt_blob address of U-Boot's own device tree, NULL if none
@@ -173,5 +173,5 @@ The bdinfo command is available if CONFIG_CMD_BDI=y. The options to bdinfo are only available if CONFIG_GETOPT=y. -The ``-e`` option is additionally only available if CONFIG_NET=y or +The ``-e`` option is additionally only available if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y.
doc/usage/cmd/sntp.rst +1 -1
@@ -24,7 +24,7 @@ the server's IP address to be given on the command line or via the `ntpserverip` environment variable. The address of the NTP server does not need to be given if the DHCP server -provides one. The legacy network stack (`CONFIG_NET=y`) can only use the +provides one. The legacy network stack (`CONFIG_NET_LEGACY=y`) can only use the first NTP server provided in the `ntp-servers` DHCP option. When the network stack is lwIP (`CONFIG_NET_LWIP=y`) and DNS resolution
doc/usage/cmd/wget.rst +1 -1
@@ -26,7 +26,7 @@ In order to use HTTPS you will need to compile wget with lwIP support. Legacy syntax ~~~~~~~~~~~~~ -The legacy syntax is supported by the legacy network stack (CONFIG_NET=y) +The legacy syntax is supported by the legacy network stack (CONFIG_NET_LEGACY=y) as well as by the lwIP base network stack (CONFIG_NET_LWIP=y). It supports HTTP only.
drivers/dfu/Kconfig +1 -1
@@ -11,7 +11,7 @@ config DFU_OVER_USB config DFU_OVER_TFTP bool - depends on NET + depends on NET_LEGACY config DFU_WRITE_ALT bool
drivers/fastboot/Kconfig +2 -2
@@ -27,7 +27,7 @@ config USB_FUNCTION_FASTBOOT This enables the USB part of the fastboot gadget. config UDP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over UDP" help
@@ -41,7 +41,7 @@ config UDP_FUNCTION_FASTBOOT_PORT The fastboot protocol requires a UDP port number. config TCP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over TCP" help
drivers/fastboot/fb_common.c +2 -2
@@ -191,13 +191,13 @@ void fastboot_handle_boot(int command, bool success)switch (command) {case FASTBOOT_COMMAND_BOOT :fastboot_boot (); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )net_set_state (NETLOOP_SUCCESS );#endif break ;case FASTBOOT_COMMAND_CONTINUE : -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )net_set_state (NETLOOP_SUCCESS );#endif break ;
drivers/net/Kconfig +3 -3
@@ -339,7 +339,7 @@ config ESSEDMA config ETH_SANDBOX depends on SANDBOX - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP default y bool "Sandbox: Mocked Ethernet driver" help
@@ -350,7 +350,7 @@ config ETH_SANDBOX config ETH_SANDBOX_RAW depends on SANDBOX - depends on NET + depends on NET_LEGACY default y bool "Sandbox: Bridge to Linux Raw Sockets" help
@@ -476,7 +476,7 @@ config FTMAC100 config FTGMAC100 bool "Ftgmac100 Ethernet Support" select PHYLIB - depends on NET + depends on NET_LEGACY help This driver supports the Faraday's FTGMAC100 Gigabit SoC Ethernet controller that can be found on Aspeed SoCs (which
drivers/net/phy/Kconfig +2 -2
@@ -7,7 +7,7 @@ config MV88E6352_SWITCH menuconfig PHYLIB bool "Ethernet PHY (physical media interface) support" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Enable Ethernet PHY (physical media interface) support.
@@ -381,7 +381,7 @@ config PHY_FIXED config PHY_NCSI bool "NC-SI based PHY" - depends on NET + depends on NET_LEGACY endif #PHYLIB
drivers/net/sandbox.c +1 -1
@@ -15,7 +15,7 @@/* * Structure definitions for network protocols. Since this file is used for -* both NET and NET_LWIP, and given that the two network stacks do have +* both NET_LEGACY and NET_LWIP, and given that the two network stacks do have * conflicting types (for instance struct icmp_hdr), it is on purpose that the * structures are defined locally with minimal dependencies -- <asm/types.h> is * included for the bit types and that's it.
drivers/usb/gadget/Kconfig +1 -1
@@ -232,7 +232,7 @@ endif # USB_GADGET_DOWNLOAD config USB_ETHER bool "USB Ethernet Gadget" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP default y if ARCH_SUNXI && USB_MUSB_GADGET help Creates an Ethernet network device through a USB peripheral
env/flags.c +5 -5
@@ -22,7 +22,7 @@#include <env_internal.h> #endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#define ENV_FLAGS_NET_VARTYPE_REPS "im"#else #define ENV_FLAGS_NET_VARTYPE_REPS ""
@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {"decimal" ,"hexadecimal" ,"boolean" , -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP)"IP address" , "MAC address", #endif
@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end, *end = value; } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int eth_validate_ethaddr_str (const char *addr) {const char *end;
@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value, enum env_flags_vartype type) {const char *end; -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )const char *cur;int i;#endif
@@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,if (value[1 ] !='\0' )return -1 ;break ; -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )case env_flags_vartype_ipaddr: cur = value;for (i =0 ; i <4 ; i++) {
include/configs/stm32mp15_common.h +1 -1
@@ -41,7 +41,7 @@#define BOOT_TARGET_MMC2 (func)#endif -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)
include/configs/stm32mp23_common.h +1 -1
@@ -29,7 +29,7 @@#ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)
include/configs/stm32mp25_common.h +1 -1
@@ -25,7 +25,7 @@#ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)
include/env_callback.h +1 -1
@@ -32,7 +32,7 @@#define DNS_CALLBACK #endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \
include/env_flags.h +3 -3
@@ -14,7 +14,7 @@ enum env_flags_vartype { env_flags_vartype_decimal, env_flags_vartype_hex, env_flags_vartype_bool, -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) env_flags_vartype_ipaddr, env_flags_vartype_macaddr, #endif
@@ -41,7 +41,7 @@ enum env_flags_varaccess {#define CFG_ENV_FLAGS_LIST_STATIC ""#endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*"#else
@@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags);*/ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags (int binflags); -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )/* * Check if a string has the format of an Ethernet MAC address */
include/net-common.h +2 -2
@@ -235,7 +235,7 @@ int eth_rx(void); /* Check for received packets */*/ void reset_phy (void ); -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )/** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs *
@@ -485,7 +485,7 @@ int net_init(void);/* Called when a network operation fails to know if it should be re-tried */ int net_start_again (void ); -/* NET compatibility */ +/* NET_LEGACY compatibility */ enum proto_t ;int net_loop (enum proto_t protocol);
include/net-legacy.h +1 -1
@@ -281,7 +281,7 @@ 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 +#ifdef CONFIG_NET_LEGACY extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN ];/* Our root path */ #endif /** END OF BOOTP EXTENTIONS **/
lib/Kconfig +1 -1
@@ -285,7 +285,7 @@ config PANIC_HANG config REGEX bool "Enable regular expression support" - default y if NET + default y if NET_LEGACY help If this variable is defined, U-Boot is linked against the SLRE (Super Light Regular Expression) library, which adds
lib/efi_loader/Kconfig +2 -2
@@ -517,7 +517,7 @@ config EFI_RISCV_BOOT_PROTOCOL config EFI_IP4_CONFIG2_PROTOCOL bool "EFI_IP4_CONFIG2_PROTOCOL support" default y if ARCH_QEMU || SANDBOX - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Provides an implementation of the EFI_IP4_CONFIG2_PROTOCOL, this protocol can be used to set and get the current ip address and
@@ -599,7 +599,7 @@ config EFI_BOOTMGR config EFI_HTTP_BOOT bool "EFI HTTP Boot support" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP select CMD_NET select CMD_DHCP select CMD_DNS
net/Kconfig +10 -10
@@ -6,14 +6,14 @@ menu "Networking" choice prompt "Networking stack" - default NET + default NET_LEGACY config NO_NET bool "No networking support" help Do not include networking support -config NET +config NET_LEGACY bool "Legacy U-Boot networking stack" select NETDEVICES help
@@ -27,14 +27,14 @@ config NET_LWIP 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 + and enabled via CONFIG_NET_LEGACY as well as other pieces of code that + depend on CONFIG_NET_LEGACY (such as cmd/net.c enabled via CONFIG_CMD_NET). + Therefore the two symbols CONFIG_NET_LEGACY and CONFIG_NET_LWIP are mutually exclusive. endchoice -if NET +if NET_LEGACY config ARP_TIMEOUT int "Milliseconds before trying ARP again"
@@ -227,11 +227,11 @@ config IPV6 ip6addr, serverip6. If a u-boot command is capable to parse an IPv6 address and find it, it will force using IPv6 in the network stack. -endif # if NET +endif # if NET_LEGACY source "net/lwip/Kconfig" -if NET || NET_LWIP +if NET_LEGACY || NET_LWIP config BOOTDEV_ETH bool "Enable bootdev for ethernet"
@@ -260,7 +260,7 @@ config DNS config WGET bool "Enable wget" - select PROT_TCP if NET + select PROT_TCP if NET_LEGACY select PROT_TCP_LWIP if NET_LWIP help Selecting this will enable wget, an interface to send HTTP requests
@@ -276,7 +276,7 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET || NET_LWIP +endif # if NET_LEGACY || NET_LWIP config SYS_RX_ETH_BUFFER int "Number of receive packet buffers"
net/Makefile +3 -3
@@ -5,9 +5,9 @@ #ccflags-y += -DDEBUG -ifeq ($(CONFIG_NET),y) +ifeq ($(CONFIG_NET_LEGACY),y) -obj-$(CONFIG_NET) += arp.o +obj-$(CONFIG_NET_LEGACY) += arp.o obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_DNS) += dns.o
@@ -37,7 +37,7 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif -ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y) +ifeq ($(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)),y) obj-$(CONFIG_DM_DSA) += dsa-uclass.o obj-$(CONFIG_$(PHASE_)DM_ETH) += eth-uclass.o obj-$(CONFIG_$(PHASE_)BOOTDEV_ETH) += eth_bootdev.o
test/cmd/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_CMD_PWM) += pwm.o obj-$(CONFIG_CMD_READ) += rw.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o obj-$(CONFIG_CMD_TEMPERATURE) += temperature.o -ifdef CONFIG_NET +ifdef CONFIG_NET_LEGACY obj-$(CONFIG_CMD_WGET) += wget.o endif obj-$(CONFIG_ARM_FFA_TRANSPORT) += armffa.o
test/cmd/bdinfo.c +3 -3
@@ -172,7 +172,7 @@ static int bdinfo_test_all(struct unit_test_state *uts)ut_assertok (test_num_l (uts,"reloc off" , gd->reloc_off));ut_assert_nextline ("%-12s= %u-bit" ,"Build" , (uint )sizeof (void *) *8 ); -if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))ut_assertok (test_eth (uts));/*
@@ -314,7 +314,7 @@ static int bdinfo_test_help(struct unit_test_state *uts)ut_assert_nextlinen ("bdinfo -a" );ut_assert_nextlinen (" - print all Board Info structure" );if (CONFIG_IS_ENABLED (GETOPT )) { -if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) { +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) {ut_assert_nextlinen ("bdinfo -e" );ut_assert_nextlinen (" - print Board Info related to network" ); }
@@ -348,7 +348,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts)ut_assertok (run_commandf ("bdinfo -e" ));if (!CONFIG_IS_ENABLED (GETOPT ))ut_assertok (bdinfo_test_all (uts)); -else if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +else if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))ut_assertok (test_eth (uts));ut_assert_console_end ();
test/dm/eth.c +3 -3
@@ -449,7 +449,7 @@ static int dm_test_net_retry(struct unit_test_state *uts) }DM_TEST (dm_test_net_retry,UTF_SCAN_FDT ); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int sb_check_arp_reply (struct udevice *dev,void *packet,unsigned int len) {
@@ -517,7 +517,7 @@ static int sb_with_async_arp_handler(struct udevice *dev, void *packet, }#endif -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int dm_test_eth_async_arp_reply (struct unit_test_state *uts) { net_ping_ip =string_to_ip ("1.1.2.2" );
@@ -537,7 +537,7 @@ static int dm_test_eth_async_arp_reply(struct unit_test_state *uts)DM_TEST (dm_test_eth_async_arp_reply,UTF_SCAN_FDT );#endif -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int sb_check_ping_reply (struct udevice *dev,void *packet,unsigned int len) {
test/py/tests/test_efi_fit.py +1 -1
@@ -225,7 +225,7 @@ def test_efi_fit_launch(ubman): has_dhcp = ubman.config.buildconfig.get('config_cmd_dhcp', 'n') == 'y' if not has_dhcp: - ubman.log.warning('CONFIG_NET != y: Skipping static network setup') + ubman.log.warning('CONFIG_NET_LEGACY != y: Skipping static network setup') return False env_vars = ubman.config.env.get('env__net_static_env_vars', None)
test/py/tests/test_efi_loader.py +1 -1
@@ -98,7 +98,7 @@ def test_efi_setup_dhcp(ubman): global net_set_up net_set_up = True [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_efi_setup_static(ubman): """Set up the network using a static IP configuration.
test/py/tests/test_fpga.py +2 -2
@@ -506,7 +506,7 @@ def test_fpga_loadfs(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_fpga_secure_bit_auth(ubman): test_net.test_net_dhcp(ubman)
@@ -534,7 +534,7 @@ def test_fpga_secure_bit_auth(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_fpga_secure_bit_img_auth_kup(ubman): test_net.test_net_dhcp(ubman)
test/py/tests/test_net.py +1 -1
@@ -201,7 +201,7 @@ def test_net_dhcp6(ubman): global net6_set_up net6_set_up = True [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_net_setup_static(ubman): """Set up a static IP configuration.
Signature · 1 line
2.53.0
Re: [PATCH 2/6] rename NET to NET_LEGACY
Hi Quentin,
Quoted 18 lines · Quentin Schulz
rename NET to
NET_LEGACYHighlight that NET really is the legacy networking stack by renaming the option to
NET_LEGACY.This requires us to add an
SPL_NET_LEGACYalias toSPL_NETas otherwiseCONFIG_IS_ENABLED(NET_LEGACY)will not work for SPL.The "depends on !NET_LWIP" for
SPL_NETclearly highlights that it is using the legacy networking app so this seems fine to do.This also has the benefit of removing potential confusion on NET being a specific networking stack instead of 'any' network stack.
Signed-off-by Quentin Schulz <[email protected]>
doc/develop/bootstd/overview.rst includes the full set of commands, more error messages when things go wrong and · line 422
Quoted 2 lines
doc/develop/bootstd/overview.rst +1
-1@@ -422,7 +422,7 @@ includes the full set of commands, more error messages when things go wrong and -several filesystem and network features (if CONFIG_NET is enabled) so that +several filesystem and network features (if CONFIG_NET_LEGACY is enabled) so that
Shouldn't this be left alone? Or perhaps restored in patch 4?
BOOTSTD_DEFAULTS selects BOOT_DEFAULTS which enables network commands conditionally on !NO_NET, meaning any network stack.
cmd/ufetch.c static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, · line 160
Quoted 5 lines
cmd/ufetch.c +1
-1@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))printf ('Net' );
Similar question here.
board/siemens/iot2050/board.c void set_board_info_env(void) · line 232
Quoted 4 lines
board/siemens/iot2050/board.c +1
-1@@ -232,7 +232,7 @@ void set_board_info_env(void) -if (IS_ENABLED (CONFIG_NET )) { +if (IS_ENABLED (CONFIG_NET_LEGACY )) {
and here
Regards,
Simon
Re: [PATCH 2/6] rename NET to NET_LEGACY
Hi Simon,
Quoted 26 lines · Simon Glass
Hi Quentin,
Quoted 18 lines · Quentin Schulz
rename NET to
NET_LEGACYHighlight that NET really is the legacy networking stack by renaming the option to
NET_LEGACY.This requires us to add an
SPL_NET_LEGACYalias toSPL_NETas otherwiseCONFIG_IS_ENABLED(NET_LEGACY)will not work for SPL.The "depends on !NET_LWIP" for
SPL_NETclearly highlights that it is using the legacy networking app so this seems fine to do.This also has the benefit of removing potential confusion on NET being a specific networking stack instead of 'any' network stack.
Signed-off-by Quentin Schulz <[email protected]>doc/develop/bootstd/overview.rst includes the full set of commands, more error messages when things go wrong and · line 422
Quoted 2 lines
doc/develop/bootstd/overview.rst +1
-1@@ -422,7 +422,7 @@ includes the full set of commands, more error messages when things go wrong and -several filesystem and network features (if CONFIG_NET is enabled) so that +several filesystem and network features (if CONFIG_NET_LEGACY is enabled) so thatShouldn't this be left alone? Or perhaps restored in patch 4?
Quoted 3 lines
BOOTSTD_DEFAULTSselectsBOOT_DEFAULTSwhich enables network commands conditionally on !NO_NET, meaning any network stack.
This patch series is about renaming stuff, not fixing stuff (though you can see some trivial "fixes" in patch 5 and 6).
I agree with you that this needs to be switched to (new) CONFIG_NET. I'll try to not forget adding it to a v2 (as a separate patch) if there's a need for one, or send a follow-up patch.
Quoted 8 lines
cmd/ufetch.c static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, · line 160
Quoted 5 lines
cmd/ufetch.c +1
-1@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))printf ('Net' );Similar question here.
See above.
Quoted 7 lines
board/siemens/iot2050/board.c void set_board_info_env(void) · line 232
Quoted 4 lines
board/siemens/iot2050/board.c +1
-1@@ -232,7 +232,7 @@ void set_board_info_env(void) -if (IS_ENABLED (CONFIG_NET )) { +if (IS_ENABLED (CONFIG_NET_LEGACY )) {and here
See above. This one seems ok, but I am not really planning to modify individual boards that I cannot test. This change would mean in a way that CONFIG_NET_LWIP has been tested with that board, which possibly isn't the case and I cannot guarantee that either.
Cheers,
Quentin
Re: [PATCH 2/6] rename NET to NET_LEGACY
Hi Quentin,
Quoted 30 lines · Quentin Schulz
Hi Simon,
Quoted 26 lines · Simon Glass
Hi Quentin,
Quoted 18 lines · Quentin Schulz
rename NET to
NET_LEGACYHighlight that NET really is the legacy networking stack by renaming the option to
NET_LEGACY.This requires us to add an
SPL_NET_LEGACYalias toSPL_NETas otherwiseCONFIG_IS_ENABLED(NET_LEGACY)will not work for SPL.The "depends on !NET_LWIP" for
SPL_NETclearly highlights that it is using the legacy networking app so this seems fine to do.This also has the benefit of removing potential confusion on NET being a specific networking stack instead of 'any' network stack.
Signed-off-by Quentin Schulz <[email protected]>doc/develop/bootstd/overview.rst includes the full set of commands, more error messages when things go wrong and · line 422
Quoted 2 lines
doc/develop/bootstd/overview.rst +1
-1@@ -422,7 +422,7 @@ includes the full set of commands, more error messages when things go wrong and -several filesystem and network features (if CONFIG_NET is enabled) so that +several filesystem and network features (if CONFIG_NET_LEGACY is enabled) so thatShouldn't this be left alone? Or perhaps restored in patch 4?
Quoted 5 lines
Quoted 3 lines
BOOTSTD_DEFAULTSselectsBOOT_DEFAULTSwhich enables network commands conditionally on !NO_NET, meaning any network stack.This patch series is about renaming stuff, not fixing stuff (though you can see some trivial "fixes" in patch 5 and 6).
OK, fair enough. This is worth a follow-up though, as having NET_LEGACY about the place suggests that the code is old.
Quoted 24 lines
I agree with you that this needs to be switched to (new)
CONFIG_NET. I'll try to not forget adding it to a v2 (as a separate patch) if there's a need for one, or send a follow-up patch.Quoted 8 lines
cmd/ufetch.c static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, · line 160
Quoted 5 lines
cmd/ufetch.c +1
-1@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc, -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))printf ('Net' );Similar question here.
See above.
Quoted 7 lines
board/siemens/iot2050/board.c void set_board_info_env(void) · line 232
Quoted 4 lines
board/siemens/iot2050/board.c +1
-1@@ -232,7 +232,7 @@ void set_board_info_env(void) -if (IS_ENABLED (CONFIG_NET )) { +if (IS_ENABLED (CONFIG_NET_LEGACY )) {and here
Quoted 4 lines
See above. This one seems ok, but I am not really planning to modify individual boards that I cannot test. This change would mean in a way that
CONFIG_NET_LWIPhas been tested with that board, which possibly isn't the case and I cannot guarantee that either.
OK
Regards,
Simon
Re: [PATCH 2/6] rename NET to NET_LEGACY
In reply to Quentin SchulzThanks for doing this Quentin
Quoted 5 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
Highlight that NET really is the legacy networking stack by renaming the option to
NET_LEGACY.
+1
Quoted 11 lines
This requires us to add an
SPL_NET_LEGACYalias toSPL_NETas otherwiseCONFIG_IS_ENABLED(NET_LEGACY)will not work for SPL.The "depends on !NET_LWIP" for
SPL_NETclearly highlights that it is using the legacy networking app so this seems fine to do.This also has the benefit of removing potential confusion on NET being a specific networking stack instead of "any" network stack.
Signed-off-by Quentin Schulz <[email protected]>
Quoted 1,161 lines
--- Makefile | 4 ++-- arch/arm/mach-stm32mp/soc.c | 2 +- board/beacon/imx8mp/imx8mp_beacon.c | 2 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/gateworks/venice/venice.c | 4 ++-- board/nxp/ls1043ardb/Makefile | 2 +- board/nxp/ls1046afrwy/Makefile | 2 +- board/nxp/ls1046ardb/Makefile | 2 +- .../imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/siemens/iot2050/board.c | 2 +- board/sophgo/milkv_duo/Makefile | 2 +- board/sophgo/milkv_duo/board.c | 2 +- board/theadorable/theadorable.c | 4 ++-- board/ti/am335x/board.c | 2 +- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 2 +- board/xilinx/common/board.c | 2 +- cmd/Kconfig | 12 ++++++------ cmd/Makefile | 2 +- cmd/bdinfo.c | 6 +++--- cmd/fastboot.c | 4 ++-- cmd/ufetch.c | 2 +- common/Kconfig | 2 +- common/board_r.c | 4 ++-- common/spl/Kconfig | 5 ++++- configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- doc/develop/bootstd/overview.rst | 2 +- doc/develop/pytest/usage.rst | 4 ++-- doc/usage/cmd/bdinfo.rst | 6 +++--- doc/usage/cmd/sntp.rst | 2 +- doc/usage/cmd/wget.rst | 2 +- drivers/dfu/Kconfig | 2 +- drivers/fastboot/Kconfig | 4 ++-- drivers/fastboot/fb_common.c | 4 ++-- drivers/net/Kconfig | 6 +++--- drivers/net/phy/Kconfig | 4 ++-- drivers/net/sandbox.c | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 +++++----- include/configs/stm32mp15_common.h | 2 +- include/configs/stm32mp23_common.h | 2 +- include/configs/stm32mp25_common.h | 2 +- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/net-common.h | 4 ++-- include/net-legacy.h | 2 +- lib/Kconfig | 2 +- lib/efi_loader/Kconfig | 4 ++-- net/Kconfig | 20 ++++++++++---------- net/Makefile | 6 +++--- test/cmd/Makefile | 2 +- test/cmd/bdinfo.c | 6 +++--- test/dm/eth.c | 6 +++--- test/py/tests/test_efi_fit.py | 2 +- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 ++-- test/py/tests/test_net.py | 2 +- 57 files changed, 104 insertions(+), 101 deletions(-)Makefile +2
-2@@ -1081,7 +1081,7 @@ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += env/ libs-y += lib/ libs-y += fs/ -libs-$(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)) += net/ +libs-$(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)) += net/ libs-y += disk/ libs-y += drivers/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/@@ -1373,7 +1373,7 @@ expect = $(foreach cfg,$(1),y) # 1: List of options to migrate to (e.g. "CONFIG_DM_MMC CONFIG_BLK") # 2: Name of component (e.g . "Ethernet drivers") # 3: Release deadline (e.g. "v202.07") -# 4: Condition to require before checking (e.g. "$(CONFIG_NET)") +# 4: Condition to require before checking (e.g. "$(CONFIG_NET_LEGACY)") # Note: Script avoids bash construct, hence the strange double 'if' # (patches welcome!) define deprecatedarch/arm/mach-stm32mp/soc.c +1
-1@@ -64,7 +64,7 @@ __weak int setup_mac_address(void)struct udevice *dev;int nb_eth, nb_otp, index; -if (!IS_ENABLED (CONFIG_NET )) +if (!IS_ENABLED (CONFIG_NET_LEGACY ))return 0 ; nb_eth =get_eth_nb ();board/beacon/imx8mp/imx8mp_beacon.c +1
-1@@ -14,7 +14,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if IS_ENABLED (CONFIG_NET ) +#if IS_ENABLED (CONFIG_NET_LEGACY )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)board/engicam/imx8mp/icore_mx8mp.c +1
-1@@ -30,7 +30,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)board/gateworks/venice/venice.c +2
-2@@ -47,7 +47,7 @@ int board_fit_config_name_match(const char *path)return -1 ; } -#if (IS_ENABLED (CONFIG_NET )) +#if (IS_ENABLED (CONFIG_NET_LEGACY ))int board_phy_config (struct phy_device *phydev) {unsigned short val;@@ -71,7 +71,7 @@ int board_phy_config(struct phy_device *phydev) return 0; } -#endif // IS_ENABLED(CONFIG_NET) +#endif // IS_ENABLED(CONFIG_NET_LEGACY) int board_init (void ) {board/nxp/ls1043ardb/Makefile +1
-1@@ -5,6 +5,6 @@ obj-y += ddr.o obj-y += ls1043ardb.o ifndef CONFIG_XPL_BUILD -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.o obj-y += cpld.o endifboard/nxp/ls1046afrwy/Makefile +1
-1@@ -4,4 +4,4 @@ obj-y += ddr.o obj-y += ls1046afrwy.o -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.oboard/nxp/ls1046ardb/Makefile +1
-1@@ -5,6 +5,6 @@ obj-y += ddr.o obj-y += ls1046ardb.o ifndef CONFIG_XPL_BUILD -obj-$(CONFIG_NET) += eth.o +obj-$(CONFIG_NET_LEGACY) += eth.o obj-y += cpld.o endifboard/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1
-1@@ -26,7 +26,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)board/siemens/iot2050/board.c +1
-1@@ -232,7 +232,7 @@ void set_board_info_env(void)env_set ("seboot_version" , buf);env_set ("fw_version" ,PLAIN_VERSION ); -if (IS_ENABLED (CONFIG_NET )) { +if (IS_ENABLED (CONFIG_NET_LEGACY )) {int mac_cnt; mac_cnt =sysinfo_get_item_count (sysinfo,SYSID_BOARD_MAC_ADDR );board/sophgo/milkv_duo/Makefile +1
-1@@ -3,4 +3,4 @@ # Copyright (c) 2024, Kongyang Liu <[email protected]> obj-y += board.o -obj-$(CONFIG_NET) += ethernet.o +obj-$(CONFIG_NET_LEGACY) += ethernet.oboard/sophgo/milkv_duo/board.c +1
-1@@ -12,7 +12,7 @@ int board_init(void)if (IS_ENABLED (CONFIG_SYSRESET_CV1800B ))device_bind_driver (gd->dm_root,"cv1800b_sysreset" ,"sysreset" ,NULL ); -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))cv1800b_ephy_init ();return 0 ;board/theadorable/theadorable.c +2
-2@@ -20,7 +20,7 @@#include <asm/arch/soc.h> #include <linux/delay.h> #include <linux/mbus.h> -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #include <netdev.h> #endif #include <u-boot/crc.h> @@ -244,7 +244,7 @@ int checkboard(void)return 0 ; } -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY int board_eth_init (struct bd_info *bis) {cpu_eth_init (bis);/* Built in controller(s) come first */ board/ti/am335x/board.c +1
-1@@ -911,7 +911,7 @@ int board_late_init(void)#endif /* CPSW plat */ -#if (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) && \ +#if (CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP)) && \ !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { {board/toradex/verdin-imx8mp/verdin-imx8mp.c +1
-1@@ -46,7 +46,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if IS_ENABLED (CONFIG_NET ) +#if IS_ENABLED (CONFIG_NET_LEGACY )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)board/xilinx/common/board.c +1
-1@@ -508,7 +508,7 @@ int board_late_init_xilinx(void) ret |=env_set_by_index ("uuid" , id, uuid); } -if (!(CONFIG_IS_ENABLED (NET ) || +if (!(CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )))continue ;cmd/Kconfig +6
-6@@ -1946,7 +1946,7 @@ config CMD_XXD endmenu -if NET || NET_LWIP +if NET_LEGACY || NET_LWIP menuconfig CMD_NET bool "Network commands"@@ -1954,7 +1954,7 @@ menuconfig CMD_NET if CMD_NET -if NET +if NET_LEGACY config CMD_BOOTP bool "bootp"@@ -2198,12 +2198,12 @@ config CMD_WOL help Wait for wake-on-lan Magic Packet -endif # if NET +endif # if NET_LEGACY config CMD_DHCP bool "dhcp" select PROT_DHCP_LWIP if NET_LWIP - select CMD_BOOTP if NET + select CMD_BOOTP if NET_LEGACY help Boot image via network using DHCP/TFTP protocol@@ -2259,7 +2259,7 @@ config CMD_PING config CMD_SNTP bool "sntp" - select PROT_UDP if NET + select PROT_UDP if NET_LEGACY select PROT_UDP_LWIP if NET_LWIP help Synchronize RTC via network@@ -2329,7 +2329,7 @@ config CMD_PXE endif # if CMD_NET -endif # NET || NET_LWIP +endif # NET_LEGACY || NET_LWIP menu "Misc commands"cmd/Makefile +1
-1@@ -131,7 +131,7 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -ifdef CONFIG_NET +ifdef CONFIG_NET_LEGACY obj-$(CONFIG_CMD_NET) += net.o net-common.o else ifdef CONFIG_NET_LWIP obj-$(CONFIG_CMD_NET) += net-common.ocmd/bdinfo.c +3
-3@@ -152,7 +152,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_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))print_eth ();bdinfo_print_num_l ("fdt_blob" , (ulong )map_to_sysmem (gd->fdt_blob));if (IS_ENABLED (CONFIG_VIDEO ))@@ -194,7 +194,7 @@ 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_NET ) && +if (!IS_ENABLED (CONFIG_NET_LEGACY ) && !IS_ENABLED (CONFIG_NET_LWIP ))return CMD_RET_USAGE ;print_eth ();@@ -221,7 +221,7 @@ U_BOOT_CMD( " - print all Board Info structure"#if CONFIG_IS_ENABLED (GETOPT ) "\n" -#if IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP ) +#if IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )"bdinfo -e\n" " - print Board Info related to network\n"#endif cmd/fastboot.c +2
-2@@ -16,7 +16,7 @@#include <linux/printk.h> #include <linux/stringify.h> -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int do_fastboot_udp (int argc,char *const argv[],uintptr_t buf_addr,size_t buf_size) {@@ -162,7 +162,7 @@ NXTARG:fastboot_init ((void *)buf_addr, buf_size); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )if (!strcmp (argv[1 ],"udp" ))return do_fastboot_udp (argc, argv, buf_addr, buf_size);if (!strcmp (argv[1 ],"tcp" ))cmd/ufetch.c +1
-1@@ -159,7 +159,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,break ;case FEATURES :printf ("Features:" RESET " " ); -if (IS_ENABLED (CONFIG_NET )) +if (IS_ENABLED (CONFIG_NET_LEGACY ))printf ("Net" );if (IS_ENABLED (CONFIG_EFI_LOADER ))printf (", EFI" );common/Kconfig +1
-1@@ -425,7 +425,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers.common/board_r.c +2
-2@@ -495,7 +495,7 @@ static int initr_boot_led_on(void)return 0 ; } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )static int initr_net (void ) {puts ("Net: " );@@ -756,7 +756,7 @@ static void initcall_run_r(void)#if CONFIG_IS_ENABLED (PCI_ENDPOINT )INITCALL (pci_ep_init);#endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )WATCHDOG_RESET ();INITCALL (initr_net);#endif common/spl/Kconfig +4
-1@@ -1151,7 +1151,7 @@ config SPL_DM_SPI_FLASH config SPL_NET bool "Support networking" - depends on NET + depends on NET_LEGACY select SPL_USE_TINY_PRINTF_POINTER_SUPPORT if SPL_USE_TINY_PRINTF help Enable support for network devices (such as Ethernet) in SPL.@@ -1160,6 +1160,9 @@ config SPL_NET the network stack uses a number of environment variables. See also SPL_ETH. +config SPL_NET_LEGACY + def_bool y if SPL_NET + config SPL_NET_VCI_STRING string "BOOTP Vendor Class Identifier string sent by SPL" depends on SPL_NETconfigs/am62px_evm_r5_ethboot_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_AM62P5=y CONFIG_TARGET_AM62P5_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk" -CONFIG_NET=y +CONFIG_NET_LEGACY=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=yconfigs/j722s_evm_r5_ethboot_defconfig +1
-1@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_J722S=y CONFIG_TARGET_J722S_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-j722s-r5-evm" -CONFIG_NET=y +CONFIG_NET_LEGACY=y CONFIG_SPL_DRIVERS_MISC=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=ydoc/develop/bootstd/overview.rst +1
-1@@ -422,7 +422,7 @@ includes the full set of commands, more error messages when things go wrong and bootmeth ordering with the bootmeths environment variable. You should probably also enable `CONFIG_BOOTSTD_DEFAULTS`, which provides -several filesystem and network features (if `CONFIG_NET` is enabled) so that +several filesystem and network features (if `CONFIG_NET_LEGACY` is enabled) so that a good selection of boot options is available. Some devicetree properties are supported in the bootstd node whendoc/develop/pytest/usage.rst +2
-2@@ -546,11 +546,11 @@ following annotation for a test requires ``CONFIG_EFI_LOADER=y``: Sometimes multiple configuration option supply the same functionality. If multiple arguments are passed to ``buildconfigspec()``, only one of the configuration options needs to be set. The following annotation requires that -either of ``CONFIG_NET`` or ``CONFIG_NET_LWIP`` is set: +either of ``CONFIG_NET_LEGACY`` or ``CONFIG_NET_LWIP`` is set: .. code-block:: python - @pytest.mark.buildconfigspec('net', 'net_lwip') + @pytest.mark.buildconfigspec('net_legacy', 'net_lwip') The ``notbuildconfigspec()`` annotation can be used to require a configuration option not to be set. The following annotation requires ``CONFIG_RISCV=n``:doc/usage/cmd/bdinfo.rst +3
-3@@ -124,12 +124,12 @@ Build current eth name of the active network device - Only shown if CONFIG_NET=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. IP addr network address, value of the environment variable *ipaddr* - Only shown if CONFIG_NET=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. fdt_blob address of U-Boot's own device tree, NULL if none@@ -173,5 +173,5 @@ The bdinfo command is available if CONFIG_CMD_BDI=y. The options to bdinfo are only available if CONFIG_GETOPT=y. -The ``-e`` option is additionally only available if CONFIG_NET=y or +The ``-e`` option is additionally only available if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y.doc/usage/cmd/sntp.rst +1
-1@@ -24,7 +24,7 @@ the server's IP address to be given on the command line or via the `ntpserverip` environment variable. The address of the NTP server does not need to be given if the DHCP server -provides one. The legacy network stack (`CONFIG_NET=y`) can only use the +provides one. The legacy network stack (`CONFIG_NET_LEGACY=y`) can only use the first NTP server provided in the `ntp-servers` DHCP option. When the network stack is lwIP (`CONFIG_NET_LWIP=y`) and DNS resolutiondoc/usage/cmd/wget.rst +1
-1@@ -26,7 +26,7 @@ In order to use HTTPS you will need to compile wget with lwIP support. Legacy syntax ~~~~~~~~~~~~~ -The legacy syntax is supported by the legacy network stack (CONFIG_NET=y) +The legacy syntax is supported by the legacy network stack (CONFIG_NET_LEGACY=y) as well as by the lwIP base network stack (CONFIG_NET_LWIP=y). It supports HTTP only.drivers/dfu/Kconfig +1
-1@@ -11,7 +11,7 @@ config DFU_OVER_USB config DFU_OVER_TFTP bool - depends on NET + depends on NET_LEGACY config DFU_WRITE_ALT booldrivers/fastboot/Kconfig +2
-2@@ -27,7 +27,7 @@ config USB_FUNCTION_FASTBOOT This enables the USB part of the fastboot gadget. config UDP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over UDP" help@@ -41,7 +41,7 @@ config UDP_FUNCTION_FASTBOOT_PORT The fastboot protocol requires a UDP port number. config TCP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over TCP" helpdrivers/fastboot/fb_common.c +2
-2@@ -191,13 +191,13 @@ void fastboot_handle_boot(int command, bool success)switch (command) {case FASTBOOT_COMMAND_BOOT :fastboot_boot (); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )net_set_state (NETLOOP_SUCCESS );#endif break ;case FASTBOOT_COMMAND_CONTINUE : -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )net_set_state (NETLOOP_SUCCESS );#endif break ;drivers/net/Kconfig +3
-3@@ -339,7 +339,7 @@ config ESSEDMA config ETH_SANDBOX depends on SANDBOX - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP default y bool "Sandbox: Mocked Ethernet driver" help@@ -350,7 +350,7 @@ config ETH_SANDBOX config ETH_SANDBOX_RAW depends on SANDBOX - depends on NET + depends on NET_LEGACY default y bool "Sandbox: Bridge to Linux Raw Sockets" help@@ -476,7 +476,7 @@ config FTMAC100 config FTGMAC100 bool "Ftgmac100 Ethernet Support" select PHYLIB - depends on NET + depends on NET_LEGACY help This driver supports the Faraday's FTGMAC100 Gigabit SoC Ethernet controller that can be found on Aspeed SoCs (whichdrivers/net/phy/Kconfig +2
-2@@ -7,7 +7,7 @@ config MV88E6352_SWITCH menuconfig PHYLIB bool "Ethernet PHY (physical media interface) support" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Enable Ethernet PHY (physical media interface) support.@@ -381,7 +381,7 @@ config PHY_FIXED config PHY_NCSI bool "NC-SI based PHY" - depends on NET + depends on NET_LEGACY endif #PHYLIBdrivers/net/sandbox.c +1
-1@@ -15,7 +15,7 @@/* * Structure definitions for network protocols. Since this file is used for -* both NET and NET_LWIP, and given that the two network stacks do have +* both NET_LEGACY and NET_LWIP, and given that the two network stacks do have * conflicting types (for instance struct icmp_hdr), it is on purpose that the * structures are defined locally with minimal dependencies -- <asm/types.h> is * included for the bit types and that's it. drivers/usb/gadget/Kconfig +1
-1@@ -232,7 +232,7 @@ endif # USB_GADGET_DOWNLOAD config USB_ETHER bool "USB Ethernet Gadget" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP default y if ARCH_SUNXI && USB_MUSB_GADGET help Creates an Ethernet network device through a USB peripheralenv/flags.c +5
-5@@ -22,7 +22,7 @@#include <env_internal.h> #endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#define ENV_FLAGS_NET_VARTYPE_REPS "im"#else #define ENV_FLAGS_NET_VARTYPE_REPS ""@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {"decimal" ,"hexadecimal" ,"boolean" , -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP)"IP address" , "MAC address", #endif@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end, *end = value; } -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )int eth_validate_ethaddr_str (const char *addr) {const char *end;@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value, enum env_flags_vartype type) {const char *end; -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )const char *cur;int i;#endif @@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,if (value[1 ] !='\0' )return -1 ;break ; -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )case env_flags_vartype_ipaddr: cur = value;for (i =0 ; i <4 ; i++) {include/configs/stm32mp15_common.h +1
-1@@ -41,7 +41,7 @@#define BOOT_TARGET_MMC2 (func)#endif -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)include/configs/stm32mp23_common.h +1
-1@@ -29,7 +29,7 @@#ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)include/configs/stm32mp25_common.h +1
-1@@ -25,7 +25,7 @@#ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE (func) func(PXE, pxe, na)#else #define BOOT_TARGET_PXE (func)include/env_callback.h +1
-1@@ -32,7 +32,7 @@#define DNS_CALLBACK #endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \include/env_flags.h +3
-3@@ -14,7 +14,7 @@ enum env_flags_vartype { env_flags_vartype_decimal, env_flags_vartype_hex, env_flags_vartype_bool, -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) env_flags_vartype_ipaddr, env_flags_vartype_macaddr, #endif@@ -41,7 +41,7 @@ enum env_flags_varaccess {#define CFG_ENV_FLAGS_LIST_STATIC ""#endif -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )#ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*"#else @@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags);*/ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags (int binflags); -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )/* * Check if a string has the format of an Ethernet MAC address */ include/net-common.h +2
-2@@ -235,7 +235,7 @@ int eth_rx(void); /* Check for received packets */*/ void reset_phy (void ); -#if CONFIG_IS_ENABLED (NET ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP )/** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs * @@ -485,7 +485,7 @@ int net_init(void);/* Called when a network operation fails to know if it should be re-tried */ int net_start_again (void ); -/* NET compatibility */ +/* NET_LEGACY compatibility */ enum proto_t ;int net_loop (enum proto_t protocol);include/net-legacy.h +1
-1@@ -281,7 +281,7 @@ 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 +#ifdef CONFIG_NET_LEGACY extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN ];/* Our root path */ #endif /** END OF BOOTP EXTENTIONS **/ lib/Kconfig +1
-1@@ -285,7 +285,7 @@ config PANIC_HANG config REGEX bool "Enable regular expression support" - default y if NET + default y if NET_LEGACY help If this variable is defined, U-Boot is linked against the SLRE (Super Light Regular Expression) library, which addslib/efi_loader/Kconfig +2
-2@@ -517,7 +517,7 @@ config EFI_RISCV_BOOT_PROTOCOL config EFI_IP4_CONFIG2_PROTOCOL bool "EFI_IP4_CONFIG2_PROTOCOL support" default y if ARCH_QEMU || SANDBOX - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Provides an implementation of the EFI_IP4_CONFIG2_PROTOCOL, this protocol can be used to set and get the current ip address and@@ -599,7 +599,7 @@ config EFI_BOOTMGR config EFI_HTTP_BOOT bool "EFI HTTP Boot support" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP select CMD_NET select CMD_DHCP select CMD_DNSnet/Kconfig +10
-10@@ -6,14 +6,14 @@ menu "Networking" choice prompt "Networking stack" - default NET + default NET_LEGACY config NO_NET bool "No networking support" help Do not include networking support -config NET +config NET_LEGACY bool "Legacy U-Boot networking stack" select NETDEVICES help@@ -27,14 +27,14 @@ config NET_LWIP 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 + and enabled via CONFIG_NET_LEGACY as well as other pieces of code that + depend on CONFIG_NET_LEGACY (such as cmd/net.c enabled via CONFIG_CMD_NET). + Therefore the two symbols CONFIG_NET_LEGACY and CONFIG_NET_LWIP are mutually exclusive. endchoice -if NET +if NET_LEGACY config ARP_TIMEOUT int "Milliseconds before trying ARP again"@@ -227,11 +227,11 @@ config IPV6 ip6addr, serverip6. If a u-boot command is capable to parse an IPv6 address and find it, it will force using IPv6 in the network stack. -endif # if NET +endif # if NET_LEGACY source "net/lwip/Kconfig" -if NET || NET_LWIP +if NET_LEGACY || NET_LWIP config BOOTDEV_ETH bool "Enable bootdev for ethernet"@@ -260,7 +260,7 @@ config DNS config WGET bool "Enable wget" - select PROT_TCP if NET + select PROT_TCP if NET_LEGACY select PROT_TCP_LWIP if NET_LWIP help Selecting this will enable wget, an interface to send HTTP requests@@ -276,7 +276,7 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET || NET_LWIP +endif # if NET_LEGACY || NET_LWIP config SYS_RX_ETH_BUFFER int "Number of receive packet buffers"net/Makefile +3
-3@@ -5,9 +5,9 @@ #ccflags-y += -DDEBUG -ifeq ($(CONFIG_NET),y) +ifeq ($(CONFIG_NET_LEGACY),y) -obj-$(CONFIG_NET) += arp.o +obj-$(CONFIG_NET_LEGACY) += arp.o obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_DNS) += dns.o@@ -37,7 +37,7 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif -ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y) +ifeq ($(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)),y) obj-$(CONFIG_DM_DSA) += dsa-uclass.o obj-$(CONFIG_$(PHASE_)DM_ETH) += eth-uclass.o obj-$(CONFIG_$(PHASE_)BOOTDEV_ETH) += eth_bootdev.otest/cmd/Makefile +1
-1@@ -39,7 +39,7 @@ obj-$(CONFIG_CMD_PWM) += pwm.o obj-$(CONFIG_CMD_READ) += rw.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o obj-$(CONFIG_CMD_TEMPERATURE) += temperature.o -ifdef CONFIG_NET +ifdef CONFIG_NET_LEGACY obj-$(CONFIG_CMD_WGET) += wget.o endif obj-$(CONFIG_ARM_FFA_TRANSPORT) += armffa.otest/cmd/bdinfo.c +3
-3@@ -172,7 +172,7 @@ static int bdinfo_test_all(struct unit_test_state *uts)ut_assertok (test_num_l (uts,"reloc off" , gd->reloc_off));ut_assert_nextline ("%-12s= %u-bit" ,"Build" , (uint )sizeof (void *) *8 ); -if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))ut_assertok (test_eth (uts));/* @@ -314,7 +314,7 @@ static int bdinfo_test_help(struct unit_test_state *uts)ut_assert_nextlinen ("bdinfo -a" );ut_assert_nextlinen (" - print all Board Info structure" );if (CONFIG_IS_ENABLED (GETOPT )) { -if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) { +if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) {ut_assert_nextlinen ("bdinfo -e" );ut_assert_nextlinen (" - print Board Info related to network" ); }@@ -348,7 +348,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts)ut_assertok (run_commandf ("bdinfo -e" ));if (!CONFIG_IS_ENABLED (GETOPT ))ut_assertok (bdinfo_test_all (uts)); -else if (IS_ENABLED (CONFIG_NET ) ||IS_ENABLED (CONFIG_NET_LWIP )) +else if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ))ut_assertok (test_eth (uts));ut_assert_console_end ();test/dm/eth.c +3
-3@@ -449,7 +449,7 @@ static int dm_test_net_retry(struct unit_test_state *uts) }DM_TEST (dm_test_net_retry,UTF_SCAN_FDT ); -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int sb_check_arp_reply (struct udevice *dev,void *packet,unsigned int len) {@@ -517,7 +517,7 @@ static int sb_with_async_arp_handler(struct udevice *dev, void *packet, }#endif -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int dm_test_eth_async_arp_reply (struct unit_test_state *uts) { net_ping_ip =string_to_ip ("1.1.2.2" );@@ -537,7 +537,7 @@ static int dm_test_eth_async_arp_reply(struct unit_test_state *uts)DM_TEST (dm_test_eth_async_arp_reply,UTF_SCAN_FDT );#endif -#if CONFIG_IS_ENABLED (NET ) +#if CONFIG_IS_ENABLED (NET_LEGACY )static int sb_check_ping_reply (struct udevice *dev,void *packet,unsigned int len) {test/py/tests/test_efi_fit.py +1
-1@@ -225,7 +225,7 @@ def test_efi_fit_launch(ubman): has_dhcp = ubman.config.buildconfig.get('config_cmd_dhcp', 'n') == 'y' if not has_dhcp: - ubman.log.warning('CONFIG_NET != y: Skipping static network setup') + ubman.log.warning('CONFIG_NET_LEGACY != y: Skipping static network setup') return False env_vars = ubman.config.env.get('env__net_static_env_vars', None)test/py/tests/test_efi_loader.py +1
-1@@ -98,7 +98,7 @@ def test_efi_setup_dhcp(ubman): global net_set_up net_set_up = True [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_efi_setup_static(ubman): """Set up the network using a static IP configuration.test/py/tests/test_fpga.py +2
-2@@ -506,7 +506,7 @@ def test_fpga_loadfs(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_fpga_secure_bit_auth(ubman): test_net.test_net_dhcp(ubman)@@ -534,7 +534,7 @@ def test_fpga_secure_bit_auth(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_fpga_secure_bit_img_auth_kup(ubman): test_net.test_net_dhcp(ubman)test/py/tests/test_net.py +1
-2@@ -201,7 +201,7 @@ def test_net_dhcp6(ubman): global net6_set_up net6_set_up = True [email protected]('net', 'net_lwip') [email protected]('net_legacy', 'net_lwip') def test_net_setup_static(ubman): """Set up a static IP configuration. --2.53.0
PATCH 3/6 net: make NET a menuconfig (and downgrade NO_NET to a simple config)
In reply to Quentin SchulzFrom: Quentin Schulz <[email protected]>
This will allow a bunch of simplifications across the code base. Disabling NET is the equivalent of today's NO_NET choice. This means that if NET is enabled, either the legacy or lwIP stack is necessarily selected, which allows us to simplify if NET_LEGACY || NET_LWIP into if NET in a later commit.
Config fragments - or defconfigs including other defconfigs - setting the network stack (NET_LEGACY or NET_LWIP) must also set NET (or unset NO_NET) if the config they apply to - or the included defconfigs - unsets NET (or selects NO_NET) as otherwise the NET_LEGACY and NET_LWIP symbols are unreachable. This is the case for the two defconfig modified in this commit.
NO_NET is now a convenience symbol which hides NET entirely to avoid modifying many defconfigs. If one selected NO_NET to disable the networking stack in the past, this will still work for now. Technically, we should be using the "transitional" Kconfig attribute but that is only available since Kconfig from Linux kernel v6.18 and we're on 6.1 right now.
Note that this moves CONFIG_SYS_RX_ETH_BUFFER from under the Network menu back into the main menu as it seems like it needs to be defined even when there's no need for NET support at all and menuconfig option doesn't work the same way as a menu.
---
I'd say we should have everything net-related depends on NET as well, so that disabling networking support with NET=n is also disabling anything related (e.g. Ethernet controller and PHY drivers, USB Ethernet, USB gadget CDC/RNDIS, network CLI commands, etc.).
--- configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- net/Kconfig | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-)
configs/am62px_evm_r5_ethboot_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_AM62P5=y CONFIG_TARGET_AM62P5_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk" -CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not set CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y
configs/j722s_evm_r5_ethboot_defconfig +1 -1
@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y CONFIG_SOC_K3_J722S=y CONFIG_TARGET_J722S_R5_EVM=y CONFIG_DEFAULT_DEVICE_TREE="k3-j722s-r5-evm" -CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not set CONFIG_SPL_DRIVERS_MISC=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_DMA=y
net/Kconfig +12 -11
@@ -2,17 +2,22 @@ # Network configuration # -menu "Networking" +config NO_NET + bool "Disable networking" + help + Transitional variable. Equivalent to setting NET=n. + +menuconfig NET + bool "Networking" + depends on !NO_NET + default y + +if NET choice prompt "Networking stack" default NET_LEGACY -config NO_NET - bool "No networking support" - help - Do not include networking support - config NET_LEGACY bool "Legacy U-Boot networking stack" select NETDEVICES
@@ -231,8 +236,6 @@ endif # if NET_LEGACY source "net/lwip/Kconfig" -if NET_LEGACY || NET_LWIP - config BOOTDEV_ETH bool "Enable bootdev for ethernet" depends on BOOTSTD
@@ -276,7 +279,7 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET_LEGACY || NET_LWIP +endif # if NET config SYS_RX_ETH_BUFFER int "Number of receive packet buffers"
@@ -286,5 +289,3 @@ config SYS_RX_ETH_BUFFER 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. - -endmenu
Signature · 1 line
2.53.0
Re: [PATCH 3/6] net: make NET a menuconfig (and downgrade NO_NET to a simple config)
Quoted 27 lines · Quentin Schulz
net: make NET a menuconfig (and downgrade
NO_NETto a simple config)This will allow a bunch of simplifications across the code base. Disabling NET is the equivalent of today's
NO_NETchoice. This means that if NET is enabled, either the legacy or lwIP stack is necessarily selected, which allows us to simplify ifNET_LEGACY||NET_LWIPinto if NET in a later commit.Config fragments - or defconfigs including other defconfigs - setting the network stack (
NET_LEGACYorNET_LWIP) must also set NET (or unsetNO_NET) if the config they apply to - or the included defconfigs - unsets NET (or selectsNO_NET) as otherwise theNET_LEGACYandNET_LWIPsymbols are unreachable. This is the case for the two defconfig modified in this commit.
NO_NETis now a convenience symbol which hides NET entirely to avoid modifying many defconfigs. If one selectedNO_NETto disable the networking stack in the past, this will still work for now. Technically, we should be using the 'transitional'Kconfigattribute but that is only available sinceKconfigfrom Linux kernel v6.18 and we're on 6.1 right now.Note that this moves
CONFIG_SYS_RX_ETH_BUFFERfrom under the Network menu back into the main menu as it seems like it needs to be defined even when there's no need for NET support at all and menuconfig option doesn't work the same way as a menu.
Quoted 6 lines
Signed-off-by Quentin Schulz <[email protected]>configs/am62px_evm_r5_ethboot_defconfig | 2 +-
configs/j722s_evm_r5_ethboot_defconfig | 2 +- net/Kconfig | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-)
Re: [PATCH 3/6] net: make NET a menuconfig (and downgrade NO_NET to a simple config)
In reply to Quentin SchulzAm 20. April 2026 13:36:09 MESZ schrieb Quentin Schulz <[email protected]>:
Quoted 48 lines
From: Quentin Schulz <[email protected]>
This will allow a bunch of simplifications across the code base. Disabling NET is the equivalent of today's
NO_NETchoice. This means that if NET is enabled, either the legacy or lwIP stack is necessarily selected, which allows us to simplify ifNET_LEGACY||NET_LWIPinto if NET in a later commit.Config fragments - or defconfigs including other defconfigs - setting the network stack (
NET_LEGACYorNET_LWIP) must also set NET (or unsetNO_NET) if the config they apply to - or the included defconfigs - unsets NET (or selectsNO_NET) as otherwise theNET_LEGACYandNET_LWIPsymbols are unreachable. This is the case for the two defconfig modified in this commit.
NO_NETis now a convenience symbol which hides NET entirely to avoid modifying many defconfigs. If one selectedNO_NETto disable the networking stack in the past, this will still work for now. Technically, we should be using the "transitional"Kconfigattribute but that is only available sinceKconfigfrom Linux kernel v6.18 and we're on 6.1 right now.Note that this moves
CONFIG_SYS_RX_ETH_BUFFERfrom under the Network menu back into the main menu as it seems like it needs to be defined even when there's no need for NET support at all and menuconfig option doesn't work the same way as a menu.Signed-off-by Quentin Schulz <[email protected]>---
I'd say we should have everything net-related depends on NET as well, so that disabling networking support with NET=n is also disabling anything related (e.g. Ethernet controller and PHY drivers, USB Ethernet, USB gadget CDC/RNDIS, network CLI commands, etc.).
---configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- net/Kconfig | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-)configs/am62px_evm_r5_ethboot_defconfig +0
-0@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y
CONFIG_SOC_K3_AM62P5=yCONFIG_TARGET_AM62P5_R5_EVM=yCONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk"
configs/am62px_evm_r5_ethboot_defconfig
Quoted 2 lines
configs/am62px_evm_r5_ethboot_defconfig +1
-1-CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not set
Does this imply that NET_LEGACY is the default? Choosing LEGACY as default would not be plausible to me. We should use LWIP as default. Then every new board will use it, hopefully.
Best regards
Heinrich
Quoted 74 lines
CONFIG_SPL_BOARD_INIT=yCONFIG_SPL_DMA=yCONFIG_SPL_ENV_SUPPORT=yconfigs/j722s_evm_r5_ethboot_defconfig +0
-0@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y
CONFIG_SOC_K3_J722S=yCONFIG_TARGET_J722S_R5_EVM=yCONFIG_DEFAULT_DEVICE_TREE="k3-j722s-r5-evm"configs/j722s_evm_r5_ethboot_defconfig +1
-1-CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not set
CONFIG_SPL_DRIVERS_MISC=yCONFIG_SPL_BOARD_INIT=yCONFIG_SPL_DMA=ynet/Kconfig +11
-1@@ -2,17 +2,22 @@ # Network configuration # -menu "Networking" +config NO_NET + bool "Disable networking" + help + Transitional variable. Equivalent to setting NET=n. + +menuconfig NET + bool "Networking" + depends on !NO_NET + default y + +if NETchoice
prompt "Networking stack"
defaultNET_LEGACYnet/Kconfig +0
-5-config NO_NET - bool "No networking support" - help - Do not include networking support -config
NET_LEGACY
bool "Legacy U-Boot networking stack"
select NETDEVICESnet/Kconfig +0
-0@@ -231,8 +236,6 @@ endif # if NET_LEGACYsource "
net/lwip/Kconfig"net/Kconfig +0
-2-if NET_LEGACY || NET_LWIP -config
BOOTDEV_ETH
bool "Enable bootdev for ethernet"
depends on BOOTSTDnet/Kconfig +1
-1@@ -276,7 +279,7 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET_LEGACY || NET_LWIP +endif # if NETconfig
SYS_RX_ETH_BUFFER
int "Number of receive packet buffers"net/Kconfig +0
-2@@ -286,5 +289,3 @@ config SYS_RX_ETH_BUFFER 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. - -endmenu
Re: [PATCH 3/6] net: make NET a menuconfig (and downgrade NO_NET to a simple config)
Hi Heinrich,
Quoted 41 lines · Heinrich Schuchardt
Am 20. April 2026 13:36:09 MESZ schrieb Quentin Schulz <[email protected]>:
Quoted 40 lines
From: Quentin Schulz <[email protected]>
This will allow a bunch of simplifications across the code base. Disabling NET is the equivalent of today's
NO_NETchoice. This means that if NET is enabled, either the legacy or lwIP stack is necessarily selected, which allows us to simplify ifNET_LEGACY||NET_LWIPinto if NET in a later commit.Config fragments - or defconfigs including other defconfigs - setting the network stack (
NET_LEGACYorNET_LWIP) must also set NET (or unsetNO_NET) if the config they apply to - or the included defconfigs - unsets NET (or selectsNO_NET) as otherwise theNET_LEGACYandNET_LWIPsymbols are unreachable. This is the case for the two defconfig modified in this commit.
NO_NETis now a convenience symbol which hides NET entirely to avoid modifying many defconfigs. If one selectedNO_NETto disable the networking stack in the past, this will still work for now. Technically, we should be using the "transitional"Kconfigattribute but that is only available sinceKconfigfrom Linux kernel v6.18 and we're on 6.1 right now.Note that this moves
CONFIG_SYS_RX_ETH_BUFFERfrom under the Network menu back into the main menu as it seems like it needs to be defined even when there's no need for NET support at all and menuconfig option doesn't work the same way as a menu.Signed-off-by Quentin Schulz <[email protected]>---
I'd say we should have everything net-related depends on NET as well, so that disabling networking support with NET=n is also disabling anything related (e.g. Ethernet controller and PHY drivers, USB Ethernet, USB gadget CDC/RNDIS, network CLI commands, etc.).
---configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- net/Kconfig | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-)
Quoted 13 lines
configs/am62px_evm_r5_ethboot_defconfig
Quoted 10 lines
configs/am62px_evm_r5_ethboot_defconfig +0
-0@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y
CONFIG_SOC_K3_AM62P5=yCONFIG_TARGET_AM62P5_R5_EVM=yCONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk"configs/am62px_evm_r5_ethboot_defconfig +1
-1-CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not setDoes this imply that
NET_LEGACYis the default? Choosing LEGACY as default would not be plausible to me. We should use LWIP as default. Then every new board will use it, hopefully.
(below, "current" means the value in master branch, so before this series is applied).
(current) CONFIG_NET is the default already, see https://source.denx.de/u-boot/u-boot/-/blob/master/Kconfig#L794-L824. This series does not aim to change anything but the name of the symbols. Yes, we could make NET_LWIP the new default stack, but not in this series. Also, we have an issue that if you enable SPL_NET you need the legacy stack, even in proper (according to https://source.denx.de/u-boot/u-boot/-/blob/master/common/spl/Kconfig#L1152-L1154). So we would need to tackle this first (we don't necessarily need to support lwIP in SPL, just that the choice in SPL shouldn't impact the choice in proper).
If you're asking about this defconfig specifically, it's simply because it is not a typical defconfig. It includes configs/am62px_evm_r5_defconfig which sets CONFIG_NO_NET=y. Because NO_NET used to (before this series) be a choice with (current) NET and NET_LWIP, am62px_evm_r5_ethboot_defconfig needed to override it with another choice, namely (current) NET. Because NET_LEGACY is automatically selected when NO_NET is unset (due to NET default y), we only need to unset NO_NET in configs/am62px_evm_r5_ethboot_defconfig to restore the current state of enabling the legacy stack (current NET, now NET_LEGACY). This is not changing anything, just moving things around.
Does this answer your question?
Cheers,
Quentin
Heinrich Schuchardt
Acked-byRe: [PATCH 3/6] net: make NET a menuconfig (and downgrade NO_NET to a simple config)
Am 21. April 2026 10:37:54 MESZ schrieb Quentin Schulz <[email protected]>:
Quoted 60 lines
Hi Heinrich,
Quoted 41 lines · Heinrich Schuchardt
Am 20. April 2026 13:36:09 MESZ schrieb Quentin Schulz <[email protected]>:
Quoted 40 lines
From: Quentin Schulz <[email protected]>
This will allow a bunch of simplifications across the code base. Disabling NET is the equivalent of today's
NO_NETchoice. This means that if NET is enabled, either the legacy or lwIP stack is necessarily selected, which allows us to simplify ifNET_LEGACY||NET_LWIPinto if NET in a later commit.Config fragments - or defconfigs including other defconfigs - setting the network stack (
NET_LEGACYorNET_LWIP) must also set NET (or unsetNO_NET) if the config they apply to - or the included defconfigs - unsets NET (or selectsNO_NET) as otherwise theNET_LEGACYandNET_LWIPsymbols are unreachable. This is the case for the two defconfig modified in this commit.
NO_NETis now a convenience symbol which hides NET entirely to avoid modifying many defconfigs. If one selectedNO_NETto disable the networking stack in the past, this will still work for now. Technically, we should be using the "transitional"Kconfigattribute but that is only available sinceKconfigfrom Linux kernel v6.18 and we're on 6.1 right now.Note that this moves
CONFIG_SYS_RX_ETH_BUFFERfrom under the Network menu back into the main menu as it seems like it needs to be defined even when there's no need for NET support at all and menuconfig option doesn't work the same way as a menu.Signed-off-by Quentin Schulz <[email protected]>---
I'd say we should have everything net-related depends on NET as well, so that disabling networking support with NET=n is also disabling anything related (e.g. Ethernet controller and PHY drivers, USB Ethernet, USB gadget CDC/RNDIS, network CLI commands, etc.).
---configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- net/Kconfig | 23 ++++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-)Quoted 13 lines
configs/am62px_evm_r5_ethboot_defconfig
Quoted 10 lines
configs/am62px_evm_r5_ethboot_defconfig +0
-0@@ -5,7 +5,7 @@ CONFIG_ARCH_K3=y
CONFIG_SOC_K3_AM62P5=yCONFIG_TARGET_AM62P5_R5_EVM=yCONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk"configs/am62px_evm_r5_ethboot_defconfig +1
-1-CONFIG_NET_LEGACY=y +# CONFIG_NO_NET is not setDoes this imply that
NET_LEGACYis the default? Choosing LEGACY as default would not be plausible to me. We should use LWIP as default. Then every new board will use it, hopefully.(below, "current" means the value in master branch, so before this series is applied).
Quoted 8 lines
(current)
CONFIG_NETis the default already, see https://source.denx.de/u-boot/u-boot/-/blob/master/Kconfig#L794-L824. This series does not aim to change anything but the name of the symbols. Yes, we could makeNET_LWIPthe new default stack, but not in this series. Also, we have an issue that if you enableSPL_NETyou need the legacy stack, even in proper (according to https://source.denx.de/u-boot/u-boot/-/blob/master/common/spl/Kconfig#L1152-L1154). So we would need to tackle this first (we don't necessarily need to support lwIP in SPL, just that the choice in SPL shouldn't impact the choice in proper).If you're asking about this defconfig specifically, it's simply because it is not a typical defconfig. It includes configs/am62px_evm_r5_defconfig which sets
CONFIG_NO_NET=y. BecauseNO_NETused to (before this series) be a choice with (current) NET andNET_LWIP,am62px_evm_r5_ethboot_defconfigneeded to override it with another choice, namely (current) NET. BecauseNET_LEGACYis automatically selected whenNO_NETis unset (due to NET default y), we only need to unsetNO_NETin configs/am62px_evm_r5_ethboot_defconfig to restore the current state of enabling the legacy stack (current NET, nowNET_LEGACY). This is not changing anything, just moving things around.Does this answer your question?
Cheers,
Quentin
PATCH 4/6 simplify NET_LEGACY || NET_LWIP condition with NET condition
In reply to Quentin SchulzFrom: Quentin Schulz <[email protected]>
Since the move to make NET a menuconfig and NO_NET a synonym of NET=n, when NET is enabled, NET_LEGACY || NET_LWIP is necessarily true, so let's simplify the various checks across the codebase.
SPL_NET_LWIP doesn't exist but SPL_NET_LEGACY is an alias for SPL_NET so the proper symbol is still defined in SPL whenever needed.
--- Makefile | 2 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/ti/am335x/board.c | 2 +- board/xilinx/common/board.c | 3 +-- cmd/Kconfig | 4 ++-- cmd/bdinfo.c | 7 +++---- common/Kconfig | 2 +- common/board_r.c | 4 ++-- doc/usage/cmd/bdinfo.rst | 7 +++---- drivers/net/Kconfig | 2 +- drivers/net/phy/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 +++++----- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/net-common.h | 2 +- lib/efi_loader/Kconfig | 4 ++-- net/Makefile | 2 +- test/cmd/bdinfo.c | 6 +++--- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 ++-- test/py/tests/test_net.py | 2 +- 23 files changed, 39 insertions(+), 42 deletions(-)
Makefile +1 -1
@@ -1081,7 +1081,7 @@ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += env/ libs-y += lib/ libs-y += fs/ -libs-$(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)) += net/ +libs-$(CONFIG_NET) += net/ libs-y += disk/ libs-y += drivers/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
board/engicam/imx8mp/icore_mx8mp.c +1 -1
@@ -30,7 +30,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +1 -1
@@ -26,7 +26,7 @@ static void setup_fec(void)setbits_le32 (&gpr->gpr[1 ],BIT (22 )); } -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )int board_phy_config (struct phy_device *phydev) {if (phydev->drv->config)
board/ti/am335x/board.c +1 -1
@@ -911,7 +911,7 @@ int board_late_init(void)#endif /* CPSW plat */ -#if (CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP)) && \ +#if CONFIG_IS_ENABLED(NET) && \ !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { {
board/xilinx/common/board.c +1 -2
@@ -508,8 +508,7 @@ int board_late_init_xilinx(void) ret |=env_set_by_index ("uuid" , id, uuid); } -if (!(CONFIG_IS_ENABLED (NET_LEGACY ) || -CONFIG_IS_ENABLED (NET_LWIP ))) +if (!CONFIG_IS_ENABLED (NET ))continue ;for (i =0 ; i <EEPROM_HDR_NO_OF_MAC_ADDR ; i++) {
cmd/Kconfig +2 -2
@@ -1946,7 +1946,7 @@ config CMD_XXD endmenu -if NET_LEGACY || NET_LWIP +if NET menuconfig CMD_NET bool "Network commands"
@@ -2329,7 +2329,7 @@ config CMD_PXE endif # if CMD_NET -endif # NET_LEGACY || NET_LWIP +endif # NET menu "Misc commands"
cmd/bdinfo.c +3 -4
@@ -152,7 +152,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_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET ))print_eth ();bdinfo_print_num_l ("fdt_blob" , (ulong )map_to_sysmem (gd->fdt_blob));if (IS_ENABLED (CONFIG_VIDEO ))
@@ -194,8 +194,7 @@ 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_NET_LEGACY ) && - !IS_ENABLED (CONFIG_NET_LWIP )) +if (!IS_ENABLED (CONFIG_NET ))return CMD_RET_USAGE ;print_eth ();return CMD_RET_SUCCESS ;
@@ -221,7 +220,7 @@ U_BOOT_CMD( " - print all Board Info structure"#if CONFIG_IS_ENABLED (GETOPT ) "\n" -#if IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP ) +#if IS_ENABLED (CONFIG_NET )"bdinfo -e\n" " - print Board Info related to network\n"#endif
common/Kconfig +1 -1
@@ -425,7 +425,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET_LEGACY || NET_LWIP + depends on NET help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers.
common/board_r.c +2 -2
@@ -495,7 +495,7 @@ static int initr_boot_led_on(void)return 0 ; } -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )static int initr_net (void ) {puts ("Net: " );
@@ -756,7 +756,7 @@ static void initcall_run_r(void)#if CONFIG_IS_ENABLED (PCI_ENDPOINT )INITCALL (pci_ep_init);#endif -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )WATCHDOG_RESET ();INITCALL (initr_net);#endif
doc/usage/cmd/bdinfo.rst +3 -4
@@ -124,12 +124,12 @@ Build current eth name of the active network device - Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET=y. IP addr network address, value of the environment variable *ipaddr* - Only shown if CONFIG_NET_LEGACY=y or CONFIG_NET_LWIP=y. + Only shown if CONFIG_NET=y. fdt_blob address of U-Boot's own device tree, NULL if none
@@ -173,5 +173,4 @@ The bdinfo command is available if CONFIG_CMD_BDI=y. The options to bdinfo are only available if CONFIG_GETOPT=y. -The ``-e`` option is additionally only available if CONFIG_NET_LEGACY=y or -CONFIG_NET_LWIP=y. +The ``-e`` option is additionally only available if CONFIG_NET=y.
drivers/net/Kconfig +1 -1
@@ -339,7 +339,7 @@ config ESSEDMA config ETH_SANDBOX depends on SANDBOX - depends on NET_LEGACY || NET_LWIP + depends on NET default y bool "Sandbox: Mocked Ethernet driver" help
drivers/net/phy/Kconfig +1 -1
@@ -7,7 +7,7 @@ config MV88E6352_SWITCH menuconfig PHYLIB bool "Ethernet PHY (physical media interface) support" - depends on NET_LEGACY || NET_LWIP + depends on NET help Enable Ethernet PHY (physical media interface) support.
drivers/usb/gadget/Kconfig +1 -1
@@ -232,7 +232,7 @@ endif # USB_GADGET_DOWNLOAD config USB_ETHER bool "USB Ethernet Gadget" - depends on NET_LEGACY || NET_LWIP + depends on NET default y if ARCH_SUNXI && USB_MUSB_GADGET help Creates an Ethernet network device through a USB peripheral
env/flags.c +5 -5
@@ -22,7 +22,7 @@#include <env_internal.h> #endif -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )#define ENV_FLAGS_NET_VARTYPE_REPS "im"#else #define ENV_FLAGS_NET_VARTYPE_REPS ""
@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {"decimal" ,"hexadecimal" ,"boolean" , -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET)"IP address" , "MAC address", #endif
@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end, *end = value; } -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )int eth_validate_ethaddr_str (const char *addr) {const char *end;
@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value, enum env_flags_vartype type) {const char *end; -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )const char *cur;int i;#endif
@@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,if (value[1 ] !='\0' )return -1 ;break ; -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )case env_flags_vartype_ipaddr: cur = value;for (i =0 ; i <4 ; i++) {
include/env_callback.h +1 -1
@@ -32,7 +32,7 @@#define DNS_CALLBACK #endif -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )#define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \
include/env_flags.h +3 -3
@@ -14,7 +14,7 @@ enum env_flags_vartype { env_flags_vartype_decimal, env_flags_vartype_hex, env_flags_vartype_bool, -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) env_flags_vartype_ipaddr, env_flags_vartype_macaddr, #endif
@@ -41,7 +41,7 @@ enum env_flags_varaccess {#define CFG_ENV_FLAGS_LIST_STATIC ""#endif -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )#ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*"#else
@@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags);*/ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags (int binflags); -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )/* * Check if a string has the format of an Ethernet MAC address */
include/net-common.h +1 -1
@@ -235,7 +235,7 @@ int eth_rx(void); /* Check for received packets */*/ void reset_phy (void ); -#if CONFIG_IS_ENABLED (NET_LEGACY ) ||CONFIG_IS_ENABLED (NET_LWIP ) +#if CONFIG_IS_ENABLED (NET )/** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs *
lib/efi_loader/Kconfig +2 -2
@@ -517,7 +517,7 @@ config EFI_RISCV_BOOT_PROTOCOL config EFI_IP4_CONFIG2_PROTOCOL bool "EFI_IP4_CONFIG2_PROTOCOL support" default y if ARCH_QEMU || SANDBOX - depends on NET_LEGACY || NET_LWIP + depends on NET help Provides an implementation of the EFI_IP4_CONFIG2_PROTOCOL, this protocol can be used to set and get the current ip address and
@@ -599,7 +599,7 @@ config EFI_BOOTMGR config EFI_HTTP_BOOT bool "EFI HTTP Boot support" - depends on NET_LEGACY || NET_LWIP + depends on NET select CMD_NET select CMD_DHCP select CMD_DNS
net/Makefile +1 -1
@@ -37,7 +37,7 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif -ifeq ($(filter y,$(CONFIG_NET_LEGACY) $(CONFIG_NET_LWIP)),y) +ifeq ($(CONFIG_NET),y) obj-$(CONFIG_DM_DSA) += dsa-uclass.o obj-$(CONFIG_$(PHASE_)DM_ETH) += eth-uclass.o obj-$(CONFIG_$(PHASE_)BOOTDEV_ETH) += eth_bootdev.o
test/cmd/bdinfo.c +3 -3
@@ -172,7 +172,7 @@ static int bdinfo_test_all(struct unit_test_state *uts)ut_assertok (test_num_l (uts,"reloc off" , gd->reloc_off));ut_assert_nextline ("%-12s= %u-bit" ,"Build" , (uint )sizeof (void *) *8 ); -if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) +if (IS_ENABLED (CONFIG_NET ))ut_assertok (test_eth (uts));/*
@@ -314,7 +314,7 @@ static int bdinfo_test_help(struct unit_test_state *uts)ut_assert_nextlinen ("bdinfo -a" );ut_assert_nextlinen (" - print all Board Info structure" );if (CONFIG_IS_ENABLED (GETOPT )) { -if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) { +if (IS_ENABLED (CONFIG_NET )) {ut_assert_nextlinen ("bdinfo -e" );ut_assert_nextlinen (" - print Board Info related to network" ); }
@@ -348,7 +348,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts)ut_assertok (run_commandf ("bdinfo -e" ));if (!CONFIG_IS_ENABLED (GETOPT ))ut_assertok (bdinfo_test_all (uts)); -else if (IS_ENABLED (CONFIG_NET_LEGACY ) ||IS_ENABLED (CONFIG_NET_LWIP )) +else if (IS_ENABLED (CONFIG_NET ))ut_assertok (test_eth (uts));ut_assert_console_end ();
test/py/tests/test_efi_loader.py +1 -1
@@ -98,7 +98,7 @@ def test_efi_setup_dhcp(ubman): global net_set_up net_set_up = True [email protected]('net_legacy', 'net_lwip') [email protected]('net') def test_efi_setup_static(ubman): """Set up the network using a static IP configuration.
test/py/tests/test_fpga.py +2 -2
@@ -506,7 +506,7 @@ def test_fpga_loadfs(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net_legacy', 'net_lwip') [email protected]('net') def test_fpga_secure_bit_auth(ubman): test_net.test_net_dhcp(ubman)
@@ -534,7 +534,7 @@ def test_fpga_secure_bit_auth(ubman): @pytest.mark.buildconfigspec('cmd_fpga_load_secure') @pytest.mark.buildconfigspec('cmd_net') @pytest.mark.buildconfigspec('cmd_dhcp') [email protected]('net_legacy', 'net_lwip') [email protected]('net') def test_fpga_secure_bit_img_auth_kup(ubman): test_net.test_net_dhcp(ubman)
test/py/tests/test_net.py +1 -1
@@ -201,7 +201,7 @@ def test_net_dhcp6(ubman): global net6_set_up net6_set_up = True [email protected]('net_legacy', 'net_lwip') [email protected]('net') def test_net_setup_static(ubman): """Set up a static IP configuration.
Signature · 1 line
2.53.0
Re: [PATCH 4/6] simplify NET_LEGACY || NET_LWIP condition with NET condition
Quoted 27 lines · Quentin Schulz
simplify
NET_LEGACY||NET_LWIPcondition with NET conditionSince the move to make NET a menuconfig and
NO_NETa synonym of NET=n, when NET is enabled,NET_LEGACY||NET_LWIPis necessarily true, so let's simplify the various checks across the codebase.
SPL_NET_LWIPdoesn't exist butSPL_NET_LEGACYis an alias forSPL_NETso the proper symbol is still defined in SPL whenever needed.Signed-off-by Quentin Schulz <[email protected]>
Makefile| 2 +-board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/ti/am335x/board.c | 2 +- board/xilinx/common/board.c | 3 +-- cmd/Kconfig | 4 ++-- cmd/bdinfo.c | 7 +++---- common/Kconfig | 2 +- common/board_r.c | 4 ++-- doc/usage/cmd/bdinfo.rst | 7 +++---- drivers/net/Kconfig | 2 +- drivers/net/phy/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 +++++----- include/env_callback.h | 2 +- include/env_flags.h | 6 +++---
Quoted 8 lines
include/net-common.h | 2 +- lib/efi_loader/Kconfig | 4 ++-- net/Makefile | 2 +- test/cmd/bdinfo.c | 6 +++--- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 ++-- test/py/tests/test_net.py | 2 +- 23 files changed, 39 insertions(+), 42 deletions(-)
PATCH 5/6 doc: remove mention to non-existing TPL_NET
In reply to Quentin SchulzFrom: Quentin Schulz <[email protected]>
TPL_NET symbol never existed in the first place, so let's remove this misleading piece of documentation.
--- doc/usage/spl_boot.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
doc/usage/spl_boot.rst +1 -1
@@ -253,7 +253,7 @@ Ethernet a TFTP server and binary name. The binary is downloaded via the TFTP protocol. Required configuration settings include: - * CONFIG_SPL_NET=y or CONFIG_TPL_NET=y + * CONFIG_SPL_NET=y * CONFIG_SPL_ETH_DEVICE=y or CONFIG_DM_USB_GADGET=y
Signature · 1 line
2.53.0
Re: [PATCH 5/6] doc: remove mention to non-existing TPL_NET
Quoted 10 lines · Quentin Schulz
doc: remove mention to non-existing
TPL_NET
TPL_NETsymbol never existed in the first place, so let's remove this misleading piece of documentation.Fixes 143c9a7e9d68 ("doc: describe TPL/VPL/SPL boot")Signed-off-by Quentin Schulz <[email protected]>
doc/usage/spl_boot.rst| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 6/6 boot: remove NO_NET use
In reply to Quentin SchulzFrom: Quentin Schulz <[email protected]>
NO_NET is now a transitional symbol which may eventually be removed. Its meaning is the opposite of the new meaning of NET (that is, any networking stack).
Update the symbol dependency by using NET instead of !NO_NET.
--- boot/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
boot/Kconfig +4 -4
@@ -431,12 +431,12 @@ config BOOT_DEFAULTS_CMDS select CMD_FAT select CMD_FS_GENERIC select CMD_PART if PARTITIONS - select CMD_DHCP if CMD_NET && !NO_NET - select CMD_PING if CMD_NET && !NO_NET - select CMD_PXE if CMD_NET && !NO_NET + select CMD_DHCP if CMD_NET && NET + select CMD_PING if CMD_NET && NET + select CMD_PXE if CMD_NET && NET select CMD_BOOTI if ARM64 && LMB select CMD_BOOTZ if ARM && !ARM64 && LMB - imply CMD_MII if CMD_NET && !NO_NET + imply CMD_MII if CMD_NET && NET config BOOT_DEFAULTS bool # Common defaults for standard boot and distroboot
Signature · 1 line
2.53.0
Re: [PATCH 6/6] boot: remove NO_NET use
Quoted 6 lines · Quentin Schulz
boot: remove
NO_NETuse
NO_NETis now a transitional symbol which may eventually be removed. Its meaning is the opposite of the new meaning of NET (that is, any networking stack).
Quoted 6 lines
Update the symbol dependency by using NET instead of !NO_NET.
Signed-off-by Quentin Schulz <[email protected]>boot/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Re: [PATCH 6/6] boot: remove NO_NET use
In reply to Quentin SchulzQuoted 10 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
NO_NETis now a transitional symbol which may eventually be removed. Its meaning is the opposite of the new meaning of NET (that is, any networking stack).Update the symbol dependency by using NET instead of !NO_NET.
Signed-off-by Quentin Schulz <[email protected]>
Quoted 29 lines
--- boot/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)boot/Kconfig +4
-5@@ -431,12 +431,12 @@ config BOOT_DEFAULTS_CMDS select CMD_FAT select CMD_FS_GENERIC select CMD_PART if PARTITIONS - select CMD_DHCP if CMD_NET && !NO_NET - select CMD_PING if CMD_NET && !NO_NET - select CMD_PXE if CMD_NET && !NO_NET + select CMD_DHCP if CMD_NET && NET + select CMD_PING if CMD_NET && NET + select CMD_PXE if CMD_NET && NET select CMD_BOOTI if ARM64 && LMB select CMD_BOOTZ if ARM && !ARM64 && LMB - imply CMD_MII if CMD_NET && !NO_NET + imply CMD_MII if CMD_NET && NET config BOOT_DEFAULTS bool # Common defaults for standard boot and distroboot --2.53.0
Hi Quentin,
Quoted 1 line · Quentin Schulz
This series introduces a new NET umbrella symbol with
NET_LEGACYandNET_LWIPunderneath.
Thanks for this cleanup!
Re SYS_RX_ETH_BUFFER, how about moving the extern for net_rx_packets[] to net-legacy.h ? (is it used with lwip?)
Regards,
Simon
Hi Simon,
Quoted 11 lines · Simon Glass
Hi Quentin,
Quoted 1 line · Quentin Schulz
This series introduces a new NET umbrella symbol with
NET_LEGACYandNET_LWIPunderneath.Thanks for this cleanup!
Re
SYS_RX_ETH_BUFFER, how about moving the extern for net_rx_packets[] tonet-legacy.h? (is it used with lwip?)
That's not the only thing making use of SYS_RX_ETH_BUFFER.
- drivers/net/fsl_enetc.h uses it as value for ENETC_BD_CNT which is used in drivers/net/fsl_enetc.c,
- drivers/net/rtl8169.c uses it (if defined, otherwise defaults to 4) to create a static buffer, see NUM_RX_DESC,
- include/net-common.h sets PKTBUFSRX to it, this in turn is used in *many* places, including many network (assumed Ethernet controller) drivers, net/lwip/net-lwip.c, net/net-common.c (with net_rx_packets array, used all over the place), net/net.c, and net/tcp.c.
So seems to be used for both NET_LEGACY and NET_LWIP.
Simply guarding the "#include <net-common.h>" with CONFIG_IS_ENABLED(NET) won't do as many files currently expect some functions/macros/constants from that header to be defined.
Another option is to ifdef PKTBUFSRX contant and net_rx_packets array in include/net-common.h. But it's used in arch/sandbox/include/asm/eth.h and drivers/dma/ti/k3-udma.c which aren't clearly dpeending on NET being set. All defconfigs enabling CONFIG_TI_K3_NAVSS_UDMA do not modify the default CONFIG_SYS_RX_ETH_BUFFER which is 4 (according to ./tools/qconfig.py -l -f CONFIG_TI_K3_NAVSS_UDMA '~CONFIG_SYS_RX_ETH_BUFFER=4') so it should be fine for this driver not to have PKTBUFSRX defined (as UDMA_RX_DESC_NUM will then default to 4). According to ./tools/qconfig.py -l -f CONFIG_SANDBOX CONFIG_NO_NET, all sandbox defconfigs have network enabled so maybe arch/sandbox/include/asm/eth.h is not an issue either (or rather, for later :) ).
With
include/net-common.h +4 -0
@@ -20,7 +20,9 @@* alignment in memory. * */ +#if CONFIG_IS_ENABLED (NET )#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER +#endif #define PKTALIGN ARCH_DMA_MINALIGN/* IPv4 addresses are always 32 bits in size */
@@ -132,7 +134,9 @@ static inline void net_set_state(enum net_loop_state state) }extern int net_restart_wrap;/* Tried all network devices */ +#if CONFIG_IS_ENABLED (NET )extern uchar *net_rx_packets[PKTBUFSRX ];/* Receive packets */ +#endif extern const u8 net_bcast_ethaddr[ARP_HLEN ];/* Ethernet broadcast
address */
extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */
/* Indicates whether the pxe path prefix / config file was specified
in dhcp option */
net/Kconfig +0 -2
@@ -279,8 +279,6 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET - config SYS_RX_ETH_BUFFER int "Number of receive packet buffers" default 4
@@ -289,3 +287,6 @@ config SYS_RX_ETH_BUFFER 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.
+
+endif # if NET
+
And building sandbox_defconfig with CONFIG_NO_NET=y, the build finishes without any issue. So maybe that's the way forward? I think this would be better as a separate series though, what do you think?
Cheers,
Quentin
Hi Quentin,
Quoted 99 lines · Quentin Schulz
Hi Simon,
Quoted 11 lines · Simon Glass
Hi Quentin,
Quoted 1 line · Quentin Schulz
This series introduces a new NET umbrella symbol with
NET_LEGACYandNET_LWIPunderneath.Thanks for this cleanup!
Re
SYS_RX_ETH_BUFFER, how about moving the extern for net_rx_packets[] tonet-legacy.h? (is it used with lwip?)That's not the only thing making use of
SYS_RX_ETH_BUFFER.-
drivers/net/fsl_enetc.huses it as value forENETC_BD_CNTwhich is used indrivers/net/fsl_enetc.c,
-drivers/net/rtl8169.cuses it (if defined, otherwise defaults to 4) to create a static buffer, seeNUM_RX_DESC,
-include/net-common.hsets PKTBUFSRX to it, this in turn is used in *many* places, including many network (assumed Ethernet controller) drivers,net/lwip/net-lwip.c,net/net-common.c(withnet_rx_packetsarray, used all over the place),net/net.c, andnet/tcp.c.So seems to be used for both
NET_LEGACYandNET_LWIP.Simply guarding the "#include <
net-common.h>" withCONFIG_IS_ENABLED(NET)won't do as many files currently expect some functions/macros/constants from that header to be defined.Another option is to ifdef PKTBUFSRX contant and
net_rx_packetsarray ininclude/net-common.h. But it's used inarch/sandbox/include/asm/eth.handdrivers/dma/ti/k3-udma.cwhich aren't clearly dpeending on NET being set. All defconfigs enablingCONFIG_TI_K3_NAVSS_UDMAdo not modify the defaultCONFIG_SYS_RX_ETH_BUFFERwhich is 4 (according to./tools/qconfig.py-l -fCONFIG_TI_K3_NAVSS_UDMA'~CONFIG_SYS_RX_ETH_BUFFER=4') so it should be fine for this driver not to have PKTBUFSRX defined (asUDMA_RX_DESC_NUMwill then default to 4). According to./tools/qconfig.py-l -fCONFIG_SANDBOXCONFIG_NO_NET, all sandbox defconfigs have network enabled so maybearch/sandbox/include/asm/eth.his not an issue either (or rather, for later :) ).With
include/net-common.h +4
-0@@ -20,7 +20,9 @@* alignment in memory. * */ +#if CONFIG_IS_ENABLED (NET )#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER +#endif #define PKTALIGN ARCH_DMA_MINALIGN/* IPv4 addresses are always 32 bits in size */ @@ -132,7 +134,9 @@ static inline void net_set_state(enum net_loop_state state) }extern int net_restart_wrap;/* Tried all network devices */ +#if CONFIG_IS_ENABLED (NET )extern uchar *net_rx_packets[PKTBUFSRX ];/* Receive packets */ +#endif extern const u8 net_bcast_ethaddr[ARP_HLEN ];/* Ethernet broadcast address */
extern structin_addrnet_ip; /* Our IP addr (0 = unknown) */
/* Indicates whether the pxe path prefix / config file was specified
in dhcp option */net/Kconfig +0
-2@@ -279,8 +279,6 @@ config TFTP_BLOCKSIZE almost-MTU block sizes. You can also activate CONFIG_IP_DEFRAG to set a larger block. -endif # if NET - config SYS_RX_ETH_BUFFER int "Number of receive packet buffers" default 4@@ -289,3 +287,6 @@ config SYS_RX_ETH_BUFFER controllers it is recommended to set this value to 8 or even higher, since all buffers can be full shortly after enabling theinterface on
high Ethernet traffic.net/Kconfig +3
-0+ +endif # if NET +
Quoted 3 lines
And building
sandbox_defconfigwithCONFIG_NO_NET=y, the build finishes without any issue. So maybe that's the way forward? I think this would be better as a separate series though, what do you think?
Yes that approach seems good, definitely a separate series as you say.
Regards,
Simon
Quoted 17 lines · Quentin Schulz
This migrates the net options away from the main
Kconfigto net/Kconfig, rename the current NET option toNET_LEGACYto really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keepNO_NETas an alias to NET=n for now) which then allows us to replace all the "iflegacy_stack||lwip_stack" checks with "ifnet_support" which is easier to read and maintain.The only doubt I have is wrt
SYS_RX_ETH_BUFFERwhich seems to be needed for now even when no network is configured? Likely due toinclude/net-common.hwith PKTBUFSRX?No change in behavior is intended. Only change in defconfig including other defconfigs where NO_NET=y or NET is not set, in which case
NO_NETis not set or NET=y should be set in the top defconfig. Similar change required for config fragments. See commit log in patch adding NET menuconfig for details.
Quoted 4 lines
This was tested based on
70fd0c3bb7c2("x86: there is noCONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up similarly as in "build all platforms in a single job" GitLab CI job.
Thanks for doing this. For the series:
Signature · 1 line
Tom
This is something I've been meaning to do for ages, thanks for ticking it off for me :)
Quoted 224 lines · Quentin Schulz
This migrates the net options away from the main
Kconfigto net/Kconfig, rename the current NET option toNET_LEGACYto really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keepNO_NETas an alias to NET=n for now) which then allows us to replace all the "iflegacy_stack||lwip_stack" checks with "ifnet_support" which is easier to read and maintain.The only doubt I have is wrt
SYS_RX_ETH_BUFFERwhich seems to be needed for now even when no network is configured? Likely due toinclude/net-common.hwith PKTBUFSRX?No change in behavior is intended. Only change in defconfig including other defconfigs where NO_NET=y or NET is not set, in which case
NO_NETis not set or NET=y should be set in the top defconfig. Similar change required for config fragments. See commit log in patch adding NET menuconfig for details.This was tested based on
70fd0c3bb7c2("x86: there is noCONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up similarly as in "build all platforms in a single job" GitLab CI job.#!/usr/bin/env bash
set -o pipefail
set -euxARGS="-BvelPEWM --reproducible-builds --step 0"
./tools/buildman/buildman-o ${O} --force-build $ARGS -CE $*./tools/buildman/buildman-o ${O} $ARGS -Ssd $*O=../build/u-boot/
../u-boot.sh-b master^..b4/net-kconfig |& tee../log.txtI can't really decipher the log.txt, but there's no line starting with
+ which would be an error according totools/buildman/builder.pyhelp text. Additionally, because I started the script with set -e set and because buildman has an exit code != 0 when it fails to build a board, and I have the summary printed (which is the second buildman call), I believe it means all builds passed.The summary is the following:
aarch64: (for 537/537 boards) all +0.0 rodata +0.0
uniphier_v8: all +1 rodata +1
u-boot: add: 0/0, grow: 1/0 bytes: 1/0 (1)
function old new delta
data_gz10640 10641 +1
arm: (for 733/733 boards) all -0.0 rodata -0.0
uniphier_v7: all -1 rodata -1
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-1 (-1)
function old new delta
data_gz11919 11918 -1
opos6uldev : all -3 rodata -3
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
function old new delta
data_gz18778 18775 -3
uniphier_ld4_sld8: all -3 rodata -3
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
function old new delta
data_gz11276 11273 -3
stemmy : all -20 rodata -20
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-20 (-20)
function old new delta
data_gz15783 15763 -20As far as I could tell this
data_gzis an automatically generated array whenCONFIG_CMD_CONFIGis enabled. It is the compressed .config stored in binary form. Because I'm changing the name of symbols, replacing a menu with a menuconfig, additional text makes it to .config and the "# Networking" section in .config disappears.Here is the diff for the 5 defconfigs listed above, generated with:
for f in build/*-m; do
diff --unified=0 $f/.config $(dirname $f)/$(basename -a -s '-m' $f)/.configdone
(-m is the build directory for master, and without the suffix, it's the top commit of this series)
"""
--- build/opos6uldev-m/.config 2026-04-20 10:53:49.804528526 +0200
+++ build/opos6uldev/.config 2026-04-20 11:03:37.430242767 +0200
@@ -970,4 +969,0 @@
-
-#
-# Networking
-#
@@ -975,0 +972 @@
+CONFIG_NET_LEGACY=y
--- build/stemmy-m/.config 2026-04-20 11:01:33.653698123 +0200
+++ build/stemmy/.config 2026-04-20 11:04:53.452577311 +0200
@@ -733,4 +732,0 @@
-
-#
-# Networking
-#
@@ -738,2 +733,0 @@
-#CONFIG_NETis not set
-#CONFIG_NET_LWIPis not set
--- build/uniphier_ld4_sld8-m/.config 2026-04-20 11:00:41.605469071 +0200
+++ build/uniphier_ld4_sld8/.config 2026-04-20 11:04:22.226439899 +0200
@@ -997,4 +996,0 @@
-
-#
-# Networking
-#
@@ -1002,0 +999 @@
+CONFIG_NET_LEGACY=y
--- build/uniphier_v7-m/.config 2026-04-20 10:53:04.019307319 +0200
+++ build/uniphier_v7/.config 2026-04-20 11:03:01.688085486 +0200 @@ -1004,4 +1003,0 @@
-
-#
-# Networking
-#
@@ -1009,0 +1006 @@
+CONFIG_NET_LEGACY=y
--- build/uniphier_v8-m/.config 2026-04-20 10:43:05.614441175 +0200
+++ build/uniphier_v8/.config 2026-04-20 10:41:03.214852130 +0200 @@ -875,4 +874,0 @@
-
-#
-# Networking
-#
@@ -880,0 +877 @@
+CONFIG_NET_LEGACY=y
"""This is fine:
- Networking menu doesn't exist anymore so "#\n# Networking\n#\n" won't be in .config anymore.
- opos6uldev,uniphier_ld4_sld8,uniphier_v7anduniphier_v8all have (old)CONFIG_NETenabled, (new)CONFIG_NETwill still be set butCONFIG_NET_LEGACYalso needs to be defined now to reflect the stack choice (even if default),
- stemmy hasCONFIG_NO_NETset, which meansCONFIG_NETandCONFIG_NET_LWIPare not reachable anymore hence why they don't need to be part of .config,GitLab CI was run on this series (well, not exactly, but it's only changes to the git logs that were made):
https://source.denx.de/u-boot/contributors/qschulz/u-boot/-/pipelines/29849It passes.
Signed-off-by Quentin Schulz <[email protected]>---
Quentin Schulz (6):
move networking menu in net/Kconfig
rename NET toNET_LEGACY
net: make NET a menuconfig (and downgradeNO_NETto a simple config) simplifyNET_LEGACY||NET_LWIPcondition with NET condition
doc: remove mention to non-existingTPL_NET
boot: removeNO_NETuseKconfig | 34 ---------------- Makefile | 4 +- arch/arm/mach-stm32mp/soc.c | 2 +- board/beacon/imx8mp/imx8mp_beacon.c | 2 +- board/engicam/imx8mp/icore_mx8mp.c | 2 +- board/gateworks/venice/venice.c | 4 +- board/nxp/ls1043ardb/Makefile | 2 +- board/nxp/ls1046afrwy/Makefile | 2 +- board/nxp/ls1046ardb/Makefile | 2 +- .../imx8mp_debix_model_a/imx8mp_debix_model_a.c | 2 +- board/siemens/iot2050/board.c | 2 +- board/sophgo/milkv_duo/Makefile | 2 +- board/sophgo/milkv_duo/board.c | 2 +- board/theadorable/theadorable.c | 4 +- board/ti/am335x/board.c | 2 +- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 2 +- board/xilinx/common/board.c | 3 +- boot/Kconfig | 8 ++-- cmd/Kconfig | 12 +++--- cmd/Makefile | 2 +- cmd/bdinfo.c | 7 ++-- cmd/fastboot.c | 4 +- cmd/ufetch.c | 2 +- common/Kconfig | 2 +- common/board_r.c | 4 +- common/spl/Kconfig | 5 ++- configs/am62px_evm_r5_ethboot_defconfig | 2 +- configs/j722s_evm_r5_ethboot_defconfig | 2 +- doc/develop/bootstd/overview.rst | 2 +- doc/develop/pytest/usage.rst | 4 +- doc/usage/cmd/bdinfo.rst | 7 ++-- doc/usage/cmd/sntp.rst | 2 +- doc/usage/cmd/wget.rst | 2 +- doc/usage/spl_boot.rst | 2 +- drivers/dfu/Kconfig | 2 +- drivers/fastboot/Kconfig | 4 +- drivers/fastboot/fb_common.c | 4 +- drivers/net/Kconfig | 6 +-- drivers/net/phy/Kconfig | 4 +- drivers/net/sandbox.c | 2 +- drivers/usb/gadget/Kconfig | 2 +- env/flags.c | 10 ++--- include/configs/stm32mp15_common.h | 2 +- include/configs/stm32mp23_common.h | 2 +- include/configs/stm32mp25_common.h | 2 +- include/env_callback.h | 2 +- include/env_flags.h | 6 +-- include/net-common.h | 4 +- include/net-legacy.h | 2 +- lib/Kconfig | 2 +- lib/efi_loader/Kconfig | 4 +- net/Kconfig | 45 +++++++++++++++++++--- net/Makefile | 6 +-- test/cmd/Makefile | 2 +- test/cmd/bdinfo.c | 6 +-- test/dm/eth.c | 6 +-- test/py/tests/test_efi_fit.py | 2 +- test/py/tests/test_efi_loader.py | 2 +- test/py/tests/test_fpga.py | 4 +- test/py/tests/test_net.py | 2 +- 60 files changed, 139 insertions(+), 138 deletions(-)---
base-commit:70fd0c3bb7c26d42f24d10145dd5f3168ac92eac
change-id: 20251216-net-kconfig-0f63d9de716bBest regards,
--
Quentin Schulz <[email protected]>
Quoted 8 lines · Quentin Schulz
This migrates the net options away from the main
Kconfigto net/Kconfig, rename the current NET option toNET_LEGACYto really highlight what it is and hopefully encourage more people to use lwIP, add a new NET menuconfig (but keepNO_NETas an alias to NET=n for now) which then allows us to replace all the "iflegacy_stack||lwip_stack" checks with "ifnet_support" which is easier to read and maintain.[...]
Applied to u-boot/master, thanks!
[1/6] move networking menu in net/Kconfig
commit: 8080ab6c2843d3899a8ce941b5f6ae82b05b9e38
[2/6] rename NET to NET_LEGACY
commit: b8cd4442257af4ec754838ea179568e0e7360b8f
[3/6] net: make NET a menuconfig (and downgrade NO_NET to a simple config)
commit: bd275172a84bf32a3f392b852801dee08a94956a
[4/6] simplify NET_LEGACY || NET_LWIP condition with NET condition
commit: 95d66d2eb02a4677c63d04c84ca21750a04c49f1
[5/6] doc: remove mention to non-existing TPL_NET
commit: 0d98f68579b4d32b8593dae35695e8c7f8d7e120
[6/6] boot: remove NO_NET use
commit: b06c5ef4ddf051b0da8276d2a00ee3df037cbf2fSignature · 1 line
Tom