[U-Boot-Users] RO jffs2 implementation for bootloader
Matthieu CASTET
matthieu.castet at parrot.com
Wed May 16 14:17:17 CEST 2007
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
More information about the U-Boot
mailing list