Search code examples
linuxlinux-kernelfilesystemsu-boottftp

Kernel and Rootfs booting through tftp


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


Solution

  • @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