HomePage
WikiBlog
RecentChanges
LikePages
BackLinks
FindPage

Blog entries

2010-02-16: RSS-Feeds für ricardo.ch-Suchergebnisse

2010-02-15_spam: Disabling public editing

2010-02-15: Show Processes waiting for I/O in Linux

2010-02-13: Sony Vaio P in der Schweiz...

2009-06-17: Wie man plötzlich zum Mörder wird (weil's einfach besser 'rüberkommt!)

2008-05-18: Recreating SSL keys for stunnel, lighttpd and dovecot following the Debian-OpenSSL debacle

2008-02-12: Patch for aoeserver in Kernel 2.6.24

2008-02-07: Usage of open-iscsi on Linux

2008-02-05: Linux and Windows working in harmony with iSCSI

2008-01-19: Linksys PAP2 FXS Port Impedance

< September, 2010 >
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

Wiki Blog/2006-11-20

How 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 DUB-E100 USB 2.0 Fast Ethernet device, but changed its device id, so it's no longer recognized by existing drivers.

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 Debian is quite straight-forward, I could not find a simple How-To, so here is one:

Installation of needed packages

Make 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 patch

wget 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 kernel

cd linux-2.6.18
patch -p1 < ../patch-2.6.19-rc6

Kernel configuration

You 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 kernel

Clean 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 kernel

You 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

Reboot

After 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!

 
Add a Comment
Summary:
Comment:

Last edited on 7.02.2008 17:03.


View Source | PageHistory | Diff | PageInfo

© Copyright 2004 - 2006 Nicola Fankhauser. All Rights Reserved.