diff options
Diffstat (limited to 'common/startup.c')
-rw-r--r-- | common/startup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/startup.c b/common/startup.c index f53b73f81a..47b70a7756 100644 --- a/common/startup.c +++ b/common/startup.c @@ -37,6 +37,8 @@ #include <linux/ctype.h> #include <watchdog.h> #include <glob.h> +#include <net.h> +#include <efi/efi-mode.h> #include <bselftest.h> extern initcall_t __barebox_initcalls_start[], __barebox_early_initcalls_end[], @@ -53,7 +55,7 @@ static int mount_root(void) mkdir("/tmp", 0); mount("none", "devfs", "/dev", NULL); - if (IS_ENABLED(CONFIG_FS_EFIVARFS)) { + if (IS_ENABLED(CONFIG_FS_EFIVARFS) && efi_is_payload()) { mkdir("/efivars", 0); mount("none", "efivarfs", "/efivars", NULL); } @@ -173,7 +175,8 @@ enum autoboot_state do_autoboot_countdown(void) if (autoboot_state != AUTOBOOT_UNKNOWN) return autoboot_state; - if (IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT)) { + if (!console_get_first_active() && + global_autoboot_state != AUTOBOOT_ABORT) { printf("\nNon-interactive console, booting system\n"); return autoboot_state = AUTOBOOT_BOOT; } @@ -307,6 +310,9 @@ static int run_init(void) if (autoboot == AUTOBOOT_BOOT) run_command("boot"); + if (IS_ENABLED(CONFIG_NET)) + eth_open_all(); + if (autoboot == AUTOBOOT_MENU) run_command(MENUFILE); |