- 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-22.214.171.124 will only apply to the 2.6.17 kernel release NOT to the 126.96.36.199 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 188.8.131.52 to 184.108.40.206 need to apply two incremental patches 220.127.116.11-10 first, then 18.104.22.168-11.
The script './linux
There is also the program 'ketchup' which can do all this patching/upgrading automatically.