Using make-kpkg to build a custom Linux kernel for your VAIO
Debian provides a powerful utility called
make-kpkg for compiling your own custom kernels. It integrates tightly with dpkg by making
.deb files and you can even use this to prepare your kernel image on a faster system. Later on it will make complex operations, such as compiling in patches and modules, a snap.
To get it:
libncurses-dev is not strictly necessary, but provides the libraries we will use later for configuring the kernel in the easy to use curses interface (
You will also need a copy of the kernel source. You can download it directly from
ftp._xx_.kernel.org/pub/linux/kernel/v2.4 (substitute your two-letter country code for
xx) or you can install a debianised version from your local repositary. The Debian package (
kernel-source-2.4.20 - or latest since) contains a few extra patches useful for a debian system.
The debian package will install the latest version of the source to the
/usr/src directory. You will need to place it there yourself, if you download it directly off a kernel mirror.
Change to the
/usr/src directory and check the source is there before un-tarring it with:
It is also good form to create a soft link to the default source working directory:
We shall assume you created the link for the rest of the instructions.
Now change to the
/usr/src/linux directory and being configuring your kernel:
Prepare your kernel for later chapters by installing the ACPI patches, and by setting the following sets of kernel options now:
External Firewire hard disks:
Apple iPod (experimental support):
This is optional. If you don’t have an Apple iPod, then you needn’t set these options.
Then, compile the
It is essential to run the first command to synchronize the
make-kpkg scripts. A sensible revision naming scheme would be to replace
whatever with a description of the destination machine and an internal version number eg,
Once the kernel has finished compiling it should leave (in the parent directory), a file called
kernel-image-2.4.20_whatever_i386.deb. As root run:
Note: This doesn’t build you an initial ramdisk, so your hard disk driver (IDE) and initial filesystem (ext3) will need to be compiled into the core kernel binary. I (Roger) wasted an entire Sunday rebuilding my Vaio when I forgot this.
Credits: Caoilte O’Connor wrote this page of the instructions. Thanks for that, Caoilte.