[oe] [oe-commits] org.oe.dev zaurus-clamshell: Fix jffs2 commandline, enable lzo compression

Richard Purdie rpurdie at rpsys.net
Mon Apr 2 09:46:25 UTC 2007


On Mon, 2007-04-02 at 11:22 +0200, Michael 'Mickey' Lauer wrote:
> > zaurus-clamshell: Fix jffs2 commandline, enable lzo compression
> 
> Richard, if you have a minute, could you summarize the benefits of
> using LZO and what I need to tweak to enable it for a device (i.e.
> fic-gta01)

LZO allows much faster decompression than zlib at similar (but never
quite as good) compression ratios. When used with jffs2 it means file
reads are less processor intensive and hence faster. It gives a 40%
speedup to file reads in my tests and the "favourlzo" mode image size
might increase by say 5%. If you have an optimised boot procedure, you
can end up processor bound so it can also help device boot time a lot.
OE's boot procedure is not optimised though so this doesn't show up as
well under OE.

As for configuring it, the tricky question is given some block of data,
how should jffs2 compress it? There are a variety of modes you can put
mkfs.jffs2 into and the kernel has a similar set of modes too. There are
a few options:

"size" - Compress the data with each compressor and pick the one with
best compression

"priority" - Compress the data with the first compressor in a list of
compressors which gives any compression.

"favourlzo" - Like size, compress the data with each compressor and pick
the one with best compression *but* choose LZO is the sizes are close
since we know its fast.

mtd-utils in OE has patches to enable lzo compression. The standard
jffs2 image creation command has "-x lzo" in it to disable the LZO
compressor so anyone without a patched kernel still gets working images.
Since the zaurus kernels mostly have lzo support,
zaurus-clamshell-2.6.conf has "-m favourlzo" in the commandline it
overrides the default with making the zaurus clamshell images use a
hybrid of zlib and lzo compression.

"favourlzo" might be good at image creation time but on device itself,
you might want "priority" to save repeatedly calling multiple
compressors upon file writes.

So simply put:
* Add kernel patches
* Make sure you're using the patched mtd-utils
* Add "-m favourlzo" to the image creation commandline

Cheers,

Richard





More information about the Openembedded-devel mailing list