Re: [PATCH] x86_64 built-in command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 Jul 2006, Matt Mackall wrote:

> Allow setting a command line at build time on x86_64. Compiled but not
> tested.
>
> Signed-off-by: Matt Mackall <[email protected]>
>
> 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.
> -

But this just makes it nice for __your__ embedded system. I suggest you
use:
> +	default "root=/dev/root ro"

The boot setup code makes a symlink to whatever your specific
setup requires.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.62 BogoMips).
New book: http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
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]
  Powered by Linux