diff options
| author | Tom Rini <[email protected]> | 2026-04-27 11:28:25 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-27 11:28:25 -0600 |
| commit | 96c8b9c4ceb7a144e52b5bbf56ea58512f978bb7 (patch) | |
| tree | c7fb0f14a097244d8bfe6b62dd72e11a9246eb5f /cmd | |
| parent | 6863587485a430e5d0709d3ba88aece811240416 (diff) | |
| parent | b06c5ef4ddf051b0da8276d2a00ee3df037cbf2f (diff) | |
Merge patch series "net: migrate NO_NET out of the networking stack choice"
Quentin Schulz <[email protected]> says:
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.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 12 | ||||
| -rw-r--r-- | cmd/Makefile | 2 | ||||
| -rw-r--r-- | cmd/bdinfo.c | 7 | ||||
| -rw-r--r-- | cmd/fastboot.c | 4 | ||||
| -rw-r--r-- | cmd/ufetch.c | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 3fd791f3e4b..c71c6824a19 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1954,7 +1954,7 @@ config CMD_XXD endmenu -if NET || NET_LWIP +if NET menuconfig CMD_NET bool "Network commands" @@ -1962,7 +1962,7 @@ menuconfig CMD_NET if CMD_NET -if NET +if NET_LEGACY config CMD_BOOTP bool "bootp" @@ -2206,12 +2206,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 @@ -2267,7 +2267,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 @@ -2337,7 +2337,7 @@ config CMD_PXE endif # if CMD_NET -endif # NET || NET_LWIP +endif # NET menu "Misc commands" diff --git a/cmd/Makefile b/cmd/Makefile index 6b69da1f2b0..bbbdfcc4ded 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -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 diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index dc7c2c3c853..ddf77303735 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -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)) 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) && - !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) || IS_ENABLED(CONFIG_NET_LWIP) +#if IS_ENABLED(CONFIG_NET) "bdinfo -e\n" " - print Board Info related to network\n" #endif diff --git a/cmd/fastboot.c b/cmd/fastboot.c index be84a482b81..e71f873527b 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -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")) diff --git a/cmd/ufetch.c b/cmd/ufetch.c index bc5db08eee1..f8dc904bdd0 100644 --- a/cmd/ufetch.c +++ b/cmd/ufetch.c @@ -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"); |
