Hello Rupesh, I've had this same issue for a quite a while now. In the short term the work around is annoying, but is the following. 1. You will need to boot into another rootfs via another mtd, sd card or whatever. 2. From there you will flash_erase the partition you wish to have the yaffs2 rootfs on. 3. Then mount your freshly erased mtd partition. 4. Now (if you're not annoyed enough already), untar your rootfs to the yaffs2 partition. 5. Unmount, reboot, etc. You're kernel should now successfully boot the yaffs2 rootfs. mkyaffs2image and writing resulting image has never worked for me. I suspect this is a bug in either how the image is made or in how the driver mounts the partition. I'm sure someone on the list can correct me here, and PLEASE do. I'd much rather go the mkyaffs2image route than the above. Or it's a result of the particulars of your MTD device/ system. For example I'm using a Marvell system, which insists on using bad block relocation rather than just skipping the bad blocks as the typical linux driver does. This is all kinds of headache for writing to NAND. Especially if you happen to selfupdate your kernel and there are badblocks within. I had to modify mtdwrite to not skip blocks at all. (long story there) I'm pretty sure yaffs2 has it's own way of handling bad blocks, and part of doing so is initialized when you mount a freshly erased partition as a yaffs2 FS. In mounting a partition that wasn't initialized by being blank first then mounted, yaffs2 just assumes it never was and creates and emtpy space that is initialized. I think this is the reason for only having the "lost-found" directory after writing the image. All: please add info and correct here. Good luck. Regards, Kieran Cox On Wed, Jul 15, 2009 at 7:46 AM, Rupesh Kumar wrote: > Hi > I am using custom board based on MPC8313 processor. I have 2.6.23 kernel > running on it . I tried for YAFFS2 support on this kernel. > For this i downloaded "yaffs2.tar.gz" for this kernel and compiled kernel > with yaffs2 support. > I used "mkyaffs2image" utility to generate rootfs image and then i wrote > this rootfs image to one of nand partition. > When i tried to boot using yaffs2 rfs it failed saying unable to open init > console. Exact message is shown below. > > rtc-ds1307 0-0068: setting the system clock to 2009-07-09 19:06:16 > (1247166376) > yaffs: dev is 32505867 name is "mtdblock11" > yaffs: passed flags "" > yaffs: Attempting MTD mount on 31.11, "mtdblock11" > yaffs: restored from checkpoint > VFS: Mounted root (yaffs2 filesystem). > Freeing unused kernel memory: 152k init > Warning: unable to open an initial console. > Kernel panic - not syncing: No init found. Try passing init= option to > kernel. > Rebooting in 180 seconds.. > > Then, i rebooted system with ramdisk image and peeked in to the flash > partition, it had only "Lost+Found" folder :( > > ~ # mount -t yaffs2 /dev/mtdblock11 /tmp/ > yaffs: dev is 32505867 name is "mtdblock11" > yaffs: passed flags "" > yaffs: Attempting MTD mount on 31.11, "mtdblock11" > yaffs: restored from checkpoint > ~ # cd /tmp/ > /tmp # ls > lost+found > /tmp # > > Then, i manually copied rfs folders in flash drive. it complained fornot > erased chunls and wrote. > > **>> yaffs chunk 20983 was not erased > **>> yaffs chunk 20984 was not erased > **>> yaffs chunk 20985 was not erased > **>> yaffs chunk 20986 was not erased > **>> yaffs chunk 20987 was not erased > **>> yaffs chunk 20988 was not erased > **>> yaffs chunk 20989 was not erased > **>> yaffs chunk 20990 was not erased > **>> yaffs chunk 20991 was not erased > **>> yaffs write required 260 attempts > ~ # ls /tmp/ > bin etc mnt proc sbin usr > dev lost+found opt root sys var > ~ # > > Now, Just to verify everything in rfs, i just unmounted and again mounted > that flash drive. > > ~ # umount /tmp > save exit: isCheckpointed 1 > ~ # mount -t yaffs2 /dev/mtdblock11 /tmp/ > yaffs: dev is 32505868 name is "mtdblock11" > yaffs: passed flags "" > yaffs: Attempting MTD mount on 31.11, "mtdblock11" > yaffs: restored from checkpoint > ~ # ls /tmp/ > lost+found > ~ # > > Could somebody out there please explain what is going worng ? > > > Thanks > Rupesh > > > _______________________________________________ > yaffs mailing list > yaffs@lists.aleph1.co.uk > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs >