How to add rt patches in linux

I want to add rt patches on Linux, I took the 3.18.9 kernel and patch 3.18.9-rt4. I copied patch-3.18.9-rt4.tar.gz to the Linux kernel folder. Now I have executed zcat patches-3.18.9-rt4.tar.gz | patch -p1 After executing this command, it requests a file for repair, as shown below.

|--- a/arch/sparc/Kconfig |+++ b/arch/sparc/Kconfig -------------------------- File to patch: 

I want to add all the patches at one time, How can I achieve this?

+5
source share
1 answer

Problem

The patch you use contains the RT patch as a large number of individual files attached to the tar archive, and then compressed into the gz file. Running zcat (or friends) in a file will unzip it and then pass the result to patch .

However, since the result after decompressing the patch file is a .tar archive, this is also what is passed to patch , which will not work.

A simple solution

Instead, use only the single-file version of the RT patch, which is just a compressed .patch file (these versions can be recognized by getting the name "patch -..." instead of "patches -...", 3.18.9-rt5 can be downloaded here: https://www.kernel.org/pub/linux/kernel/projects/rt/3.18/older/patch-3.18.9-rt5.patch.gz ).

Then follow the instructions from RT Preempt Howto : (just adjust it in your own kernel / compression version)

Kernel fix

After booting, unzip the kernel archive and change to the kernel source directory. Launch the kernel with patch level p1:

 tar xfj linux-2.6.23.1.tar.bz2 cd linux-2.6.23.1 bzcat ../patch-2.6.23.1-rt11.bz2 | patch -p1 
+5
source

Source: https://habr.com/ru/post/1232675/


All Articles