Howto patch the kernel


Forum: Other Help Topics
Topic: Howto patch the kernel
started by: paku

Posted by paku on Jan. 16 2006,22:27
Help, i need to patch kernel 2.4.31. Howto do it? I have the knoppix-kernel.patch.
I am trying to do a custom kernel to Rt2500 wireless card.

Posted by clacker on Jan. 16 2006,22:58
paku, do you have the patch command on your system?  You might have to load the dsl-dpkg.dsl extension from the repository and then run the following in an xterminal:

sudo apt-get update
sudo apt-get install patch


My guess is that you'll need libncurses5-dev as well:

sudo apt-get install libncurses5-dev

I was creating a /usr/src directory and placing both the patch and the linux kernel source in there:

sudo mkdir /usr/src
sudo chown dsl /usr/src
chgrp /staff /usr/src
cd /usr/src
### copy and untar the files here###


now apply the patch from the /usr/src using:

patch -p1 -d linux-2.4.31 < knoppix.patch

Posted by Grim on Jan. 17 2006,03:35
The process is documented in the README of every kernel source.

Quote

... gzip -cd ../patch-2.4.xx.gz | patch -p1 or
bzip2 -dc ../patch-2.4.xx.bz2 | patch -p1...

...Alternatively, the script patch-kernel can be used to automate this process.  It determines the current kernel version and applies any patches found.

linux/scripts/patch-kernel linux...

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.