diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-22 12:57:13 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-24 09:03:18 +0200 |
commit | 172fc40f617799023e56cb005f088a522ab6fe6f (patch) | |
tree | 0fa5ba842f2cc23060c835c198f64ada207c95c7 /common/bootm.c | |
parent | fc5923d975b4e93d219c96faecd666e41ce6a8de (diff) | |
download | barebox-172fc40f617799023e56cb005f088a522ab6fe6f.tar.gz barebox-172fc40f617799023e56cb005f088a522ab6fe6f.tar.xz |
bootm: move globalvars from command to common
The globalvars should be available even if the bootm command
is not directly present.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/bootm.c')
-rw-r--r-- | common/bootm.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c index 6b2c2a6a7b..259feaca33 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -16,6 +16,8 @@ #include <fs.h> #include <malloc.h> #include <memory.h> +#include <globalvar.h> +#include <init.h> static LIST_HEAD(handler_list); @@ -322,3 +324,17 @@ err_out: return ret; } + +static int bootm_init(void) +{ + globalvar_add_simple("bootm.image", NULL); + globalvar_add_simple("bootm.image.loadaddr", NULL); + globalvar_add_simple("bootm.oftree", NULL); + if (IS_ENABLED(CONFIG_CMD_BOOTM_INITRD)) { + globalvar_add_simple("bootm.initrd", NULL); + globalvar_add_simple("bootm.initrd.loadaddr", NULL); + } + + return 0; +} +late_initcall(bootm_init); |