public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86 built-in command line
@ 2006-06-11 21:55 Matt Mackall
  2006-06-11 22:54 ` Jesper Juhl
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Matt Mackall @ 2006-06-11 21:55 UTC (permalink / raw)
  To: linux-kernel, akpm

This patch allows building in a kernel command line on x86 as is
possible on several other arches.

Signed-off-by: Matt Mackall <mpm@selenic.com>

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.

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2006-06-12 22:07 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-11 21:55 [PATCH] x86 built-in command line Matt Mackall
2006-06-11 22:54 ` Jesper Juhl
2006-06-11 23:30 ` Jan Engelhardt
2006-06-11 23:47   ` Matt Mackall
2006-06-12 17:14     ` H. Peter Anvin
2006-06-11 23:40 ` Arjan van de Ven
2006-06-11 23:51   ` Matt Mackall
2006-06-12  0:08     ` Arjan van de Ven
2006-06-12  1:38       ` Matt Mackall
2006-06-12  5:13         ` Willy Tarreau
2006-06-12 17:15     ` H. Peter Anvin
2006-06-12  8:11 ` Andi Kleen
2006-06-12 14:37   ` Matt Mackall
2006-06-12 17:18     ` H. Peter Anvin
2006-06-12 17:12 ` H. Peter Anvin
2006-06-12 17:36   ` Michael Buesch
2006-06-12 17:52     ` H. Peter Anvin
2006-06-12 17:59   ` Tim Bird
     [not found] ` <200606121712.k5CHClUE017185@terminus.zytor.com>
2006-06-12 20:49   ` Matt Mackall
2006-06-12 21:19     ` Thomas Gleixner
2006-06-12 21:36       ` Tim Bird
2006-06-12 21:45         ` Thomas Gleixner
2006-06-12 22:03           ` Tim Bird
2006-06-12 21:45     ` Randy.Dunlap
2006-06-12 22:00       ` Tim Bird
2006-06-12 22:10         ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox