[U-Boot] What shall u-boot do before passing 'root=/dev/ram0' to kernel?

Hi All,
Do you know that what u-boot shall do after passing 'root=/dev/ram0' to kernel? How kernel locates /dev/ram0? I want to use one ramdisk as my rootfs, but the kernel failed to mount the ramdisk, I set the u-boot parameter as below. setenv bootargs console=ttyS0,115200 root=/dev/ram0 ro mem=128M
kernel reports errors: No filesystem could mount root, tried: ext2 cramfs squashfs romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
root=/dev/ram1 also failed... What's the difference between /dev/ram0 and /dev/ram1?
And are there any requirement for the ramdisk image? Such as little/big endian, block size?
Thanks, Mike

Dear "mike xu",
In message 7103aeea0812181017j19966d84y22528f8728d5a1c@mail.gmail.com you wrote:
Do you know that what u-boot shall do after passing 'root=/dev/ram0' to kernel? How kernel locates /dev/ram0?
U-Boot starts the Linux kernel.
How the Linux kernel receives it's parameters is more a Linux specific question - so far, MIPS failed to com up with a standard solution for this problem (at least I don't know one).
You might even go ahead and make yourselkf a name in the community by implementing device tree awarenes for MIPS ;-)
I want to use one ramdisk as my rootfs, but the kernel failed to mount the ramdisk, I set the u-boot parameter as below. setenv bootargs console=ttyS0,115200 root=/dev/ram0 ro mem=128M
kernel reports errors: No filesystem could mount root, tried: ext2 cramfs squashfs romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
See previous message.
root=/dev/ram1 also failed... What's the difference between /dev/ram0 and /dev/ram1?
It's the same as between /dev/sda and /dev/sdb - they are differend devices.
And are there any requirement for the ramdisk image? Such as little/big endian, block size?
Yes, of course there are such requirements - they have to match what your kernel expects.
Best regards,
Wolfgang Denk

Hi Wolfgang,
Thanks for your reply. Maybe I need try to generate the big endian format ramdisk... Any ideas of generating big endian format ramdisk on a intel PC?
Best regards, Mike
On Fri, Dec 19, 2008 at 5:53 AM, Wolfgang Denk wd@denx.de wrote:
Dear "mike xu",
In message 7103aeea0812181017j19966d84y22528f8728d5a1c@mail.gmail.com you wrote:
Do you know that what u-boot shall do after passing 'root=/dev/ram0' to kernel? How kernel locates /dev/ram0?
U-Boot starts the Linux kernel.
How the Linux kernel receives it's parameters is more a Linux specific question - so far, MIPS failed to com up with a standard solution for this problem (at least I don't know one).
You might even go ahead and make yourselkf a name in the community by implementing device tree awarenes for MIPS ;-)
I want to use one ramdisk as my rootfs, but the kernel failed to mount the ramdisk, I set the u-boot parameter as below. setenv bootargs console=ttyS0,115200 root=/dev/ram0 ro mem=128M
kernel reports errors: No filesystem could mount root, tried: ext2 cramfs squashfs romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
See previous message.
root=/dev/ram1 also failed... What's the difference between /dev/ram0 and /dev/ram1?
It's the same as between /dev/sda and /dev/sdb - they are differend devices.
And are there any requirement for the ramdisk image? Such as little/big endian, block size?
Yes, of course there are such requirements - they have to match what your kernel expects.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de A woman should have compassion. -- Kirk, "Catspaw", stardate 3018.2

Dear Mike,
In message 7103aeea0812190201mb1345b6r9ff2c3f9c5b6849b@mail.gmail.com you wrote:
Thanks for your reply. Maybe I need try to generate the big endian format ramdisk... Any ideas of generating big endian format ramdisk on a intel PC?
I know it's kind of insulting to make such a suggestion, but would you, as an exception, consider reading the manual?
The required options (if any) obviously depend on the command used to crate the file system image, i. e. on the file system type.
And pleast stop top posting / full quoting.
Best regards,
Wolfgang Denk
participants (2)
-
mike xu
-
Wolfgang Denk