Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- common/startup.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/startup.c b/common/startup.c index 98b4aab..1891cbd 100644 --- a/common/startup.c +++ b/common/startup.c @@ -105,12 +105,20 @@ device_initcall(register_default_env); #endif #ifdef CONFIG_BOOT_CMDLINE -static int __init bootmode(char *mode) +static __initdata char bootmode[COMMAND_LINE_SIZE]; + +static int __init setup_bootmode(char *mode) +{ + strcpy(bootmode, mode); + return 0; +} +__setup("boot=", setup_bootmode); +static int bootmode_print(void) { - printf("boot=%s\n", mode); + printf("boot=%s\n", bootmode); return 0; } -__setup("boot=", bootmode); +device_initcall(bootmode_print); #endif static int mount_root(void) -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox