- Patches are 'snippets' of source code that are 'added' to original source files. 'added' can mean merged, replaced and or appended.
- They are usually written to correct faults (functional, security related ...) within the original source.
- They are not usually used to add enhancements to the original source - often a new version is released to accomplish this.
Patching generally involves:
- Get the source code (patch)
- Apply the changes to the old source tree
- Reconfigure the kernel
- Build the new kernel
- Install the new kernel
A kernel patch file will upgrade the source code from only one specific release to another. There are three types of patches:
- Stable kernel
Apply to the base kernel version e.g. patch-126.96.36.199 will only apply to the 2.6.17 kernel release NOT to the 188.8.131.52 kernel or any other.
- Base kernel release
Only apply to the previous base kernel version e.g. patch-2.6.18 patch will only apply to 2.6.17 release NOT to any 2.6.17.x or other kernel releases.
Upgrade from one specific release to another e.g. patch-2.6.17.x-y. To go from 184.108.40.206 to 220.127.116.11 need to apply two incremental patches 18.104.22.168-10 first, then 22.214.171.124-11.
The script './linux
There is also the program 'ketchup' which can do all this patching/upgrading automatically.