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 eCos port updated.


Gary D. Thomas wrote:
On Mon, 2003-01-27 at 21:17, Jonathan Larmour wrote:

It'd also be nice to see RedBoot commands added for mounting, reading and possibly also writing to JFFS2 partitions -- other bootloaders have been able to boot Linux kernels from a JFFS2 partition for some time now, and it's a shame RedBoot can't do it when all the actual code to do the JFFS2 parts is there already.
[snip]
Gary, do you still have the spec for this? Want me to try and dig it out?


If you can, I'd appreciate it.  This will give us a place
to start - either more discussion or actual implementation.
This is the version we reached after discussion and input from Mark and your good self at the time:

-=-=-=-=-=-
Here is a repeat of the outline of what we should do to allow RedBoot to access "eCos" i.e. io/fileio-style filesystems.

file devs

Lists block devices that can be mounted (by enumerating the devtab, and
checking the status for CYG_DEVTAB_STATUS_BLOCK).

file listfs

Lists file system types supported (by enumerating the fstab).

file mount -t fstype /dev/xxxxx [mountpoint]

where /dev/xxxxx will probably be /dev/redbootfis/NAME for redboot flash
FIS entries. It could be real block devices in the future - lets keep it
flexible and in line with eCos. mountpoint defaults to /

file umount [mountpoint]
file ls
file cd

In future also file mkdir, file link, file rm, file save, yaddayadda.

load -m fs [-d] [-r] [-v] [-b <base_address>] <file>

will load the file off the fs.

For eCos /dev/redbootfis/NAME will also be available. Obviously we don't
want to duplicate the FIS code, so it looks like some opcode for the
CYGACC_CALL_IF_FLASH_CFG_OP() VV presumably.

As you can see I don't want to try and conflict with any of the existing
ext2 stuff, under the principle of not mixing things that are fundamentally
different under the hood.
-=-=-=-=-=-

The /dev/redbootfis/* stuff needs to be added to allow name-based lookup of FIS partitions. The CYGACC_CALL_IF_FLASH_CFG_OP() VV needs to return information about the location and dimension of the partitions. It partially renders io/flash/current/src/flashiodev.c obsolete, although there's probably value in keeping some way of accessing flash from JFFS2 or applications without requiring a FIS to be present.

Obviously we want it to be useful to applications in general, not just JFFS2.

One other thing: to be clear about the cyg_inode_cache stuff I mentioned before, the eCos port of jffs2 definitely has something odd wrong with it in terms of iputs and igets, mostly with directory inodes. I was part way through fixing it with implementing the inode cache (io/fileio/current/include/inode.h) but never finished fixing the problems there.

The result will be that, for example, you probably can't unmount it once mounted, and there is a risk of collisions with non-trivial applications reading/writing/renaming etc. multiple files.

For that reason if nothing else I would definitely concentrate on read-only, and leave read-write for later when the whole FS is better tested - some people won't like their JFFS2 images being scrogged :-).

Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


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


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