Linux – the purpose of patches of the linux kernel

linux-kernelpatch

For each Linux kernel version, there is a patch file available for download. For instance, linux-3.12.22 has a corresponding patch-3.12.22.

What is the purpose of that patch? To always patch the corresponding kernel before compiling it, or to bring a former kernel version up-to-date with the kernel that the patch matches (3.12.22, in this case)?

Best Answer

The purpose is to save lots of traffic.

The Linux tarball is around 75MB, whereas the patches usually just have a few KB.

So if you compile your own kernel, and update to each new minor version the day it is released, instead of redownloading a new 75MB tarball for each minor update, you just download (for example) the main tarball for a given version once and then the patch for the version you actually want. When there is an update you re-use the already downloaded main tarball.

linux-3.14.tar.xz + patch-3.14.{1..n}.xz is below 100MB in total.

linux-3.14.tar.xz + linux-3.14.{1..n}.tar.xz is several times 100MB.

There is no downside to patching, the final result is identical, unless you do something wrong.

Related Question