From: Craig H. <cr...@gu...> - 2006-03-23 21:15:38
|
On Mar 22, 2006, at 1:58 PM, Richard Marchant wrote: > Hi Everyone, > I'm new to embedded systems and Linux. Right now I have a JFFS > image that is larger than our 4mb of flash in the gumstix and so I > want to use a MMC card to boot off of instead. I have tried > loading my uImage kernel (which i took from the root directory on > build_arm_nofpu) with contains MMC and ext2 support into the Flash, > then changed my bootcmd to > > bootcmd=fsload a2000000 uImage;bootm a2000000 > > I then formatted the MMC card to VFAT and placed an EXT2 image of > the filesystem on the MMC and changed the bootargs to That's wrong. You want to not format the MMC card, just copy the ext2 filesystem image to the MMC card "raw", that is do something like: dd if=/path/to/ext2image of=/dev/mmcblock0/disc If you just have the ext2 image as a file in a VFAT filesystem, linux won't know what to do with that unless you build an initrd or something which mounts the image in loopback mode or something, but that's just way more complicated than necessary. > bootargs=console=ttyS0,115200n8 root=fe00 > > I then booted up and the kernel starts loading and then gives me an > error (i tried both fe00 and fe01) > > Kernel panic - not syncing: VFS: Unable to mount rootfs on unknown- > block(254,0) That might mean you don't have the MMC or ext2 drivers builtin to the kernel, or it could be because there isn't a filesystem on (254,0) which is an ext2 filesystem (because you have a vfat filesystem with a file in it which is a filesystem image). If you did the dd thing above to copy the filesystem image onto the MMC card, then you should be OK. > Do I need to format the MMC card as ext2 and then do a direct bit > copy (dd) of the filesystem image to the MMC? Or is there a way to > get it working with the ext2 Image file on the VFAT MMC (or > possibly the ext2 Image file on a ext2 formatted MMC)? Yes. Doing that latter thing is possible, but would just be a big PITA. Run ext2 off the MMC card; it'll be much easier. > Also, Not sure if this is related, but after the Kernel Panic I > tried rebooting and my kernel wouldn't load unless I reflashed the > kernel each time before trying to boot. Here is my procedure for > flashing just the kernel: > mmcinit > fatload mmc 1 a2000000 uImage > protect on 1:0-1 && erase all > cp.b a2000000 40000 ${filesize} Ah, in this case, you have copied the uImage "raw" into flash, that is, without a filesystem on it. "fsload" which you use as your bootcmd, is trying to read a file called uImage from a JFFS2 filesystem which starts at 40000; if you have uImage "raw" on there, you'd need to do something like cp.b 40000 a2000000 $filesize where you saved $filesize after copying the uImage file in there above by doing a "saveenv" after your fatload above. C |