Other Help Topics :: Howto patch the kernel



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.

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

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...


original here.