If CONFIG_NET is disabled, there is little reason to have net in
global.boot.default, so omit it in that case.

CONFIG_NET on its own is not sufficient for net to work by default (ifup
and TFTP are needed in the default case), but we don't want to reflect
all the script dependencies in Kconfig.

Reported-by: <[email protected]>
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 common/boot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/boot.c b/common/boot.c
index 78d990f1617e..8679a594bb76 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -147,7 +147,8 @@ static int init_boot(void)
                        IF_ENABLED(CONFIG_BOOT_DEFAULTS,       "bootsource ")
                        IF_ENABLED(CONFIG_BOOT_DEFAULTS,       
"storage.builtin.nonbootsource ")
                        IF_ENABLED(CONFIG_BOOT_DEFAULTS,       
"storage.removable.nonbootsource ")
-                       "net"
+                       IF_ENABLED(CONFIG_NET,                 "net")
+                       ""
                );
 
        globalvar_add_simple_string("boot.default", &global_boot_default);
-- 
2.47.3


Reply via email to