This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JFFS2 CRC problem


On Sun, Nov 14, 2004 at 11:14:09AM -0800, Anthony Tonizzo wrote:
> Hi:
> 
> I am having a problem with JFFS2 that just won't go away.
> The system is a PowerPC with Intel Strata flash (2 chips x 16).
> 
> I have create the image of the file system using mkfs.jffs2.1.39
> and the command line for the 6MB image looks like this:
> 
> ./mkfs.jffs2.1.39 -d jffs2_files --pad=6291456 -b -e 262144 -o jffs2.img
> 
> Once the image is flashed on the target board I can mount and ls the disk 
> from RedBoot, and I can even 'mount()' and 'listdir()' from my application, 
> but as soon as I try to 'read()' a file into a buffer in memory I have all 
> sorts of errors of the type:
> 
> <4>Node CRC b313f355 != calculated CRC c33a8deb for node at 0000113c

Could you produce a simple test case. Ideally use the linux target and
provide me with your filesystem. Linux can be configured for 6Mb and
256K block sizes, so we can keep that the same. The only difference is
that my Linux box is little endian, so you will need to generate a
little endian filesystem.

> Is there a way to fsck a JFFS2 file system?

Not that i know of. I don't think there is a fsck.jffs2. If you do
find one what you can do is read the complete image out of the flash
into a file and then use the mtd tools and the loopback devices to
mount the filesystem on a linux box and then run fsck on it. I think
this does however require the linux is running the same endiannes as
the filesystem, ie you will need a big endian linux box. 

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]