Problems Building Kernel 2.4.9

Matthew Hawkins matthew at topic.com.au
Wed Oct 3 11:21:19 EST 2001


Hi Donovan,

Since you're using Debian, there's a better way to build kernels.

First, make sure you have got 'make-kpkg' and 'fakeroot'.  If not,
$ apt-get install kernel-package fakeroot

Fakeroot is kinda like sudo, but you don't actually become root, it just
pretends.  make-kpkg is a really neat program that will build your
kernels, package up the images, documentation, headers, etc. and make
installable debian packages out of them.  It will also do the same for
any extra modules in /usr/src (i2c sensors, etc). It will do whatever's
necessary for your boot loader (eg, run lilo, drop entries into the grub
menu.lst, etc).  It won't, however, feed your dog or do your dishes.  I
think that's coming in the next version ;)

Anyway, the short short short version is:

$ make menuconfig
(or whatever you use to make the .config file)
$ make-kpkg clean
$ fakeroot make-kpkg --revision dje.20011002.01 binary-image

The revision number can be pretty much anything you like, I generally
use hostname, the date, and a build number.  The binary-image target is
one of many (check the man page for make-kpkg); in this case you'll get
the kernel/modules images package, and the headers files package.  This
is all most people need.

Once you've done the above (and note, you do it as your normal user
account not root, and the kernel source can be anywhere, not
/usr/src/linux; I usually unpack it in my home dir...) you can then
become root and install the packages.

$ su
# dpkg -i kernel*.deb
# exit

QED

Have fun,

-- 
Matt




More information about the linux mailing list