Hello,
 
 I have mips board au1200 with a Samsung K9D1208V 64MB NAND flash which
is 528bytes/page and nor flash with 31M.
 i have established a jffs2 filesystem as root filesystem in nor flash with 31M ,
my sytem is ok if only use nor flash . now i plan to mount nand flash under jffs2 filesystem .
 I downloaded the newest yaffs code from "http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs" and place it to
linux kernel 2.6.11. I select yafss and mtd support from muneconfig. After make, I got the error messages
at the end:
 
========================================================================================
 [root@server linux2.6.hl]# make zImage
   CHK     include/linux/version.h
 make[1]: `arch/mips/kernel/offset.s' is up to date.
   CHK     include/asm-mips/offset.h
   CHK     include/linux/compile.h
   CHK     usr/initramfs_list
   CC      fs/yaffs/yaffs_ecc.o
   CC      fs/yaffs/yaffs_fs.o
 fs/yaffs/yaffs_fs.c:168: warning: initialization from incompatible pointer type
 fs/yaffs/yaffs_fs.c: In function `yaffs_internal_read_super':
 fs/yaffs/yaffs_fs.c:1280: warning: `dev' might be used uninitialized in this function
 fs/yaffs/yaffs_fs.c: At top level:
 fs/yaffs/yaffs_fs.c:690: warning: `yaffs_file_read' defined but not used
 fs/yaffs/yaffs_fs.c:1492: warning: `yaffs_internal_read_super_ram' defined but not used
 fs/yaffs/yaffs_fs.c:1562: warning: `my_proc_ram_write_entry' defined but not used
 fs/yaffs/yaffs_fs.c:1636: warning: `yaffs_proc_ram_write' defined but not used
   CC      fs/yaffs/yaffs_guts.o
 fs/yaffs/yaffs_guts.c: In function `yaffs_SoftDeleteWorker':
 fs/yaffs/yaffs_guts.c:1120: warning: unused variable `chunkInInode'
 fs/yaffs/yaffs_guts.c:1123: warning: unused variable `tags'
 fs/yaffs/yaffs_guts.c:1124: warning: unused variable `found'
 fs/yaffs/yaffs_guts.c:1125: warning: unused variable `chunkDeleted'
 fs/yaffs/yaffs_guts.c: In function `yaffs_FlushFilesChunkCache':
 fs/yaffs/yaffs_guts.c:3146: warning: unused variable `nBytes'
 fs/yaffs/yaffs_guts.c:3142: warning: `lowest' might be used uninitialized in this function
 fs/yaffs/yaffs_guts.c: At top level:
 fs/yaffs/yaffs_guts.c:1922: warning: `yaffs_CheckObjectHashSanity' defined but not used
 fs/yaffs/yaffs_guts.c:319: warning: `yaffs_CheckChunkErased' defined but not used
 fs/yaffs/yaffs_guts.c:455: warning: `yaffs_RewriteBufferedBlock' defined but not used
 fs/yaffs/yaffs_guts.c:484: warning: `yaffs_CheckWrittenBlock' defined but not used
 fs/yaffs/yaffs_guts.c:2369: warning: `yaffs_DoUnlinkedFileDeletion' defined but not used
   CC      fs/yaffs/yaffs_mtdif.o
   LD      fs/yaffs/yaffs.o
   LD      fs/yaffs/built-in.o
   LD      fs/built-in.o
   CC      lib/zlib_inflate/infblock.o
   CC      lib/zlib_inflate/infcodes.o
   CC      lib/zlib_inflate/inffast.o
   CC      lib/zlib_inflate/inflate.o
   CC      lib/zlib_inflate/inftrees.o
   CC      lib/zlib_inflate/infutil.o
   LD      lib/zlib_inflate/zlib_inflate.o
   LD      lib/zlib_inflate/built-in.o
   LD      lib/built-in.o
   CC      lib/ctype.o
   CC      lib/string.o
   AR      lib/lib.a
   AS      arch/mips/lib/memcpy.o
   AR      arch/mips/lib/lib.a
   GEN     .version
   CHK     include/linux/compile.h
   UPD     include/linux/compile.h
   CC      init/version.o
   LD      init/built-in.o
   LD      .tmp_vmlinux1
 fs/built-in.o(.text+0x92f74): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_WriteChunkToNAND'
 fs/built-in.o(.text+0x92f78): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_WriteChunkToNAND'
 fs/built-in.o(.text+0x92f7c): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_ReadChunkFromNAND'
 fs/built-in.o(.text+0x92f80): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_ReadChunkFromNAND'
 fs/built-in.o(.text+0x92f8c): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_EraseBlockInNAND'
 fs/built-in.o(.text+0x92f90): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_EraseBlockInNAND'
 fs/built-in.o(.text+0x92f94): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_InitialiseNAND'
 fs/built-in.o(.text+0x92f98): In function `yaffs_internal_read_super':
 : undefined reference to `nandmtd_InitialiseNAND'
 make: *** [.tmp_vmlinux1] Error 1
 
 what is somthing wrong ?
 
=========================================================================
    then i downloaded the newest yaffs2
the following is my steps :
all of transport is passed
 
1. i boot my board using jffs2 filesystem as root filesystem
 # cat /proc/mtd
 dev:    size   erasesize  name
 mtd0: 03c00000 00020000 "User11 FS"
 mtd1: 00100000 00020000 "YAMON"
 mtd2: 002c0000 00020000 "raw kernel"
 mtd3: 00800000 00004000 "NAND FSa 0"
 mtd4: 03800000 00004000 "NAND FSa 1"
 
 2. using the tools "flash_eraseall /dev/mtd6 ",passed
 
 3. # mount -tyaffs /dev/mtdblock4 /mnt/
 yaffs: dev is 32505860 name is "mtdblock4"
 yaffs: Attempting MTD mount on 31.4, "mtdblock4"
 
4. then there are erros when copying  data to mnt's directory
   the questions :
 when copy less 120k data , no errors,and the data is correct after i reboot
 however , copying more 100k data ,there are the following errors:
 =========================================== 
 **>>mtd ecc error unfixed on chunk 113984:0
 **>>mtd ecc error unfixed on chunk 113984:1
 **>>Block 3562 marked for retirement
 **>> yaffs chunk 114016 was not erased
 **>> Erasure failed 3563
 **>> Block 3563 retired
 ......
 **>> yaffs chunk 416 was not erased
 **>> Erasure failed 13
 ......
 yaffs tragedy: no more eraased blocks
 !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
 ......
 **>>mtd ecc error unfixed on chunk 1375:0
 **>>mtd ecc error unfixed on chunk 1375:1
 **>>Block 42 marked for retirement
 yaffs tragedy: no more eraased blocks
 !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
 =========================================
 then i try to exc command "df"
 /mnt # df
 Filesystem           1k-blocks      Used Available Use% Mounted on
 /dev/mtdblock0           61440     27308     34132  44% /
 tmpfs                      512        60       452  12% /var
 /dev/loop1                1244      1244         0 100% /root/test
 /dev/mtdblock4           57344     57344         0 100% /mnt
 
 exc command  "reboot"
 /mnt #df
 Filesystem           1k-blocks      Used Available Use% Mounted on
 /dev/mtdblock0           61440     27308     34132  44% /
 tmpfs                      512        60       452  12% /var
 /dev/loop1                1244      1244         0 100% /root/test
 /dev/mtdblock4           57344     57344         0 100% /mnt
    
 why ...
 what is somthing wrong ?
 
please help me out ...

howhowwork
2006-12-13
 

howhowwork
2006-12-13