Q: Cramfs Vs. Ubifs

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Jun 6 15:08:41 EDT 2012


Hello,

Le Tue, 5 Jun 2012 11:29:08 +0200 (CEST),
Ricard Wanderlof <ricard.wanderlof at axis.com> a écrit :

> 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. :-)

You can use gluebi+mtdblock on top of a MTD volume to use a read-only
block filesystem on top of MTD. Or, you can use the ubiblk driver,
which isn't mainline for now, but has been posted multiple times last
year by one of my colleagues.

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

cramfs is kind of useless now that we have squashfs that overcomes the
limitations of cramfs (in number of files and filesystem size) and
provides an even higher compression ratio.

So definitely, if you had to use a read-only block filesystem, you
should go with squashfs. But as Ricard pointed, you cannot directly use
either cramfs or squashfs on top of MTD partitions, since those
filesystems do not handle bad blocks.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the linux-mtd mailing list