ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline
authorAlexander Holler <holler@ahsoftware.de>
Tue, 16 Feb 2010 18:04:53 +0000 (19:04 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 24 May 2010 19:45:00 +0000 (20:45 +0100)
Add an option to force usage of the in-kernel cmdline even if the boot
loader passes another command string to the kernel.

Useful if someone cannot or don't want to change the
command-line options of the boot loader but is able to change
the kernel.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/kernel/setup.c

index 2d70cec..8555bd7 100644 (file)
@@ -1419,6 +1419,17 @@ config CMDLINE
          time by entering them here. As a minimum, you should specify the
          memory size and the root device (e.g., mem=64M root=/dev/nfs).
 
          time by entering them here. As a minimum, you should specify the
          memory size and the root device (e.g., mem=64M root=/dev/nfs).
 
+config CMDLINE_FORCE
+       bool "Always use the default kernel command string"
+       depends on CMDLINE != ""
+       help
+         Always use the default kernel command string, even if the boot
+         loader passes other arguments to the kernel.
+         This is useful if you cannot or don't want to change the
+         command-line options your boot loader passes to the kernel.
+
+         If unsure, say N.
+
 config XIP_KERNEL
        bool "Kernel Execute-In-Place from ROM"
        depends on !ZBOOT_ROM
 config XIP_KERNEL
        bool "Kernel Execute-In-Place from ROM"
        depends on !ZBOOT_ROM
index c91c77b..122d999 100644 (file)
@@ -593,6 +593,7 @@ static int __init parse_tag_revision(const struct tag *tag)
 
 __tagtable(ATAG_REVISION, parse_tag_revision);
 
 
 __tagtable(ATAG_REVISION, parse_tag_revision);
 
+#ifndef CONFIG_CMDLINE_FORCE
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
        strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
        strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
@@ -600,6 +601,7 @@ static int __init parse_tag_cmdline(const struct tag *tag)
 }
 
 __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
 }
 
 __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
+#endif /* CONFIG_CMDLINE_FORCE */
 
 /*
  * Scan the tag table for this tag, and call its parse function.
 
 /*
  * Scan the tag table for this tag, and call its parse function.