From 815189dd4c8be39b9caae6c06a75a994f1956140 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 3 Jul 2019 13:41:59 +0200 Subject: startup: Create boot related variables where they are used global.boot.default, global.linux.bootargs.base and global.user are used in the boot code, so create them there. Signed-off-by: Sascha Hauer --- common/boot.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'common/boot.c') diff --git a/common/boot.c b/common/boot.c index 84b2ff9677..14d4fe9d64 100644 --- a/common/boot.c +++ b/common/boot.c @@ -119,12 +119,22 @@ void boot_set_watchdog_timeout(unsigned int timeout) boot_watchdog_timeout = timeout; } -static int init_boot_watchdog_timeout(void) +static char *global_boot_default; +static char *global_user; + +static int init_boot(void) { - return globalvar_add_simple_int("boot.watchdog_timeout", - &boot_watchdog_timeout, "%u"); + global_boot_default = xstrdup("net"); + globalvar_add_simple_string("boot.default", &global_boot_default); + globalvar_add_simple_int("boot.watchdog_timeout", + &boot_watchdog_timeout, "%u"); + globalvar_add_simple("linux.bootargs.base", NULL); + global_user = xstrdup("none"); + globalvar_add_simple_string("user", &global_user); + + return 0; } -late_initcall(init_boot_watchdog_timeout); +late_initcall(init_boot); BAREBOX_MAGICVAR_NAMED(global_watchdog_timeout, global.boot.watchdog_timeout, "Watchdog enable timeout in seconds before booting"); -- cgit v1.2.3