choosing a file system to use on NAND/UBI

Jamie Lokier jamie at shareable.org
Mon Apr 7 11:31:18 EDT 2008


Artem Bityutskiy wrote:
> On Mon, 2008-04-07 at 22:22 +1000, Hamish Moffatt wrote:
> > My idea is that you can "ubiupdatevol /dev/ubi0_0 myimage.gz", which
> > ubiupdatevol would decompress on the fly. You could decompress it
> > somewhere first but it may not fit in RAM (and writing it to flash
> > temporarily would be slower).

> How do you copy the file? If you have network connection, may be you
> could teach ubifs to take the image from the network?

I have a similar application, but it's using NOR, JFFS2 and "flashcp"
to write; still, the principle is the same.

Flashing while reading from the network is dangerous if the network
fails in the middle, and it's the critical boot partition being
written.  In my application, this is not uncommon.

> > Looking at the code I see the main issue is that you need to know the
> > file size before you start updating.
> Yeah, that is right. This is what UBI update ictl expects. But probably
> gzip has this info somewhere in its meta-data.

The size is optional in the tiny gzip header, at the start of the
file.  I think files compressed with "gzip file" will have it, and
files compressed with "gzip <file >file.gz" won't.  Also, it is
limited to 4GiB-1.

-- Jamie



More information about the linux-mtd mailing list