Compiling kernel 2.6.8 for IBM Thinkpad T41
Notes on compiling linux kernel 2.6.7 / 2.6.8 to support mts, wifi and bluetooth on a T41 running debian.
Get kernel source
$ apt-get install kernel-source-2.6.8 $ cd /usr/src $ tar xvfj kernel-source-2.6.8.tar.bz2 $ ln -s /usr/src/kernel-source-2.6.8 /usr/src/linux
MTS
Get kernel patches and drivers for MTS client. There is a debian package by Mark Hindess which I got from my colleague. It makes life a lot easier but I can’t seem to find the download link online.
$ apt-get install ipsec-tools iproute grep-dctrl $ wajig install kernel-patch-2.6-mts_0.1-4_all.deb $ wajig install mts-client_0.9.6c-2_i386.deb # installs to /usr/src/kernel-patches
Wireless
Get ipw2100 wireless drivers and firmware. An experimental debian package called ipw2100-source is available for drivers. Download and install
$ apt-get install module-assistant $ wajig install ipw2100-source_0.53-1_all.deb $ cd /usr/src $ tar zxvf ipw2100-source.tar.gz
Extract and copy the firmware to hotplug
$ cp *.fw /usr/lib/hotplug/firmware/
Older versions of ipw2100 depends on hostap for encryption. If you need it, it’s also has a debian package so Install similarily,
$ apt-get install hostap-source $ cd /usr/src $ tar zxvf hostap-source.tar.gz
Thinkpad tools
Also get modules for thinkpad configuration tools and thinkpad buttons
$ apt-get install thinkpad-source tpctl tpb $ cd /usr/src $ tar zxvf thinkpad.tar.gz
For thinkpad buttons (tpb) to work also need to add user to nvram group and run tpb -d
$ adduser anniec nvram
Configure kernel
Configure kernel,
$ make menuconfig # need to select for ipw2100 the following Device Deivers -> Generic Driver Options -> Hotplug firmware loading support Cryptographic Options -> ARC4 cipher algorithm Library routins -> CRC32c # iptables requires the following Everything under: Networking support ->Network Options->Network Packet Filtering # Bridging for bluetooth pan Networking support -> Networking Options -> 802.2d Ethernet Bridging # infrared Infrared-port device drivers-> NSC PC87108/PC87338 # usb ipaq Device Drivers -> USB support -> Multi-purpose USB network framework
Here’s my .config file for kernel 2.6.8.
Build kernel
$ cd /usr/src/linux $ export KPATCH_mts_26x=2.6.0 # this is needed by mts to patch newer version of kernel $ make-kpkg --append-to-version .rabbit --added-patches mts-26x --added-modules ipw2100,thinkpad kernel_image modules_image
It will produce deb packages for the kernel and each of the added modules in /usr/src. For me the compilation took around 10 minutes.
kernel image and module image can be compiled separately, i.e.,
$ export KPATCH_mts_26x=2.6.0 $ make-kpkg --append-to-version .rabbit --added-patches mts-26x kernel_image
for kernel only and
$ make-kpkg --append-to-version .rabbit --added-modules ipw2100,thinkpad modules_image $ update-modules # update modules index
for modules only.
To recompile run make-kpkg clean first to clear away the build files (but doesn’t remove the .config file). Note that the thinkpad modules directory needs to be removed before recompiling, else it uses the old one. Faster way to just compile newly selected modules do:
$ cd /usr/src/linux $ make bzImage $ make modules $ make-kpkg --append-to-version .rabbit kernel_image
Post installation
With the new kernel MTS works, wifi works, bluetooth radio can be toggled on/off by pressing Fn+F5. Sound works after configuring alsa, i.e.,
$ apt-get install alsaconf $ alsaconf
ACPI
Check links for how to set up ACPI.
Leave a Reply
You must be logged in to post a comment.