A patch allows you to bring you kernel from its current release level to a new release level while retaining its current configuration. When upgrading to the newer release, you could download the full source of a new kernel but those measure around 40MB or more. A patch is typically than 1MB in size, but they can vary. A patch will only take you to the next consecutive release of the kernel. For instance, if you have 2.6.11.6, you can patch to 2.6.11.7. If you want to move more than 1 release step, you'll have to apply multiple patches in sequence to reach the new level.
Certain kernel developers release patches that have not been sanctioned or incorporated into the current stable kernel release. These are a little experimental, but might have key 'cutting edge' features that you are looking for. Be sure to have a stable kernel on your system and in your bootloader before trying one of these developer kernels. The same rule applies in that you have to patch in sequence, but you also need to have the right original kernel source. I like Andrew Morton's kernel patches (akpm) and the current one at the time of this writing was 2.6.12-rc2-mm3. Now there is a kernel number 2.6.12-rc3, but there wasn't a patch for the -rc3 release at the time, so I used the full -rc2 source and patched it to -rc2-mm3.
cd /usr/src wget {URL/}kernel-2.6.x.y.tar.bz2 tar xvjf kernel-2.6.x.y.tar.bz2 cd kernel-2.6.x.y wget {URL/patch-directory/}patchfile.bz2 bzip -d patchfile.bz2Now we are ready to apply the patch. Here is a little info on the patch command you'll need to know.
You'll enter the command as patch -p# < patchfile. You'll have to fill in both the name of the
patchfile and the number that follows -p. That number indicates how many leading directories will be removed
when you start patching. The creator of the patch file may have set it to patch from within the kernel release directory
(/usr/src/linux-2.6.12-rc2) or may have meant for it to be applied from (/usr/src). If you look at the patchfile's
contents, either with an editor or using cat, you can see what the leading directory is and make the call. If
you need to strip one directory, then use a -p1, it you don't have to strip any directories from the patchfile,
then use a -p0.
patch -p1 < 2.6.12-rc2-mm3
The output will look something like this:
patching file include/linux/netfilter_bridge/ebt_mark_m.h
patching file include/linux/netfilter_bridge/ebt_mark_t.h
patching file include/linux/netfilter.h
patching file net/core/netfilter.c
patching file net/core/skbuff.c
patching file net/ipv4/netfilter/ip_tables.c
patching file net/ipv4/ip_output.c
patching file net/bridge/br_netfilter.c
patching file net/ipv4/netfilter/ipt_physdev.c