This patch allows building in a kernel command line on x86 as is
possible on several other arches.
Signed-off-by: Matt Mackall <[email protected]>
Index: linux/arch/i386/Kconfig
===================================================================
--- linux.orig/arch/i386/Kconfig 2006-05-26 16:18:13.000000000 -0500
+++ linux/arch/i386/Kconfig 2006-06-11 17:01:01.000000000 -0500
@@ -763,6 +763,20 @@ config HOTPLUG_CPU
/sys/devices/system/cpu.
+config CMDLINE_BOOL
+ bool "Default bootloader kernel arguments" if EMBEDDED
+
+config CMDLINE
+ string "Initial kernel command string" if EMBEDDED
+ depends on CMDLINE_BOOL
+ default "root=/dev/hda1 ro"
+ help
+ On some systems, there is no way for the boot loader to pass
+ arguments to the kernel. For these platforms, you can supply
+ some command-line options at build time by entering them
+ here. In most cases you will need to specify the root device
+ here.
+
endmenu
Index: linux/arch/i386/kernel/setup.c
===================================================================
--- linux.orig/arch/i386/kernel/setup.c 2006-05-26 16:18:13.000000000 -0500
+++ linux/arch/i386/kernel/setup.c 2006-06-11 16:23:51.000000000 -0500
@@ -713,6 +713,10 @@ static void __init parse_cmdline_early (
int len = 0;
int userdef = 0;
+#ifdef CONFIG_CMDLINE_BOOL
+ strlcpy(saved_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#endif
+
/* Save unparsed command line copy for /proc/cmdline */
saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]