hardcode root= kernel option

Hi,

Is it possible to compile the linux 2.6 kernel with "root=root=/dev/ mtdblock2 ro" option?

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.

Params command line provided by bootloader is: console=ttyS0,38400 What I need is: console=ttyS0,38400 root=/dev/mtdblock2 ro

Here is a bootlog:

+Ethernet eth0: MAC address 00:50:fc:02:03:04 IP: 192.168.12.142

RedBoot(tm) bootstrap and debug environment [ROM] Non-certified release, version v2_0 - built 16:13:31, Jun 28 2007

Platform: PC (I386) Copyright (C) 2000, 2001, 2002, Red Hat, Inc.R1

RAM: 0x00000000-0x000f0000, 0x000705f0-0x000a0000 available

Flash ID=22a8,flash_base=0xffc00000 linux -b 0x400000 -l 0x000bba34 -s 0x000bba30 -c "console=ttyS0,38400" == Executing boot script in 1.000 seconds - enter ^C to abort

Thanks, Dawid

Reply to
dmg2009
Loading thread data ...

first of all, i dont know why u cant edit your boot params, cause thats highly possible. Anyways, considering if u cannot change that...u can change your rootfile system if you build your ramfs by (dd if=/dev/mtdblock2 of=/dev/zero bs= count=)/dev/ mtdblock2 instead of conventional /dev/ram0 and then proceed in normal way. I think thats possibloe, but I personally havent tried it.

but truly speaking, i think you shou;d take a hard look why as to ur boot params cannot be changed before chaging here, cause i guess you will have the need to change it later at some point of time.

~zix

Reply to
zix

Yes, look for 'CONFIG_CMDLINE' in the configuration file, or under 'Boot options' after make menuconfig.

Kristof

Reply to
Kristof Provost

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.