How to Add N-Trig Touch Capability to Ubuntu Jaunty’s Current Kernel (2.6.28-16.55)

The following is a guide on how to download the source code for the Ubuntu kernel, adding the necessary N-Trig patches, compiling the kernel and installing it.  This guide is based on the Kernel Compile guide in the Ubuntu Community Documentation.

Preparation

Step 1:
Install the missing dependencies

sudo apt-get install fakeroot build-essential make dumpfile

Step 2:
Install any missing kernel development tools

sudo apt-get build-dep linux

Step 3:
Install any missing dependencies needed for the source code

sudo apt-get build-dep linux-image-$(uname -r)

Building the kernel deb files

Step 1:
Download the Ubuntu kernel source code

apt-get source linux-image-$(uname -r)

Step 2:
Download the patches tarball

wget http://linuxfans.keryxproject.org/packages/experimental/ntrig-v5.tar.bz2

Step 3:
Unpack the tarball

tar -xvjf ntrig-v5.tar.bz2

Step 4:
Change to the linux-2.6.28 source code directory

cd linux-2.6.28

Step 5:
Copy the hid-ntrig.c source into the Ubuntu linux source

sudo cp ../ntrig/drivers/hid/hid-ntrig.c drivers/hid/hid-ntrig.c

Step 6:
Patch the source

sudo patch -p1 < ../ntrig/hid-core.c.patch
sudo patch -p1 < ../ntrig/hid.h.patch
sudo patch -p1 < ../ntrig/hid-ids.h.patch
sudo patch -p1 < ../ntrig/input.c.patch
sudo patch -p1 < ../ntrig/input.h.patch
sudo patch -p1 < ../ntrig/Kconfig.patch
sudo patch -p1 < ../ntrig/Makefile.patch
sudo patch -p1 < ../ntrig/hid-ntrig.c-confidence.patch
sudo patch -p1 < ../ntrig/hp-wmi.c.patch

Step 7:
Make splitconfig.pl executable so that we can update the configuration files

sudo chmod 744 debian/scripts/misc/splitconfig.pl

Step 8:
Update the configuration files

sudo debian/rules updateconfigs

Step 9:
During the update, it will ask you the following four times:

NTrig (HID_NTRIG) [N/m/y/?] (NEW)

Answer m all four times so it will create the hid_ntrig.ko module.

Step 10:
Compile the source

DEB_BUILD_OPTIONS=parallel=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-generic

This will take a long time to compile (a little over an hour for me).

Step 11:
The .deb files are in the parent directory so change to it

cd ..

Step 12:
Install the .deb files

32-bit generic version

sudo dpkg -i linux-image-2.6.28-16-generic_2.6.28-16.55_i386.deb
sudo dpkg -i linux-headers-2.6.28-16-generic_2.6.28-16.55_i386.deb

64-bit generic version

sudo dpkg -i linux-image-2.6.28-16-generic_2.6.28-16.55_amd64.deb
sudo dpkg -i linux-headers-2.6.28-16-generic_2.6.28-16.55_amd64.deb

Verify that /boot/grub/menu.lst reflects the correct linux version (2.6.28-16-generic) and reboot!

Note: For those of you who want to use Red_Lion’s rotate script from this link, you will need to change this:

/sys/devices/platform/hp-wmi/dock

to this:

/sys/devices/platform/hp-wmi/tablet

One Response to “How to Add N-Trig Touch Capability to Ubuntu Jaunty’s Current Kernel (2.6.28-16.55)”

  1. [...] oleh Repo Ubuntu 2.6.28-15-generic #52. Dengan mengikuti cara patching kernel untuk n-trig touch di sini , akhirnya saya berhasil meng-generate paket kernel terbaru yakni :  [...]

Leave a Reply