I am working on a project that requires me to install a Real Time Preempt kernel. I have found a tutorial and Linus Torvalds' readme (Creator of Linux kernel) that both explain that to install a vanilla kernel tree start with the following:

xz -cd linux-4.4.86.tar.xz | tar xvf -
cd linux-4.4.86

Then they each differ in what patch to add. The tutorial says I should download and apply:

Patch 2

xzcat ../patch-4.4.86-rt99.patch.xz | patch -p1

While Linus Torvald's repo says to execute:

Patch 2

xz -cd ../patch-4.4.86.xz | patch -p1

I know the first patch is required for my kernel to run in realtime, but is there a problem with me applying the second patch?

When I apply the second patch I get the following error message (which tells me I probably shouldn't be applying two patches):

xzcat ../patch-4.4.86.xz | patch -p1
patching file Documentation/arm64/silicon-errata.txt
Reversed (or previously applied) patch detected!  Assume -R? [n]

From what I've read, a patch just reads the differences between two files and corrects them, so would applying the second patch patch-4.9.47 remove the patch for RT or concatenate it? Any insight as to which step to take would be very helpful.

  • Not vested in this but I think the more recent will remove the older one. I thin that's how patches aught to work. – George Udosen Sep 13 '17 at 15:42
  • But doesn't each patch add some features, why would they be mutually exclusive? – Max Sep 14 '17 at 13:00
  • Yes they do what I meant was modify the older one not remove, sorry for using remove. – George Udosen Sep 14 '17 at 14:58

As it turns out, I only needed to apply the one patch. It is certainly possible to apply more than 1 path but this may cause compatibility issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.