I am wondering if anyone has booted into a rootfs on a ramdisk.
What u-boot options did you use? How big was your rootfs?
Further, in our own design, we are considering booting from NAND Flash
for booting and perhaps running rootfs from (or extracting the rootfs
image and putting that into a ramdisk)?
Anybody have any comments help on this front too?
Tom
Solved! Go to Solution.
Hi Tom,
This issue is due to the kernel config. I assume you're using the Freescale-supplied kernel, which doesn't have RAM disk support built-in:
These couple of kernel config variables are needed:
See this link for an example:
You can also use 'menuconfig' to select it. Choose 'General Setup' on the first page:
Hi Tom,
We've done this lots of times with everything from a minimal Buildroot/uclibc image to the latest one, a 100M+ Android NFS image). The latter took a while to boot, but it ran really fast!. It also had the benefit of allowing operation on a single-partition FAT32 SD card, so our Windows users are able to create the image with no special tools (even the sales people can do it).
We put up some notes on hacking (creating, extracting) RAM disks in this blog post:
http://boundarydevices.com/hacking-ram-disks/
We're in the process of putting together one of these for SABRE Lite/Nitrogen6X that contains our production test image. This will have the benefit of allowing immediate power-off (and speed the production test).
Regards,
Eric
Hi Eric/all,
I have seen the 'hacking-ram-disks', but I do not have a ramdisk to hack. I need
to create one. Can I just use the NFS root tarball - and go through your re-packing
procedure (the 'find | cpio | gzip > ramdisk.cpi.gz' & mkimage)
I did this, but it crashes ~I am still having troubles. I am thinking I had something wrong
with the bootargs and/or bootcmd.
Here is the crash:
>> IP-Config: Complete:
>> device=eth0, addr=10.160.8.180, mask=255.255.255.0, gw=10.160.8.1,
>> host=10.160.8.180, domain=endo.san, nis-domain=(none),
>> bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
>>VFS: Unable to mount root fs via NFS, trying floppy.
>>VFS: Cannot open root device "ram0" or unknown-block(2,0)
yes, I have a /dev/ram0 in this image!
FYI - I am using the following bootargs
console=ttymxc1,115200 ip=dhcp root=/dev/ram0 rw
My ramdisk is ~24Meg - and I am downloading this ramdisk to 0x1100_0000, so my bootm:
bootm 0x10800000 0x11000000
Can somebody help me?
Tom
Message was edited by: Thomas Morrison (adding the u-boot command)
Hi Tom,
You don't need the root=/dev/ram0 if you use the two-argument form of bootm.
The kernel will pick this up directly and this should boot.
Regards,
Eric
Hi Eric,
Sorry - but I tried it without - but it is still crashing - same type of thing
a) Built a minimalistic (initramfs) image in the Freescale 12-09 LTIB
(initramfs.cpio.gz ~38MB, 139MB uncompressed).
b) mkimage (initramfs.cpio.gz)
c) use minimum bootargs:
>> Kernel command line: console=ttymxc1,115200 video=mxcfb0:dev=hdmi,1920x1080M@60 ip=dhcp
d) used bootm 0x10800000 0x11000000
and I got this (looks like something VFS is looking for something to mount):
>> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
What could I be doing wrong (it looks like from everything I can tell that this should work)?
Tom
Hi Tom,
This issue is due to the kernel config. I assume you're using the Freescale-supplied kernel, which doesn't have RAM disk support built-in:
These couple of kernel config variables are needed:
See this link for an example:
You can also use 'menuconfig' to select it. Choose 'General Setup' on the first page:
OK that worked....now to hack the cpio.gz...:-). Its too bad the mfw_v4lsrc is BROKEN (HELP Freescale)...