[PATCH master v2 2/2] startup: do not bring up networking if console input disabled

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 22 08:23:21 PST 2024


Bringing up network interfaces is a development convenience.
If barebox is configured not to enable any console input by default,
we shouldn't bring up the network interfaces automatically either.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v1 -> v2:
  - commit message adjusted: DHCP isn't attempted in eth_open_all by
    default, just network links are brought up.
---
 common/startup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/startup.c b/common/startup.c
index 9510824a908a..d71d83c221dc 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -315,7 +315,7 @@ static int run_init(void)
 	if (autoboot == AUTOBOOT_BOOT)
 		run_command("boot");
 
-	if (IS_ENABLED(CONFIG_NET))
+	if (IS_ENABLED(CONFIG_NET) && !IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT))
 		eth_open_all();
 
 	if (autoboot == AUTOBOOT_MENU)
-- 
2.39.5




More information about the barebox mailing list