aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/setup.c
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@st.com>2009-08-24 03:25:38 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-24 03:25:38 -0400
commitd724a9c9d572e092d1ce820463f082697487b874 (patch)
tree5ee5818b2c54e13a0e492f0ec6aedb9fe29f395e /arch/sh/kernel/setup.c
parentb46373e0d4b9f714ab757aae0c19c41fbcc73ef5 (diff)
sh: Allow for kernel command line concatenation.
So far kernel command line arguments could be passed in by a bootloader or defined as CONFIG_CMDLINE, which completely overwriting the first one. This change allows a developer to declare selected kernel parameters in a kernel configuration (eg. project-specific defconfig), retaining possibility of passing others by a bootloader. The obvious examples of the first type are MTD partition or bigphysarea-like region definitions, while "debug" option or network configuration should be given by a bootloader or a JTAG boot script. Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r--arch/sh/kernel/setup.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 212e6bddaeb..d13bbafb4e1 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -404,10 +404,14 @@ void __init setup_arch(char **cmdline_p)
404 if (!memory_end) 404 if (!memory_end)
405 memory_end = memory_start + __MEMORY_SIZE; 405 memory_end = memory_start + __MEMORY_SIZE;
406 406
407#ifdef CONFIG_CMDLINE_BOOL 407#ifdef CONFIG_CMDLINE_OVERWRITE
408 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); 408 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
409#else 409#else
410 strlcpy(command_line, COMMAND_LINE, sizeof(command_line)); 410 strlcpy(command_line, COMMAND_LINE, sizeof(command_line));
411#ifdef CONFIG_CMDLINE_EXTEND
412 strlcat(command_line, " ", sizeof(command_line));
413 strlcat(command_line, CONFIG_CMDLINE, sizeof(command_line));
414#endif
411#endif 415#endif
412 416
413 /* Save unparsed command line copy for /proc/cmdline */ 417 /* Save unparsed command line copy for /proc/cmdline */