Gentoo Wiki


This article currently only deals with patching a kernel manually.

First, download a patch from somewhere, and move it to the /usr/src/linux directory (make sure /usr/src/linux links to the kernel you want to use). Now enter the /usr/src/linux directory: cd /usr/src/linux

Extract the patch into the /usr/src/linux directory using your tool of choice.

There should now be a file called something like patch-2.x.x or patch-2.x.x-yy (where x stands for a version number, and yy stands for the initials of the patch or patchset, such as aa or ck) in the /usr/src/linux directory. To apply the patch to the kernel, run

patch -p1 < patch-2.x.x or patch -p1 < patch-2.x.x-yy

Note: Third party kernel patches (patches that don't come from the official kernel tree) might compromise your system (stability, security etc.) Installing several third party kernel patches usually requires patch (and/or kernel) source editing so that they can play together nicely; unless you're a developer and if you really need several patches applied to the same kernel, it is advisable to use a kernel patchset (eg: Love-Sources, Nitro Sources)
Retrieved from ""

Last modified: Wed, 06 Aug 2008 21:11:00 +0000 Hits: 42,199