Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hardcode root= kernel option

4 views
Skip to first unread message

dmg...@dmg.pl

unread,
May 25, 2009, 9:23:58 AM5/25/09
to
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

zix

unread,
May 26, 2009, 1:55:53 AM5/26/09
to

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=<size> count=<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

Kristof Provost

unread,
May 26, 2009, 3:18:13 AM5/26/09
to
On 2009-05-25, dmg...@dmg.pl <dmg...@dmg.pl> wrote:
>
> Hi,
>
> Is it possible to compile the linux 2.6 kernel with "root=root=/dev/
> mtdblock2 ro" option?
>
Yes, look for 'CONFIG_CMDLINE' in the configuration file, or under 'Boot
options' after make menuconfig.

Kristof

0 new messages