public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	ak@suse.de
Subject: [PATCH] x86_64 built-in command line
Date: Mon, 31 Jul 2006 12:14:42 -0500	[thread overview]
Message-ID: <20060731171442.GI6908@waste.org> (raw)

Allow setting a command line at build time on x86_64. Compiled but not
tested.

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

Index: linux/arch/x86_64/Kconfig
===================================================================
--- linux.orig/arch/x86_64/Kconfig	2006-07-26 18:08:29.000000000 -0500
+++ linux/arch/x86_64/Kconfig	2006-07-27 17:19:50.000000000 -0500
@@ -558,6 +558,20 @@ config K8_NB
 	def_bool y
 	depends on AGP_AMD64 || IOMMU || (PCI && NUMA)
 
+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/x86_64/kernel/setup.c
===================================================================
--- linux.orig/arch/x86_64/kernel/setup.c	2006-07-26 18:08:29.000000000 -0500
+++ linux/arch/x86_64/kernel/setup.c	2006-07-27 17:26:51.000000000 -0500
@@ -289,6 +289,10 @@ static __init void parse_cmdline_early (
 	int len = 0;
 	int userdef = 0;
 
+#ifdef CONFIG_CMDLINE_BOOL
+	strlcpy(saved_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#endif
+
 	for (;;) {
 		if (c != ' ') 
 			goto next_char; 

-- 
Mathematics is the supreme nostalgia of our time.

             reply	other threads:[~2006-07-31 17:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-31 17:14 Matt Mackall [this message]
2006-07-31 17:46 ` [PATCH] x86_64 built-in command line linux-os (Dick Johnson)
2006-07-31 20:07 ` Andi Kleen
2006-07-31 20:41   ` H. Peter Anvin
2006-07-31 22:17     ` Andi Kleen
2006-08-01  1:43       ` Matt Mackall
2006-08-01  2:29         ` H. Peter Anvin
2006-08-01  2:33         ` H. Peter Anvin
2006-08-01  2:38         ` H. Peter Anvin
2006-08-01  2:41           ` Matt Mackall
2006-08-01  2:44             ` Andi Kleen
2006-08-01  2:46               ` H. Peter Anvin
2006-08-01  2:46                 ` Andi Kleen
2006-08-01  2:46             ` H. Peter Anvin
2006-08-01  2:49         ` Andrew Morton
2006-08-01  1:06 ` Deepak Saxena
2006-08-01  1:18   ` Andi Kleen
2006-08-01  3:47   ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060731171442.GI6908@waste.org \
    --to=mpm@selenic.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox