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]

newbie jffs2 / nvram question


Does it make any sense to use the jffs2 filesystem for a 32KB NVRAM part?

Some questions I have:

1) If I used ramfs for my nvram, would I be able to mount the fs and read files after a power loss? Is this always true? What about if power is lost during a write? Is it easy to modify a linker script to place the ramfs block array into the nvram address space? I've seen examples of locating functions in specific areas using the __attribute__ specifier, and thought this would also work with an array.

So in ramfs.c, I would do something like:

static ramfs_block cyg_ramfs_block_array[CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE] __attribute__ ((section (".2nvram.cyg_ramfs_block_array")));

Where .2nvram is a section defined like the .2ram section (populated with flash program routines).

Is the above a reasonable approach for this idea?

2) Is the compiled size of jffs2 and ramfs quite a bit different? Just looking at the src for each, I would guess jffs2 would be several times bigger.

3) Has anyone used a filesystem on top of nvram? A block device driver might be enough for me, but the only example I have been able to find of such a block driver is the flash device driver that jffs2 sits on top of (packages/io/flash/current/src/flash.c & flashiodev.c?).

I couldn't find anything in the archives to address my particular situation.

Rich


-- 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]