tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Firmware compression

On Sun, May 04, 2008 at 03:53:03PM +0100, Andrew Doran wrote:

> We have a meg or two of firmware images in the i386 GENERIC kernel, which is
> insane. I was thinking of adding a function that would use kmem_alloc+zlib
> to decompress images, and another to optionally free the decompressed image.
> It would probably also be good to add a simple program under dev/microcode
> to take a blob and spit out a compressed array in a C file.

Well, ignoring the zlib.c breakage it does the trick.

before: -rw-r--r--  1 ad  staff  151680 May  5 00:07 cz.o
after: -rw-r--r--  1 ad  staff  60568 May  5 00:07 cz.o

If we compress the firmware images down by 50%, remove PCIVERBOSE and
USBVERBOSE, and fix azalia_codec.c, I think it would take about 1.5MB
off an amd64 kernel.


Home | Main Index | Thread Index | Old Index