On 06-07-19 11:16 +0400, Vitaly Wool wrote: > > I think there is no bad block in the flash( never write it before ). > > The root.yaffs is maded by mkyaffsimage ,I think problem is nandwrite OOB > > info to flash . > > My step is : > > # flash_eraseall /dev/mtd0 > > #mkyaffsimage root root.yaffs > > #nandwrite -a -o /dev/mtd0 root.yaffs > > Is there something wrong ? > > Does mkyaffsimage support OOB autoplacement? No, ot at least not very well. mkyaffsimage is intended to generate a complete image including OOB info, which worked fine on yaffs1, but things have got more complicated since then. Generating a complete image with autoplace is difficult because mkyaffsimage can't know what autoplace is going to do. It could do it for some known-in-advance cases, and a couple of versions that work for specific cases have been produced by Sergey and Nick Bane, I think. But this is prone to breakage by changes in MTD. I'm not quite sure what the best way to deal with this is. For yaffs1 we had mkyaffs and mkyaffsimage. The latter generates filesystem image whilst the former can write them to flash. With autopplace it is harder to separate these two functions. mkyafsimage can generate images for yaffs-direct easily enough, but for Linux use with MTD it should probably generate the yaffs tags but then leave it to a scond tool like mkyaffs, or the nand-utils to actually write these to flash using MTD, so that the placement and ECC gets done at this point. Does that all make sense? If it does does anyone fancy doing said coding? Better integration with the mtd-utils would be good so that yaffs2 was easy to use like jffs2 is. I'll get to this one day, but I don't see a gap in the schedule right now... Wookey -- Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK Tel +44 (0) 1223 811679 work: http://www.aleph1.co.uk/ play: http://wookware.org/