From 64d09e62e85bccabf34c192b066078496d114dd8 Mon Sep 17 00:00:00 2001 From: Pawel Moll Date: Mon, 24 Aug 2009 16:25:38 +0900 Subject: [PATCH] --- yaml --- r: 163525 b: refs/heads/master c: d724a9c9d572e092d1ce820463f082697487b874 h: refs/heads/master i: 163523: becba371156d61988dd569aa2f7a23e4788847b3 v: v3 --- [refs] | 2 +- trunk/arch/sh/Kconfig | 27 +++++++++++++++++++++++---- trunk/arch/sh/kernel/setup.c | 6 +++++- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ec7e2834367a..bbb5e37e0005 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b46373e0d4b9f714ab757aae0c19c41fbcc73ef5 +refs/heads/master: d724a9c9d572e092d1ce820463f082697487b874 diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig index 80b4f9a743a1..2f5352c06a0e 100644 --- a/trunk/arch/sh/Kconfig +++ b/trunk/arch/sh/Kconfig @@ -767,12 +767,31 @@ config UBC_WAKEUP If unsure, say N. -config CMDLINE_BOOL - bool "Default bootloader kernel arguments" +choice + prompt "Kernel command line" + optional + default CMDLINE_OVERWRITE + help + Setting this option allows the kernel command line arguments + to be set. + +config CMDLINE_OVERWRITE + bool "Overwrite bootloader kernel arguments" + help + Given string will overwrite any arguments passed in by + a bootloader. + +config CMDLINE_EXTEND + bool "Extend bootloader kernel arguments" + help + Given string will be concatenated with arguments passed in + by a bootloader. + +endchoice config CMDLINE - string "Initial kernel command string" - depends on CMDLINE_BOOL + string "Kernel command line arguments string" + depends on CMDLINE_OVERWRITE || CMDLINE_EXTEND default "console=ttySC1,115200" endmenu diff --git a/trunk/arch/sh/kernel/setup.c b/trunk/arch/sh/kernel/setup.c index 212e6bddaeb8..d13bbafb4e1b 100644 --- a/trunk/arch/sh/kernel/setup.c +++ b/trunk/arch/sh/kernel/setup.c @@ -404,10 +404,14 @@ void __init setup_arch(char **cmdline_p) if (!memory_end) memory_end = memory_start + __MEMORY_SIZE; -#ifdef CONFIG_CMDLINE_BOOL +#ifdef CONFIG_CMDLINE_OVERWRITE strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); #else strlcpy(command_line, COMMAND_LINE, sizeof(command_line)); +#ifdef CONFIG_CMDLINE_EXTEND + strlcat(command_line, " ", sizeof(command_line)); + strlcat(command_line, CONFIG_CMDLINE, sizeof(command_line)); +#endif #endif /* Save unparsed command line copy for /proc/cmdline */