Linux – How to apply a patch correctly

linux-kernelpatch

I am trying to patch a linux 3.13.7 source tree to 3.13.8 using the patch-3.13.8.xz file. Since the patch file is in xz format, I used the following command to apply it while in the source tree:

unxz -cd ../patch-3.13.8.xz | patch -p1

But I receive:

Reversed (or previously applied) patch detected!  Assume -R? [n]

I have checked man patch for the -R flag and the description makes no sense to me. Can someone please explain what is going on and what I need to do to fix this?

Best Answer

When patching Linux kernel to the next minor version, you should use incremental patch. For your case, you should patch with patch-3.13.7-8.xz. This will patch your kernel source 3.13.7 to 3.13.8.

Related Question