All of lore.kernel.org
 help / color / mirror / Atom feed
* [BKPATCH]: Add option to define default command line to kernel.
@ 2004-01-07 18:25 Ben Collins
  2004-01-07 19:24 ` Ben Collins
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ben Collins @ 2004-01-07 18:25 UTC (permalink / raw)
  To: sparclinux

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

=================================

ChangeSet@1.1482.1.10, 2004-01-07 12:29:51-05:00, bcollins@debian.org
  [SPARC64]: Add option to define default command line to kernel.


 Kconfig        |   16 ++++++++++++++++
 prom/bootstr.c |    4 ++++
 2 files changed, 20 insertions(+)


diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- a/arch/sparc64/Kconfig	Wed Jan  7 13:22:20 2004
+++ b/arch/sparc64/Kconfig	Wed Jan  7 13:22:20 2004
@@ -489,6 +489,22 @@
 	  machines.  The watchdog timeout period is normally one minute but
 	  can be changed with a boot-time parameter.
 
+config CMDLINE_BOOL
+	bool "Default bootloader kernel arguments"
+
+config CMDLINE
+	string "Initial kernel command string"
+	depends on CMDLINE_BOOL
+	default "console=ttyS0,9600 root=/dev/sda1"
+	help
+	  Say Y here if you want to be able to pass default arguments to
+	  the kernel. This will be overridden by the bootloader, if you
+	  use one (such as SILO). This is most useful if you want to boot
+	  a kernel from TFTP, and want default options to be available
+	  with having them passed on the command line.
+
+	  NOTE: This option WILL override the PROM bootargs setting!
+
 endmenu
 
 source "drivers/base/Kconfig"
diff -Nru a/arch/sparc64/prom/bootstr.c b/arch/sparc64/prom/bootstr.c
--- a/arch/sparc64/prom/bootstr.c	Wed Jan  7 13:22:20 2004
+++ b/arch/sparc64/prom/bootstr.c	Wed Jan  7 13:22:20 2004
@@ -21,6 +21,10 @@
 	char bootstr_buf[BARG_LEN];
 } bootstr_info = {
 	.bootstr_len = BARG_LEN,
+#ifdef CONFIG_CMDLINE
+	.bootstr_valid = 1,
+	.bootstr_buf = CONFIG_CMDLINE,
+#endif
 };
 
 char * __init

=================================

This BitKeeper patch contains the following changesets:
1.1482.1.10
## Wrapped with gzip_uu ##


M'XL( %Q._#\  [56:V_;-A3];/Z*N^3+ACD223UMP$/2)&V-NK$1IQB&K@AH
MD8Z$R)(A2LXRZ,?O4I;RKH-UBRV $,5[>!_G\'(?OFA5#'N+*$_3)--D'S[F
MNASVI%HD(K/RX@JGSO,<I^Q*%[8N(OM:%9E*;5Q?_77 +9_@DIDHHQ@VJM##
M'K.<NYGR=JV&O?/3#U\F1^>$C$9P'(OL2LU5":,1*?-B(U*I#T49IWEFE87(
M]$J5PHKR57VWM.:4<OQ[+'"HY]?,IVY01TPR)ERF).5NZ+NDB^+PWOO'&"YE
MU&>A$WIA34,/34Z 6<P-N84#!>K:E-DT ,:'?##TV 'UAI3""\#P*X<#2M[!
M_QO",8G@ZWQV='[LN]^&<"0EY.LRR3/<!Z1:)IDR@ZC2$A!_)3()J9G$S]NZ
M6.03A(A%9O>I)@?_\D<(%93\!G\GZ[5*#[>E7OGAM0G]:Q?RMUH446SK-0Z^
M:W^*\FR97#61,NI@NAW.'?/JL=J5,AH([OF4!GXHPI=R^ETX4[> !=QW>>T.
MF.^A:[OS_@AI7>0K>X$DUF5A10\JX5(^J#V7A4$M?3?R(C_RE8P4]_W7_7N.
M>N>F%]0\X)PUA-]A]+H$_G,<1(J-6AUF5:FM+,FNA94A&5^!=3 ,GV&E7 ]?
MP\!K=.(]UH<_]()=^G#?2A]X9,'Q].S]^,/E\>>3R?CL%)9Y<2<+45SI/B3+
M5B[2"&);C2D<%#?-@PR?[2K,#PAFS!UPR7ZRQ&V?N$=Z5HM\B:E()(R ]1],
M+JHE3CVVZ9-]E<ED^9Q"K2X,=]Y.GB^>I=^#<QCC 67.@+$:87G8T,5E3_GB
M\EU\8?Y;$<:<HAU3MJ>I-J38GB2[2-'&^"-L0'!@/FEKU>Y^^6XZG9 >UCV%
MO9.6KX8%:2ZD*MH3W#"X6JFLU'ODSR<(I(>$2;(KV!MG29F(M+/IFL'V\Q[!
M#KY& FG UO%X]TXG>XBL\U2-RO)V3OL#+#T4Z,O(EFIC:RD8HL0J79,>P%S<
MPA\0JT(99=WF%=R(K#1=9Z% +-*F :V%U@]EN T"OQB$,E9=AX*+.-%PDZ2I
ML<[QUE D4JH,%K?-LON,]-O=#$"%LL^QT_VL*[Q8" WS\63Z2PN&SPHO+F;1
MLDJ?^8B !D)TV5JBVN'B_<6L#R9IS;K.\98A76P;D:0F0&-_DY0QQ&)C"H".
MKIJ(E30Y-GX_;,@6E@XMSJ87I\.MBVT?_WT\F70QJ\9L=C[]W+AH3B[0JBP1
=_R>TO[M%1;&*KG6U&M&E8BA4A_P#V?58;[D)    
 

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
@ 2004-01-07 19:24 ` Ben Collins
  2004-01-07 19:43 ` Ben Collins
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ben Collins @ 2004-01-07 19:24 UTC (permalink / raw)
  To: sparclinux

On Wed, Jan 07, 2004 at 12:03:31PM -0800, Keith M Wesolowski wrote:
> On Wed, Jan 07, 2004 at 01:25:30PM -0500, Ben Collins wrote:
> 
> > +	  Say Y here if you want to be able to pass default arguments to
> > +	  the kernel. This will be overridden by the bootloader, if you
> > +	  use one (such as SILO). This is most useful if you want to boot
> > +	  a kernel from TFTP, and want default options to be available
> > +	  with having them passed on the command line.
> > +
> > +	  NOTE: This option WILL override the PROM bootargs setting!
> 
> I don't really understand the need for this.  Why not just use the
> PROM boot arguments if you're booting from TFTP?

What if you have different kernels that require different boot args? If
you want to switch between them without messing with bootargs, this is
the easiest way.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
  2004-01-07 19:24 ` Ben Collins
@ 2004-01-07 19:43 ` Ben Collins
  2004-01-07 19:58 ` Ben Collins
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ben Collins @ 2004-01-07 19:43 UTC (permalink / raw)
  To: sparclinux

On Wed, Jan 07, 2004 at 12:07:53PM -0800, David S. Miller wrote:
> On Wed, 7 Jan 2004 12:03:31 -0800
> Keith M Wesolowski <wesolows@foobazco.org> wrote:
> 
> > I don't really understand the need for this.  Why not just use the
> > PROM boot arguments if you're booting from TFTP?
> 
> I agree.  You can even tweak the prom environment vars to force
> the command line you want.

In my case, I'm booting back and forth between different kernels, and
each requires different command lines. It's a pain in the ass to type
that out on the command line, or change the bootargs env, when I can put
it in the kernel and type "boot net" no matter what it is, and without
having to remember which kernel I am booting from.

FYI, I ripped this out of ppc, so it's nothing new :)

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
  2004-01-07 19:24 ` Ben Collins
  2004-01-07 19:43 ` Ben Collins
@ 2004-01-07 19:58 ` Ben Collins
  2004-01-07 20:03 ` Keith M Wesolowski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ben Collins @ 2004-01-07 19:58 UTC (permalink / raw)
  To: sparclinux

On Wed, Jan 07, 2004 at 12:22:22PM -0800, David S. Miller wrote:
> On Wed, 7 Jan 2004 14:24:05 -0500
> Ben Collins <bcollins@debian.org> wrote:
> 
> > What if you have different kernels that require different boot args? If
> > you want to switch between them without messing with bootargs, this is
> > the easiest way.
> 
> Ok, I guess it can't hurt to add this change.

Thanks.

> But I have to admit it does still sound like someone being incredibly lazy :)

For someone that switches kernels once a week, or even once a day, it's
probably lazy. But I'm rebooting different kernels doing different
things in 1 minute cycles, so that should count for something :)

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
                   ` (2 preceding siblings ...)
  2004-01-07 19:58 ` Ben Collins
@ 2004-01-07 20:03 ` Keith M Wesolowski
  2004-01-07 20:07 ` David S. Miller
  2004-01-07 20:22 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: Keith M Wesolowski @ 2004-01-07 20:03 UTC (permalink / raw)
  To: sparclinux

On Wed, Jan 07, 2004 at 01:25:30PM -0500, Ben Collins wrote:

> +	  Say Y here if you want to be able to pass default arguments to
> +	  the kernel. This will be overridden by the bootloader, if you
> +	  use one (such as SILO). This is most useful if you want to boot
> +	  a kernel from TFTP, and want default options to be available
> +	  with having them passed on the command line.
> +
> +	  NOTE: This option WILL override the PROM bootargs setting!

I don't really understand the need for this.  Why not just use the
PROM boot arguments if you're booting from TFTP?

-- 
Keith M Wesolowski <wesolows@foobazco.org> http://foobazco.org/~wesolows
------(( Project Foobazco Coordinator and Network Administrator ))------
	"May Buddha bless all stubborn people!"
				-- Uliassutai Karakorum Blake

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
                   ` (3 preceding siblings ...)
  2004-01-07 20:03 ` Keith M Wesolowski
@ 2004-01-07 20:07 ` David S. Miller
  2004-01-07 20:22 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2004-01-07 20:07 UTC (permalink / raw)
  To: sparclinux

On Wed, 7 Jan 2004 12:03:31 -0800
Keith M Wesolowski <wesolows@foobazco.org> wrote:

> I don't really understand the need for this.  Why not just use the
> PROM boot arguments if you're booting from TFTP?

I agree.  You can even tweak the prom environment vars to force
the command line you want.

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

* Re: [BKPATCH]: Add option to define default command line to kernel.
  2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
                   ` (4 preceding siblings ...)
  2004-01-07 20:07 ` David S. Miller
@ 2004-01-07 20:22 ` David S. Miller
  5 siblings, 0 replies; 7+ messages in thread
From: David S. Miller @ 2004-01-07 20:22 UTC (permalink / raw)
  To: sparclinux

On Wed, 7 Jan 2004 14:24:05 -0500
Ben Collins <bcollins@debian.org> wrote:

> What if you have different kernels that require different boot args? If
> you want to switch between them without messing with bootargs, this is
> the easiest way.

Ok, I guess it can't hurt to add this change.

But I have to admit it does still sound like someone being incredibly lazy :)

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

end of thread, other threads:[~2004-01-07 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-07 18:25 [BKPATCH]: Add option to define default command line to kernel Ben Collins
2004-01-07 19:24 ` Ben Collins
2004-01-07 19:43 ` Ben Collins
2004-01-07 19:58 ` Ben Collins
2004-01-07 20:03 ` Keith M Wesolowski
2004-01-07 20:07 ` David S. Miller
2004-01-07 20:22 ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.