Subject: Firmware and kernel image compression
To: None <>
From: Charles Hannum <>
List: tech-kern
Date: 09/17/2002 00:11:00
So, I've looked around a bit, and there are several compression
techniques that have very small and fast decompression engines.  My
current favorite is called UCL.  There's a web site about it at:

The decompression engine for the `best' mode is around 640 bytes when
compiled from C code on a PC.  Hand-tuned assembler is significantly

More interestingly, it actually compresses the firmware images I
tested (cz, isp and ti) *better* than gzip.

So, my plan is to add support for decompressing UCL images to libkern,
and compress the firmware images in the kernel.  In addition, it might
make a lot of sense to use this as a default method for compressing
kernels, as it would make the boot block ~25K smaller (on PCs; even
more on other platforms) if we built them without gzip support.

I realize that this package is GPLed, and I do not intend to put GPLed
code in the kernel.  I will clone the decompression engine and provide
a non-GPLed version.

Does anyone have (useful, constructive) comments on this before I do