Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Passing kernel args
@ 2001-04-19 20:00 Dave Gilbert
  2001-04-19 20:40 ` Guido Guenther
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Gilbert @ 2001-04-19 20:00 UTC (permalink / raw)
  To: linux-mips

Hi,
  With help from some of the guys on the #mipslinux IRC channel I've
managed to force a Linux kernel onto my Indy's internal disc.

One problem is that I'd like to pass some parameters to it, but it is not
obvious to me which prom environment variable to put them in - any
suggestions???

Thanks in advance,

Dave

-- 
 ---------------- Have a happy GNU millennium! ----------------------   
/ Dr. David Alan Gilbert      | Running GNU/Linux on Alpha, | Happy  \ 
\   gro.gilbert @ treblig.org | 68K,MIPS,x86,ARM and SPARC  | In Hex /
 \ ___________________________|___ http://www.treblig.org   |_______/

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

* Re: Passing kernel args
  2001-04-19 20:00 Passing kernel args Dave Gilbert
@ 2001-04-19 20:40 ` Guido Guenther
  2001-04-19 22:45   ` Dave Gilbert
  0 siblings, 1 reply; 10+ messages in thread
From: Guido Guenther @ 2001-04-19 20:40 UTC (permalink / raw)
  To: linux-mips

On Thu, Apr 19, 2001 at 09:00:48PM +0100, Dave Gilbert wrote:
> Hi,
>   With help from some of the guys on the #mipslinux IRC channel I've
> managed to force a Linux kernel onto my Indy's internal disc.
> 
> One problem is that I'd like to pass some parameters to it, but it is not
> obvious to me which prom environment variable to put them in - any
> suggestions???
OSLoadOptions
See 
http://honk.physik.uni-konstanz.de/linux-mips/indy-boot/indy-hd-boot-micro-howto.html
(at the bottom) for an example.
 -- Guido

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

* Re: Passing kernel args
  2001-04-19 20:40 ` Guido Guenther
@ 2001-04-19 22:45   ` Dave Gilbert
  2001-04-20  8:16     ` Florian Lohoff
  2001-04-21 22:14     ` Guido Guenther
  0 siblings, 2 replies; 10+ messages in thread
From: Dave Gilbert @ 2001-04-19 22:45 UTC (permalink / raw)
  To: Guido Guenther; +Cc: linux-mips

On Thu, 19 Apr 2001, Guido Guenther wrote:

> OSLoadOptions
> See 
> http://honk.physik.uni-konstanz.de/linux-mips/indy-boot/indy-hd-boot-micro-howto.html
> (at the bottom) for an example.

Ah thanks - that would have helped a lot if I'd seen that before :-)
However there are a couple of points which don't seem to have matched my
experience:

  1) Disk partitioning.  I had a disk that had Irix on, however my first
problem was that the volume header wasn't big enough for a Linux kernel.
You state that you can use x and then g in fdisk to create a new partition
table, however that only works if the disc is clean and doesn't already
have an Irix partition on it.  In my case since it already did have, x
just gave 'sorry there is no expert mode for SG partitions' (or something
similar).   Having wiped the disc clean with:

dd if=/dev/zero of=/dev/sda

for a few moments I could then do the x and g (thanks to someone on the
IRC channel for pointing the x, g thing out prior to you giving me that
document).

  2) OSLoadPartition - it seems to look at this a little late; i.e. if you
have an NFS Root kernel it ignores OSLoadPartition and still NFS roots -
so I needed to pass a root= option.

  2) OSLoadOptions - the kernel I have (a 2.4.0) gets a string which is:

      OSLoadOptions=whatEverYouSet

    So if you:

       setenv OSLoadOptions "root=/dev/sda1 ro"

    The kernel actually sees:
       OSLoadOptions=root=/dev/sda1 ro

    So I had to do:

       setenv OSLoadOptions " root=/dev/sda1 ro"

    Which works like a dream. (Note the trailing space after the first " )

It is also useful to point out that it is the partition(8) in the options
that corresponds to the /dev/sda9 in the fdisk output.

Thanks again,

Dave (Whose Indy, dino, now boots off its disc)

-- 
 ---------------- Have a happy GNU millennium! ----------------------   
/ Dr. David Alan Gilbert      | Running GNU/Linux on Alpha, | Happy  \ 
\   gro.gilbert @ treblig.org | 68K,MIPS,x86,ARM and SPARC  | In Hex /
 \ ___________________________|___ http://www.treblig.org   |_______/

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

* Re: Passing kernel args
  2001-04-19 22:45   ` Dave Gilbert
@ 2001-04-20  8:16     ` Florian Lohoff
  2001-04-21 22:14     ` Guido Guenther
  1 sibling, 0 replies; 10+ messages in thread
From: Florian Lohoff @ 2001-04-20  8:16 UTC (permalink / raw)
  To: Dave Gilbert; +Cc: Guido Guenther, linux-mips

On Thu, Apr 19, 2001 at 11:45:08PM +0100, Dave Gilbert wrote:
>     So if you:
> 
>        setenv OSLoadOptions "root=/dev/sda1 ro"
> 
>     The kernel actually sees:
>        OSLoadOptions=root=/dev/sda1 ro
> 
>     So I had to do:
> 
>        setenv OSLoadOptions " root=/dev/sda1 ro"
> 
>     Which works like a dream. (Note the trailing space after the first " )

This sounds like a ARC firmware bug. The patch Guido produced 2
weeks ago now in the kernel worked for me on multiple indys and indigo2s
up to now without the leading space.

Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

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

* Re: Passing kernel args
  2001-04-19 22:45   ` Dave Gilbert
  2001-04-20  8:16     ` Florian Lohoff
@ 2001-04-21 22:14     ` Guido Guenther
  2001-04-24 19:09       ` Andrew Linfoot
  1 sibling, 1 reply; 10+ messages in thread
From: Guido Guenther @ 2001-04-21 22:14 UTC (permalink / raw)
  To: Dave Gilbert; +Cc: linux-mips

On Thu, Apr 19, 2001 at 11:45:08PM +0100, Dave Gilbert wrote:
[..snip..] 
>   1) Disk partitioning.  I had a disk that had Irix on, however my first
> problem was that the volume header wasn't big enough for a Linux kernel.
> You state that you can use x and then g in fdisk to create a new partition
> table, however that only works if the disc is clean and doesn't already
> have an Irix partition on it.  In my case since it already did have, x
> just gave 'sorry there is no expert mode for SG partitions' (or something
> similar).   Having wiped the disc clean with:
> 
> dd if=/dev/zero of=/dev/sda
Thanks. I'll add this to the howto.
[..snip..] 
> 
>   2) OSLoadPartition - it seems to look at this a little late; i.e. if you
> have an NFS Root kernel it ignores OSLoadPartition and still NFS roots -
> so I needed to pass a root= option.
This only happens when fetching a kernel via bootp. I suspect that the
prom variables do not get passed to the kernel in that case, only the
arguments after the "bootp(): "call . Not sure if we can do anything about
this.

> 
>   2) OSLoadOptions - the kernel I have (a 2.4.0) gets a string which is:
> 
>       OSLoadOptions=whatEverYouSet
> 
>     So if you:
> 
>        setenv OSLoadOptions "root=/dev/sda1 ro"
> 
>     The kernel actually sees:
>        OSLoadOptions=root=/dev/sda1 ro
> 
>     So I had to do:
> 
>        setenv OSLoadOptions " root=/dev/sda1 ro"
> 
>     Which works like a dream. (Note the trailing space after the first " )
Hmm...I'm not seeing this here on 2 Indy's and an I2. As Flo already
pointed out this might be a firmware bug.

> 
> It is also useful to point out that it is the partition(8) in the options
> that corresponds to the /dev/sda9 in the fdisk output.
Will add that one too.
Regards,
 -- Guido

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

* RE: Passing kernel args
  2001-04-21 22:14     ` Guido Guenther
@ 2001-04-24 19:09       ` Andrew Linfoot
  2001-04-24 19:09         ` Andrew Linfoot
  2001-04-24 21:09         ` Guido Guenther
  0 siblings, 2 replies; 10+ messages in thread
From: Andrew Linfoot @ 2001-04-24 19:09 UTC (permalink / raw)
  To: linux-mips

Just thought i would let you know of my experience with autobooting.

I'm having the same problems as Dave in that i must specify a space in
the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to reset
it after every reboot.

any ideas as to what may be causing this?
I am runnning on an Indy R5K

Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.

Cheers
Andy

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

* RE: Passing kernel args
  2001-04-24 19:09       ` Andrew Linfoot
@ 2001-04-24 19:09         ` Andrew Linfoot
  2001-04-24 21:09         ` Guido Guenther
  1 sibling, 0 replies; 10+ messages in thread
From: Andrew Linfoot @ 2001-04-24 19:09 UTC (permalink / raw)
  To: linux-mips

Just thought i would let you know of my experience with autobooting.

I'm having the same problems as Dave in that i must specify a space in
the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to reset
it after every reboot.

any ideas as to what may be causing this?
I am runnning on an Indy R5K

Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.

Cheers
Andy

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

* Re: Passing kernel args
  2001-04-24 19:09       ` Andrew Linfoot
  2001-04-24 19:09         ` Andrew Linfoot
@ 2001-04-24 21:09         ` Guido Guenther
  2001-05-01 15:31           ` Andrew Linfoot
  1 sibling, 1 reply; 10+ messages in thread
From: Guido Guenther @ 2001-04-24 21:09 UTC (permalink / raw)
  To: Andrew Linfoot; +Cc: linux-mips

On Tue, Apr 24, 2001 at 08:09:13PM +0100, Andrew Linfoot wrote:
> Just thought i would let you know of my experience with autobooting.
> 
> I'm having the same problems as Dave in that i must specify a space in
> the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
> reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to reset
> it after every reboot.
Could you please send me the kernel command line with and without using
the space (e.g.  dmesg | grep "command line") - i still don't see what
this should be good for.  BTW no need to give root= in OSLoadOptions,
you can use OSLoadPartition instead.
> 
> any ideas as to what may be causing this?
> I am runnning on an Indy R5K
It seems the space in the PROM for OSLoadOptions is quiet limited. The
space available seems to differ between different PROM versions
though(see the HOWTO, it's in there).
> 
> Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.
Doesn't make a difference. ECOFF is just a save bet.
 -- Guido

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

* RE: Passing kernel args
  2001-04-24 21:09         ` Guido Guenther
@ 2001-05-01 15:31           ` Andrew Linfoot
  2001-05-01 15:31             ` Andrew Linfoot
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Linfoot @ 2001-05-01 15:31 UTC (permalink / raw)
  To: 'Guido Guenther'; +Cc: linux-mips

My fault i'm afraid! I had used an old kernel without the neccessary
patches.
I am now using 2.4.3 and everthing works fine.

Sorry for any hassle this has caused.

Andy

-----Original Message-----
From: owner-linux-mips@oss.sgi.com
[mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Guido Guenther
Sent: 24 April 2001 22:09
To: Andrew Linfoot
Cc: linux-mips@oss.sgi.com
Subject: Re: Passing kernel args


On Tue, Apr 24, 2001 at 08:09:13PM +0100, Andrew Linfoot wrote:
> Just thought i would let you know of my experience with autobooting.
>
> I'm having the same problems as Dave in that i must specify a space in
> the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
> reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to
reset
> it after every reboot.
Could you please send me the kernel command line with and without using
the space (e.g.  dmesg | grep "command line") - i still don't see what
this should be good for.  BTW no need to give root= in OSLoadOptions,
you can use OSLoadPartition instead.
>
> any ideas as to what may be causing this?
> I am runnning on an Indy R5K
It seems the space in the PROM for OSLoadOptions is quiet limited. The
space available seems to differ between different PROM versions
though(see the HOWTO, it's in there).
>
> Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.
Doesn't make a difference. ECOFF is just a save bet.
 -- Guido

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

* RE: Passing kernel args
  2001-05-01 15:31           ` Andrew Linfoot
@ 2001-05-01 15:31             ` Andrew Linfoot
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Linfoot @ 2001-05-01 15:31 UTC (permalink / raw)
  To: 'Guido Guenther'; +Cc: linux-mips

My fault i'm afraid! I had used an old kernel without the neccessary
patches.
I am now using 2.4.3 and everthing works fine.

Sorry for any hassle this has caused.

Andy

-----Original Message-----
From: owner-linux-mips@oss.sgi.com
[mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Guido Guenther
Sent: 24 April 2001 22:09
To: Andrew Linfoot
Cc: linux-mips@oss.sgi.com
Subject: Re: Passing kernel args


On Tue, Apr 24, 2001 at 08:09:13PM +0100, Andrew Linfoot wrote:
> Just thought i would let you know of my experience with autobooting.
>
> I'm having the same problems as Dave in that i must specify a space in
> the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
> reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to
reset
> it after every reboot.
Could you please send me the kernel command line with and without using
the space (e.g.  dmesg | grep "command line") - i still don't see what
this should be good for.  BTW no need to give root= in OSLoadOptions,
you can use OSLoadPartition instead.
>
> any ideas as to what may be causing this?
> I am runnning on an Indy R5K
It seems the space in the PROM for OSLoadOptions is quiet limited. The
space available seems to differ between different PROM versions
though(see the HOWTO, it's in there).
>
> Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.
Doesn't make a difference. ECOFF is just a save bet.
 -- Guido

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

end of thread, other threads:[~2001-05-01 15:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-19 20:00 Passing kernel args Dave Gilbert
2001-04-19 20:40 ` Guido Guenther
2001-04-19 22:45   ` Dave Gilbert
2001-04-20  8:16     ` Florian Lohoff
2001-04-21 22:14     ` Guido Guenther
2001-04-24 19:09       ` Andrew Linfoot
2001-04-24 19:09         ` Andrew Linfoot
2001-04-24 21:09         ` Guido Guenther
2001-05-01 15:31           ` Andrew Linfoot
2001-05-01 15:31             ` Andrew Linfoot

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