Reputation: 91
Task: to load kernel and rootfs image and execute into the ram without storing onto the spi flash
I loaded flashable image (zimage at 0x200000) and flashable rootfs (jffs2 at 0x200000+offset)
tftp zimage 0x200000
tftp jffs2 0x200000+offset
bootm 0x200000 0x200000+offset
It is giving me this error:
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "ram0" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 256 mtdblock0 (driver?)
1f01 256 mtdblock1 (driver?)
1f02 2048 mtdblock2 (driver?)
1f03 13824 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
And sometimes : Bad Magic Number
Any help will be appreciated
Upvotes: 0
Views: 2179
Reputation: 91
@sawdust, you were right. jffs2 cannot be used in RAM as if it were an initrd or initramfs.
i successfully loaded both images onto the ram and executed onto the ram itself based on EXT2 filesystem.
Bootargs: setenv bootargs root=/dev/ram0 console=ttyMCS mem=64M@0x0 init=/bin/sh
Upvotes: 1
Reputation: 1918
As per your bootargs provided in comment use
root=/dev/ram0 rootfstype=jffs2 rw initrd=0x200000+offset,16M console=ttyMCS mem=64M@0x0
here XM is the size of initrd, if it is 8 MB give 8M
You haven't provided the offset of initrd in boot command, because of that kernel couldn't find the ramdisk image and gives not syncing: VFS:
. Just add initrd=0x200000+offset,16M
as above.
Upvotes: 0