Hi Thank you for your reply. I'm trying to use another yaffs2 branch source, and patch it as you offered. Now, there is no segmentation. But, after nandwrite -a -o /dev/mtd0 yaffs2.img, and mount it to /mnt/nandyaffs2 There still only "lost+found" . I can new files and new folders in /mnt/nandyaffs2 after mount the nand. But I can not nandwrite a yaffs2 imge into NAND and get only lost+found. Why? Confused!!!!! My English is not good either, and thank you for your patience. Best Regards. Author: Duy Thang Dao Hi, sunshareall0709.
Date: 2009-11-02 11:46 +800 To: yi-chia Lan CC: yaffs Subject: [Yaffs] Về: A Three YEARs Problem!!!-----Can not see file afterwrite yaffs2 image on NAND Sorry for replying too late. Segmentation happens on what action is! On mkyafs2imageor other commands ? If it happens on mkyaffs2image, may be the offset byte of YAFFS2's information on OOB is not the third byte. (I think so) So you can see your kernel code, exactly your NAND information in kernel code to find where is offset of YAFFS2 on OOB. The patch that I shown to you is an example to modify from source code. You can modify it to satisfy your NAND Flash source code. Sorry, my English is not good. Best, regard. ----- Thư gốc ---- Từ: yi-chia Lan <lanyichia@gmail.com> Đến: dthang_dao@yahoo.com Cc: yaffs@lists.aleph1.co.uk Gửi ngày: Thứ Tư, 28 tháng 10, 2009 10:01:57 Chủ đề: Re: [Yaffs] A Three YEARs Problem!!!-----Can not see file afterwrite yaffs2 image on NAND >>Hi >>I did the patch as you said... >>but after recompile mkyaffs2img and run, I got segmentation fault. >>can you help? >>Best Regurd ----- Original Message ----- From: "Duy Thang Dao" <dthang_dao@yahoo.com> To: <sunshareall0709@gmail.com> Cc: <yaffs@lists.aleph1.co.uk> Sent: Monday, October 12, 2009 2:11 PM Subject: Re: [Yaffs] A Three YEARs Problem!!!-----Can not see file afterwrite yaffs2 image on NAND >>Hi, sunshareall0709. >>You wrote: >>>>Hi, everybody! >>>>I encounter a =roblem recently. >>>>When I try to write yaffs2 image to nand, it always f=il!! >>... >>>>I have searched in this maillist for some useful informatio=, >>>>a little disappoint, this problem had been found in 2007, but there=0A>>is still no a solution at present. >>>> Can any one help? >>>> Many =hanks!! >>You should try using this patch: >>http://www.aleph1.=o.uk/lurker/attach/3@20070912.140012.12f2d093.attach >>And recompile your =kyaffs2img application. Here is an example after patching: >>------------=--------------------------------------------------------------------------=-------------------- >># dd if=/dev/zero of=/tmp/test/file bs=10=4 count=512 >># mkyaffs2image /tmp/test/ /tmp/yaffs2.img 2 >># flash_eraseall /dev/mtd3 >># nandwrite -a -o /dev/mtd3 /tmp/yaffs2.img >># mount -t =affs2 /dev/mtdblock3 /mnt/ >>---------------------------------------------=------------------------------------------------------------- >>Note: i= command "mkyaffs2image /tmp/test/ /tmp/yaffs2.img 2", 2 is >>offset of yaff='s information in OBB. >>Best regard |