[ECOS] JFFS2 questions with eCos

Andrew Lunn andrew@lunn.ch
Thu Sep 15 14:59:00 GMT 2005

On Thu, Sep 15, 2005 at 02:46:37PM +0800, Steven_cheng wrote:
> Hi All,
>     I use redboot as my bootloader, currently It works by using FIS.
> But I hope it can manage my flash images with  JFFS2 to prevent
> the image upgrade failed issue when power loss.
> It will make device can not boot-up due to boot image damage.
>     I have many questions about JFFS2 with eCos as following.I
> Q1.   If I want to add the JFFS2 Package into my platform for RedBoot,
> Which
> packages does it need ??

crc, zlib, fileio, linux_compat, jffs2.

> Q2.    If I have integrate the JFFS2 package with my platform, how can I
> verify
> it ??

Create a filesystem on your host using 

mkfs -t jffs2 -o jffs2.img -r /tmp/foobar/root.

Put the resulting image into flash. If you have everything right you
should then be able to mount it and use ls to see the contents and
load -m file to load files into memory. Note that redboot cannot write
to a jffs2 filesystem. So you need some other mechanism to place files
into the filesystem.

> Q3.    Is there document which describes about JFFS2 with eCos ??

Nope. See the archive and the sources.
> Q4.    If I want to replace FIS (Flash Image System )  with the JFFS2 in
> RedBoot,
> Is it doable ??

You have two options.  

1) You keep FIS and use it to keep track of where the the JFFS2 image
is in flash. When you mount the filesystem you give the name of this
FIS image you want to mount.

2) You hard code the address and length of the filesystem into
Redboot. You then don't need FIS.


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

More information about the Ecos-discuss mailing list