[PATCH] net: Make NET imply NETDEVICES

Tom Rini trini at konsulko.com
Thu Nov 9 01:12:25 CET 2023


Normally, when NET is enabled, CMD_NET will then be enabled and in turn
NETDEVICES will (likely) be enabled via imply. However, if we disable
CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
for us. This suggestion (as an imply is) really isn't about the network
commands but network itself and is a legacy of how intertwined
NET/CMD_NET were historically. Move this over to the NET entry instead
where it is a more logical fit.

Reported-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
This could also be dropping the imply from cmd/Kconfig and instead
making drivers/net/Kconfig::NETDEVICES be default y, which is what it
practically is today. This would require a more lengthy check however to
be sure there's no functional change and I'm not sure it's any better or
worse than this approach.
---
 cmd/Kconfig | 1 -
 net/Kconfig | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 629a90afb7b5..1b4aad5c930b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1682,7 +1682,6 @@ if NET
 menuconfig CMD_NET
 	bool "Network commands"
 	default y
-	imply NETDEVICES
 
 if CMD_NET
 
diff --git a/net/Kconfig b/net/Kconfig
index 4215889127c9..8c80b3a6c671 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -5,6 +5,7 @@
 menuconfig NET
 	bool "Networking support"
 	default y
+	imply NETDEVICES
 
 if NET
 
-- 
2.34.1



More information about the U-Boot mailing list