You are not logged in.

#1 2010-01-16 21:05:14

wx100
Member
Registered: 2010-01-02
Posts: 3

How to use a kernel patch?

hi, I am hoping someone can help me here, I am trying to patch my kernel to detect my trackpoint on my thinkpad using the patch from http://bugzilla.kernel.org/show_bug.cgi?id=14970 but the patch seems to look for a drivers/input/mouse/psmouse-base.c which I don't seem to have(or can't find), anyone know how to solve this problem? I am applying the patch from my /usr/src/<kernel> directory, am I doing something wrong?

I used the commands
patch -p1 < psmouse-move-fsp-lower.patch
and
patch < psmouse-move-fsp-lower.patch

and I get the same results:

can't find file to patch at input line 24
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Input: pmouse - move Sentelic probe down the list
|
|From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|Sentelic probes confuse IBM trackpoints so they stop responding to
|TP_READ_ID command. See:
|
|    http://bugzilla.kernel.org/show_bug.cgi?id=14970
|
|Let's move FSP detection lower so it is probed after trackpoint and
|others, just before we strat probing for Intellimouse Explorer.
|
|Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
|---
|
| drivers/input/mouse/psmouse-base.c |   23 ++++++++++-------------
| 1 files changed, 10 insertions(+), 13 deletions(-)
|
|
|diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
|index cabf4e1..ccb9f08 100644
|--- a/drivers/input/mouse/psmouse-base.c
|+++ b/drivers/input/mouse/psmouse-base.c

Offline

#2 2010-01-16 21:27:09

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: How to use a kernel patch?

Get a kernel26 PKGBUILD and accompanying files from ABS, add the patch to the sources array, add the patch command to the build function analogically to the other patch commands present there, update md5sums array (with the output of makepkg -g) and run makepkg to build your shiny patched kernel.

Last edited by lucke (2010-01-16 21:28:12)

Offline

#3 2010-01-16 21:38:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to use a kernel patch?

Or if you insist on doing it manually, get the kernel source first - Arch does not provide it.

Offline

#4 2010-01-17 03:41:54

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: How to use a kernel patch?

I would suggest to run --dry-run on every patch applied. Safer.

aside of this
1) download kernel from www.kernel.org (or use abs)
2) unpack it in /usr/src/
3) cd /usr/src/linux-2.6.X
4) patch -p1 --dry-run < path_to_patch\psmouse-move-fsp-lower.patch (you can do this as user)
check for errors, above wil not actually apply patch but dry test it
if no errors run
5) patch -p1 < path_to_patch\psmouse-move-fsp-lower.patch

I tested your patch (dated 2010-01-12 06:04) and it applies cleanly, so obviously you are making some mistake. Try again. Hopefully it will work.

Note: I don't use Arch kernel, I don't even have it installed on my system (and miracuously it never broke). Whichever way you will build kernel is up to you.

Last edited by broch (2010-01-17 03:42:25)

Offline

#5 2010-01-17 08:10:42

wx100
Member
Registered: 2010-01-02
Posts: 3

Re: How to use a kernel patch?

Thank you all, I have resolved the problem using your suggestions.

Regards

Offline

Board footer

Powered by FluxBB