Wiki Blog/2006-11-20How to compile a new Kernel under Debian the easy way(was: D-Link DUB-E100 Rev B on Debian GNU/Linux) D-Link (like other vendors like to as well) continue to sell their successful This makes the installation of a bleeding edge kernel neccessary, at the time of writing this was 2.6.19-rc6. Since this kernel is not official yet, you need to patch the 2.6.18.0 kernel with the 2.6.19-rc6 patch, compile and install it. Though the procedure on Installation of needed packagesMake sure you have a working C-compiler - though you should already. Then install the following packages: apt-get update apt-get install kernel-package libncurses5-dev wget Download the kernel and the patchwget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2 wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.19-rc6.bz2 Decompress both files: tar -xjf linux-2.6.18.tar.bz2 bzip2 -d patch-2.6.19-rc6.bz2 Patch the kernelcd linux-2.6.18 patch -p1 < ../patch-2.6.19-rc6 Kernel configurationYou need to configure the kernel now. Since this is a highly complicated and time consuming tedious task, where you can make many mistakes (at least this all applies to me). So I simply took a 2.6.18 config file from the already installed 2.6.18 kernel on my machine: cp /boot/config-2.6.18-3 . make oldconfig If you don't have a recent enough file, you can get it by installing the correct 2.6.18 linux-image debian package for your architecture with apt-get install linux-image-2.6.18-xyz. Compile the new kernelClean up a bit: make-kpkg clean Compile the kernel. Notice: the backslashes are intentional, the whole statement can be written as a single line. You can fill the values of the options --revision and --append-to-version with your own identifier for this special kernel. The + is also intentional, it's used as a separator. make-kpkg \ --initrd \ --revision=nfr061118 \ --append-to-version=+nfr061118 \ kernel_image Install the newly compiled kernelYou will now have a debian package in the parent directory that you can install on your machine (and also on others if you like): dpkg -i ../linux-image-2.6.19-rc6+nfr061118_nfr061118_i386.deb RebootAfter having updated Grub or Lilo to reflect the new kernel in the boot record of your booting hard drive, you can reboot. In case you wonder, Grub is updated automatically when installing the debian package, this may be the case with Lilo too. Your system should now say something like this: hamster:~# uname -a Linux hamster 2.6.19-rc6+nfr061119 #1 SMP \ Sun Nov 19 10:55:59 CET 2006 i686 GNU/Linux Profit!© Copyright 2004 - 2006 Nicola Fankhauser. All Rights Reserved. |