From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu CASTET Date: Wed, 16 May 2007 14:17:17 +0200 Subject: [U-Boot-Users] RO jffs2 implementation for bootloader In-Reply-To: <20070516110027.GB5782@michl.2n.cz> References: <200705041423.49187.sr@denx.de> <463F3EBD.3020709@parrot.com> <200705071938.20278.sr@denx.de> <20070516110027.GB5782@michl.2n.cz> Message-ID: <464AF64D.2010803@parrot.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Ladislav, Ladislav Michl a ?crit : > On Mon, May 07, 2007 at 07:38:20PM +0200, Stefan Roese wrote: >> Hi Matthieu, >> >> On Monday 07 May 2007, Matthieu CASTET wrote: >>> Using jffs2_nand_1pass.c make thing lot's of better (very fast scaning) >>> >>> Unfortunalty the code seems incomplete : if I do a ls, there are missing >>> files. >> Do I understand this correctly? Some files are displayed and some are missing? >> Could you give an example? > > I'm also interrested in test case. Having filesystem image would help as > well. The problem is that delete file are not handled : image we have 2 dirent : pino=1 ino=4 name=toto version=1 pino=1 ino=0 name=toto version=5 jffs2_1pass_list_inodes will list all dirent inode ie diplay version 1 and ignore version 5. > >>> Do you know what's the status of jffs2_nand_1pass.c ? >> No, sorry I personally haven't used the JFFS2 code in U-Boot before. >> >> IIRC this code originally is coming from Ladislav Michl (please correct me if >> I'm wrong here). So Ladis, can you say something about the status of this >> file and why it not used at all? > > Indeed... I wrote it (modified from jffs2_1pass.c) when I was adding NAND > code. Unfortunately it is not that easy to support JFFS2 on NOR and NAND > simultaneously. It would need more work... I found that jffs2_1pass_read_inode code is buggy on garbage collected image : we should load inode in version order (small first). If we don't, obsolete inode could be put in the final file. ino=4 offset=5 dsize=5 version=4 ino=4 offset=0 dsize=5 version=1 ino=4 offset=5 dsize=5 version=2 The code will load version 4, version 1 and version 2. In the dest we will have version 1 & 2 instead of version 1 & 4. Matthieu