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
some architectures have options "Default bootloader kernel arguments" and "Initial kernel command string" in their "Boot options" menu
Look for CONFIG_CMDLINE= kernel option
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.