Re: compiling Kernel
For compiling kernels on Debian systems, I highly recommend using the
kernel-package package, which will build Debian packages out of kernel
source fairly painlessly. It's also the standard way to build add-on
modules such as ALSA, OpenAFS, or lm-sensors that are distributed as
separate packages. 'apt-get install kernel-package' (and bin86, if
you're on i386) and then...
Martin F Krafft <madduck@madduck.net> writes:
MFK> once unpacked, it's usually best to rename the created "linux"
MFK> directory to something like "linux-version" i.e. linux-2.4.6, and then
MFK> to symlink to linux:
MFK> mv linux linux-2.4.6
MFK> ln -s !!:2 !!:1
(IMHO, renaming the directory is a good idea, but creating the symlink
isn't necessarily, particularly if you have several different source
trees in the same place.)
MFK> assuming your tar.gz file for the kernel is in /usr/src, you'd do the
MFK> following to compile a kernel:
MFK>
MFK> cd /usr/src
MFK> tar xfz linux-2.4.6.tar.gz
MFK> mv linux linux-2.4.6
MFK> ln -s !!:2 !!:1
MFK> cd !!:2
MFK> make menuconfig
All this is fine so far. (Though I'd skip the 'ln -s' step, and be
more careful with the history expansion, so the fifth line would be
an explicit 'cd linux-2.4.6'.)
MFK> make dep modules modules_install bzImage
'make-kpkg --revision=mymachine.1 --rootcmd fakeroot binary'
'fakeroot make-kpkg modules_image'
(The latter command goes off and builds everything under
/usr/src/modules as kernel modules, setting appropriate variables so
they know which kernel version they're being compiled for and where
the kernel source tree actually is.)
MFK> cp System.map /boot/System.map-2.4.6
MFK> cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.6
'dpkg --install ../*.deb'
MFK> $EDITOR /etc/lilo.conf # make the changes here
MFK> lilo
MFK> reboot
This is necessary in any case, if you're using LILO.
--
David Maze dmaze@debian.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
Reply to: