Linux kernel - compression support
Welcome to the official linux kernel bzip2 compression support homepage.
[Home] [About] [History] [Download]
What is this patch about?
This is a bzlib patch for your linux kernel. Unfortunately the kernel compression part is only available for i386 compatible PCs. If somebody gets this patch ported to other architectures, please let me know.
Many people think that their own built kernels are already bzip2-compressed, because they typed "make bzImage" at the console. This is wrong! bzImage stands for "big zipped Image" and means that the kernel is high-loaded and compressed using gzip. This patch provided here gives you the freedom to choose whether you compress your kernels with gzip or bzip2.
This patch was designed by Christian Ludwig (cl81@gmx.net). It is based upon a kernel 2.2 bzip2 support patch by Tom Oehser (tom@toms.net). The patch is an enhancement to the kernel. After applying it you will be able to compress your kernel and ramdisks with bzip2, so they get much smaller, than with the standard gzip compression.
The patch is for all people out there who are low on disk space (i.e. if you create a boot diskette). Tomsrtbt is a very good example for this. Indeed this patch is based upon the bzip2 patch for kernel 2.2, originally written by Tom Oehser for his Tomsrtbt.
How does it work?
This patch consists actually of two independant parts, which do NOT belong together in any case.
1. A kernel bzip2 compression support patch.
The kernel will be compressed using bzip2, if you choose the appropriate option in the "General options" menu of the kernel configuration. This part is architecture dependent and was implemented only for i386 based PCs right now. You can also choose the compression level in nine steps, from very poor compression (level 1), which is not very memory and speed intensive, upto a very strong compression (level 9), which makes the bzImage smaller, but uses a large amount of RAM for decompression.
2. A ramdisk bzip2 compression support patch.
You can choose between gzip and bzip2 compression (or even both) in the kernel configuration. The ramdisk driver will test the image, which should be loaded. If it recognises a valid (and supported) ramdisk image, it will load and decompress it. The ramdisk compression is optional. You even can turn off compressed ramdisk support at all, if you do not need it.
The ramdisk compression is implemented on basis of a fully modularized in-kernel bzlib as a sample implementation.