
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