jffs2 fs overload

Selmeci, Tamas tamas.selmeci at siemens.com
Tue Mar 28 02:34:11 EST 2006


Hi!

> Just another one: is it possible to have a single RFS that 's mounted
> read/write?

If you are talking about this layout: bootloader, kernel, rootfs partition,
then my answer is: yes. My board works very similarly (one more parameter
partition is added, but it could be left out).

If you want only one partition containing kernel, rootfs etc. then it's
a harder quiestion.
I've been wondering if it's possible to put only a root FS on the flash... 
Currently I don't exactly know, although this would be useful for me too, because
I may need this kind of solution in the future. My theory is the following: let's assume 
that I format the entire flash with JFFS2. If it's possible to put
some kind of kernel loader code in the very beginning of the flash,
then I think I can do. My S3C2410 is capable of loading the first
4 KB of the flash in autoboot mode, and then executes it. If other
processors are also capable of this, then probably it can be done.
But I'm not sure any filesystem provides such functionality (leaving
the first x KB intact where a kernel loader program should reside).

> Is it enough to specify r/w on the mtdparts section of the command 
> line? (I'm using that way to define flash partitions).

Not likely... when the kernel finished booting and starts /sbin/init etc.,
then you should remount your partition in read/write mode. I'd prefer
this solution - of course, with a writable filesystem only. 

> In this way I could have three partitions: bootloader, kernel and RFS
> with the rfs mounted rewritable but with the files that cannot be 
> changed that don't have write permission.

Sounds good, I suggest you the remounting as r/w.

> In this way I could avoid the overload due to having two small partitions
> each one with its JFFS2 tables and structures and so on.
> Is it right?

Bootloader and kernel partitions don't have to be formatted with
any filesystem. I have simply downloaded bootloader and kernel images
to the corresponding partitions and they work - although I can't
overwrite them from the running Linux, only with the bootloader
command prompt or the board's builtin software. Think of filesystems in 
case of root (data) partitions only!

Bye
--
Tamas Selmeci




More information about the linux-mtd mailing list