Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163525
b: refs/heads/master
c: d724a9c
h: refs/heads/master
i:
  163523: becba37
v: v3
  • Loading branch information
Pawel Moll authored and Paul Mundt committed Aug 24, 2009
1 parent fe57520 commit 64d09e6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b46373e0d4b9f714ab757aae0c19c41fbcc73ef5
refs/heads/master: d724a9c9d572e092d1ce820463f082697487b874
27 changes: 23 additions & 4 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 64d09e6

Please sign in to comment.