On Wednesday 01 December 2010 22:29:23 Brian Robertson wrote: > We are using yaffs2 successfully in new Ethernet based products and we > will probably need to investigate what happens when files get corrupted. > > The file corruption could be due to anything: bad solder joints, > defective batch of NAND chips, SW changes etc etc. > > So what we would want to do is read the entire contents of the NAND > without altering it. Then transfer the image to a linux PC and start > analysing the image on the PC. > > My question is what tools can be used to do this? > > At present we have used dd to grab the image but my guess is that > nanddump is better so we can also get the OOB data. Maybe we also need > to consider JTAG. > > What linux based PC tools / books / links could people recommend to help > with this task? > > Regards > > Brian Robertson. Hello Brian You can start off by using nanddump to extract the nand contents. You need to extract the OOB data and would might not want to do ECC correction and you should probably include bad blocks since you probably want to get a pure dump of the bits, Unfortunately the correct way to approach each nand controller etc can vary, hence the imprecise answer and the need to experiment. Once you have the image on your workstation there are a few options: 1) unyaffs. Google will find. You might have to fiddle with this a bit to get the matching ECC layout etc. 2) Use yaffs direct. This is the application/RTOS framework for yaffs. You could hack one of the flash emulation back-ends in that to read your image. 3) Fire up nandsim (look in yaffs2/linux-test for the initnandsim.sh script) on the host, use nandwrite to pour the image into the nandsim then mount yaffs on that. The level of difficulty will largely depend on the ECC layout. -- CHarles