Hi, Thanks for the tips. I've made some progress. > > > > > It seems that YAFFS is mounting on top of RAM instead of on the NAND > chip. > > Do I have to specify mtd parts in u-boot order to access the NAND? > > Is there a u-boot config define for selecting NAND or RAM for YAFFS2 > > support? > > Why do you think it is writing to RAM? > I suspected that it was being written to RAM because the files were disappearing when I powered off the device. This is no longer the case when I am testing now > A few things to try: > 1. Try turning on tracing and seeing if you get any further info. > 2. What happens if you save a file under u-boot then reboot back into > u-boot. > Is the file still there? > > These problems are almost always due to incompatibilities between the mtd > in > u-boot and Linux. > This comment got me thinking about what I have changed in linux mtd/nand! The board I am using has a NAND chip that stores bad block info at offsets 0 and 5 in OOB. The oobfree offset and length have been adjusted accordingly in the linux MTD nand driver (offest e= 6 instead of 2 and length = 34 instead of 38). When I make the same change in u-boot mtd / nand I now am able to mount existing linux yaffs partitions in u-boot However when I create files in u-boot they get size 0. They are visible from linux (also with size 0) and can be erased. Trying to read files from u-boot seems to freeze up. U-Boot> yls -l /rfs home 2048 645 directory var 2048 675 directory usr 2048 294 directory sbin 2048 564 directory tmp 2048 522 directory media 2048 275 directory dev 2048 284 directory mnt 2048 290 directory lib 2048 529 directory opt 2048 534 directory sys 2048 544 directory linuxrc 11 554 symlink bin 2048 847 directory proc 2048 879 directory root 2048 797 directory etc 2048 889 directory lost+found 2048 2 directory U-Boot> ywr /rfs/test.txt 0x30 10 Writing value (30) 10 times to /rfs/test.txt... done U-Boot> yls -l /rfs test.txt 0 1026 regular file home 2048 645 directory var 2048 675 directory usr 2048 294 directory sbin 2048 564 directory tmp 2048 522 directory media 2048 275 directory dev 2048 284 directory mnt 2048 290 directory lib 2048 529 directory opt 2048 534 directory sys 2048 544 directory linuxrc 11 554 symlink bin 2048 847 directory proc 2048 879 directory root 2048 797 directory etc 2048 889 directory lost+found 2048 2 directory U-Boot> yrd /rfs/test.txt Reading file /rfs/test.txt Created files are present after reboots but always unreadable. u-boot freezes even when reading files created from linux. Any hints as to where to look to figure out why reading and writing from u-boot aren't working? Do the versions of YAFFS2 in linux and u-boot need to be indentical? Should u-boot/yaffs read out the and use the time and date from the real time clock? Would a Bbad or incompatible ECC give this kind of result? > My ultimate goal is to read out the linux kernel image from the rootfs > > (YAFFS), copy it to RAM and boot. > > That is a most achievable goal. > One step closer :)