Q: Cramfs Vs. Ubifs

Ricard Wanderlof ricard.wanderlof at axis.com
Tue Jun 5 05:29:08 EDT 2012

On Tue, 5 Jun 2012, Ran Shalit wrote:

>  So If I'm using ubifs, should I copy the executables to RAM before execute ?
> Most systems can't execute directly from NAND flash, so that is not really an option either way. In fact, since NAND flash cannot be mapped to an address space, there is no way to directly execute from NAND flash, however, one could imagine a system with some form of memory managment scheme which buffers the data so that the flash appears to be directly addressable. I don't know if there is such a system though; I've never heard of one (but that's not saying much).
> The 'copy to RAM' is nothing one normally has to worry about; all the binaries are on the flash and loaded into RAM when run. Execute in place is a special situation that must be explicitly enabled (and I'm very hazy on that subject as I've never worked with it).
> So it seems that if also in terms of execution ubifs and cramfs are 
> quite similiar (both are executed in RAM), then I see no advatage of 
> using cramfs over ubifs in general (There are also other advantages of 
> ubifs such as bad block skipping, writable filesystem, power up recovery 
> etc.).

I should make it clear that cramfs can not be run directly on NAND flash 
as it has no concept of bad blocks. But neither can ubifs, which requires 
UBI. So both require UBI.

As a matter of fact, come to think of it, I'm not sure how to run cramfs 
on UBI as it requires a block device which UBI doesn't supply. But I have 
tested it in some way, so it's probably just my mind drawing a blank right 
now. :-)

The only real advantage I can see with cramfs is that it does use up less 
space in the flash for the same amount of data. On the other hand, flash 
space is usually not a big concern in NAND flash systems anyway.

Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

More information about the linux-mtd mailing list