kernell command line

Submitted by dmg
on May 25, 2009 - 8:51am

Hi,

I've put the linux to the embedded device. It use RedBoot bootloader to load the kernel and I can't change command line parameters that are provided to the kernel.

Now the params are: console=ttyS0,38400

What I need is: console=ttyS0,38400 root=/dev/mtdblock2 ro

Is there any possibility to hardcode/overwrite command line or add new param on runtime, for example inside a module (I could add some code to the MTD map driver).

I found function __setup and tried to use it like this:

__setup("root=", "/dev/mtdblock2 ro");

but I receive this error during compilation:

drivers/mtd/maps/rdc3210.c:56:1: error: pasting "__setup_str_" and ""/dev/mtdblock2 ro"" does not give a valid preprocessing token

Thanks,
Dawid

config options

on
May 27, 2009 - 5:09pm

some architectures have options "Default bootloader kernel arguments" and "Initial kernel command string" in their "Boot options" menu

Look for CONFIG_CMDLINE= kernel option

WPKG (not verified)
on
May 28, 2009 - 4:09am

Look for CONFIG_CMDLINE= kernel option.

For example:

# zgrep sda /proc/config.gz
CONFIG_CMDLINE="root=/dev/sda1 rootdelay=10 console=ttyS0,115200"

It is also possible to pass kernel boot options from RedBoot, if you can access its configuration.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.