2008-02-20 13:56:50     cmdline arguments

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-02-20 13:56:50     cmdline arguments

Servaes Joordens (NETHERLANDS)

Message: 51384   

 

I want u-boot to tell the uClinux kernel what ip to use at startup. I added ip=192.168.0.40 to the cmdline, but it is not recognised by the kernel. Does anyone know how to do this correctly?

 

I want  to mount a jffs2 filesystem to a directory by a u-boot cmdline argument. (so the actual mounting is done as a first action after the kernel has started up) Is such a thing possible?

QuoteReplyEditDelete

 

 

2008-02-20 14:23:45     Re: cmdline arguments

Mike Frysinger (UNITED STATES)

Message: 51387    post the full kernel log output from booting

 

you cannot mount arbitrary things via the kernel command line ... mounting file systems is a userspace function, so you need to have your init scripts do the mounting

QuoteReplyEditDelete

 

 

2008-02-20 14:51:25     Re: cmdline arguments

Servaes Joordens (NETHERLANDS)

Message: 51389   

 

Mike,

 

yes I know. Right now I have a startup script that is run in user space as a normal console script. In that script one of the first things I do, is to mount the jffs2 filesystem. Then I search for a startup script on that mounted filesystem. When I find such a file, i run it. The jffs2 filesystem can be used by users of my device to store their own startup script and applications.

 

Instead of using a fixed startup script myself, I would like to pass those first few lines of the startup script through the command line of u-boot. This gives me the possibility to change detailes of this mechanism without recompiling and distribution of a kernel.

 

Servaes

QuoteReplyEditDelete

 

 

2008-02-20 15:08:04     Re: cmdline arguments

Mike Frysinger (UNITED STATES)

Message: 51391    as i said, the kernel has no such mechanism ... such undefined behavior is for userspace

 

the only thing you can do is stick random things into the kernel commandline from the bootloader (which the kernel would ignore) and have your userspace application pull them out by reading /proc/cmdline

QuoteReplyEditDelete

 

 

2008-02-20 15:34:25     Re: cmdline arguments

Servaes Joordens (NETHERLANDS)

Message: 51395   

 

ok, thanks.

 

The other question I had was how to set the ip parameters through the command line.

QuoteReplyEditDelete

 

 

2008-02-20 15:53:40     Re: cmdline arguments

Mike Frysinger (UNITED STATES)

Message: 51396    you use the ip= option on the kernel command line as documented in linux-2.6.x/Documentation/kernel-parameters.txt

Attachments

    Outcomes