From Rupesh.Kumar@Lntemsys.com Thu Jul 16 14:06:26 2009
Received: from mail145.messagelabs.com ([216.82.242.163])
	by stoneboat.aleph1.co.uk with smtp (Exim 4.69)
	(envelope-from <Rupesh.Kumar@Lntemsys.com>) id 1MRQfE-0008Na-S8
	for yaffs@lists.aleph1.co.uk; Thu, 16 Jul 2009 14:06:26 +0100
X-VirusChecked: Checked
X-Env-Sender: Rupesh.Kumar@Lntemsys.com
X-Msg-Ref: server-12.tower-145.messagelabs.com!1247749575!9646857!1
X-StarScan-Version: 6.0.0; banners=-,-,-
X-Originating-IP: [59.145.122.242]
Received: (qmail 7137 invoked from network); 16 Jul 2009 13:06:16 -0000
Received: from unknown (HELO emsyssmtpout.lntemsys.com) (59.145.122.242)
	by server-12.tower-145.messagelabs.com with SMTP;
	16 Jul 2009 13:06:16 -0000
Received: from emsysmail.lntemsys.com ([192.168.178.22])
	by emsyssmtpout.lntemsys.com (Lotus Domino Release 6.5.4)
	with ESMTP id 2009071618440218-112731 ;
	Thu, 16 Jul 2009 18:44:02 +0530 
To: "YAFFS" <yaffs@lists.aleph1.co.uk>
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.5.4 March 27, 2005
Message-ID: <OF424B38B3.7C451256-ON652575F5.004346A7-652575F5.0047B523@lntemsys.com>
From: Rupesh Kumar <Rupesh.Kumar@Lntemsys.com>
Date: Thu, 16 Jul 2009 18:45:14 +0530
X-MIMETrack: Serialize by Router on EMSYSMAIL/LNTEMSYS(Release 6.5.4|March 27,
	2005) at 07/16/2009 06:45:13 PM,
	Serialize complete at 07/16/2009 06:45:13 PM,
	Itemize by SMTP Server on EMSYSSMTPOUT/LNTEMSYS(Release 6.5.4|March 27,
	2005) at 07/16/2009 06:44:02 PM,
	Serialize by Router on EMSYSSMTPOUT/LNTEMSYS(Release 6.5.4|March 27,
	2005) at 07/16/2009 06:44:05 PM,
	Serialize complete at 07/16/2009 06:44:05 PM
Content-Type: text/plain; charset="US-ASCII"
X-SA-Exim-Connect-IP: 216.82.242.163
X-SA-Exim-Mail-From: Rupesh.Kumar@Lntemsys.com
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-6.6 required=4.5 tests=BAYES_00,RCVD_IN_DNSWL_MED
	autolearn=ham version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Cc: Charles Manning <manningc2@actrix.gen.nz>
Subject: Re: [Yaffs] yaffs2 support for linux 2.6.23
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/options/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Thu, 16 Jul 2009 13:06:27 -0000

On 2009-07-15 22:13, Charles Manning wrote: 
> On Thursday 16 July 2009 02:46:24 Rupesh Kumar wrote: 
> > Hi 
> > I am using custom board based on MPC8313 processor. I have 2.6.23 
kernel 
> > running on it . I tried for YAFFS2 support on this kernel. 
> > For this i downloaded "yaffs2.tar.gz" for this kernel and compiled 
kernel 
> > with yaffs2 support. 
> > I used "mkyaffs2image" utility to generate rootfs image and then i 
wrote 
> > this rootfs image to one of nand partition. 
> 
> mkyaffs2image doesn't just work out of the box because different NAND 
types 
> and different ECC layouts etc need different binary  layouts. 
> 
> Instead mkyaffs2image is intended as tweakware. You will need to tweak 
it to 
> get the layout you need. 
> 
> -- Charles 
> 
> 

Hi
I applied KSI's patch(mkyaffs2_image.patch) to mkyaffs2image.c for NAND 
used in my board(page size 2k & oob 64bytes).
Then generated yaffs2 RFS image for my powerpc (MPC8313E) based custom 
board. 
I booted with this image but it did not work. :(

The image created by mkyaffs2image utility is in little endian mode. (KSI 
patch says convert functionality is BROKEN) 
Can i use little endian rfs image with big endian powerpc ? or will it be 
a problem..?

In another try, i created yaffs2 RFS when booted with ramdisk 
image(mounted empty flash partition as yaffs2 and copied RFS contents to 
that) and then booted with that, it worked and board booted with yaffs2 
RFS. 
But, in this case during boot up it complains of bad blocks. and, when i 
create/write some files to yaffs2 partition, it complains of "yaffs2 
Chunks not erased " and also increases no of bad blocks. :(
I am not able to understand why writing in yaffs2 shall mark nand block as 
bad :(

Please suggest how shall i proceed to fix these problems.

Thanks 
Rupesh


