Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add rt patches in linux

Tags:

linux

patch

I want to add rt patches to Linux, i took 3.18.9 kernel and 3.18.9-rt4 patch. i copied patches-3.18.9-rt4.tar.gz into Linux kernel folder. Now I executed zcat patches-3.18.9-rt4.tar.gz | patch -p1 After executing this command it is asking for file to patch as shown below

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

I want to add all patches in one go, How can I achieve this ?

like image 957
anikhan Avatar asked Oct 01 '15 06:10

anikhan


1 Answers

The problem

The patch you are using contains the RT patch as a large number of separate files, bundled up into a tar archive, then compressed into a gz file. Running zcat (or friends) on the file will uncompress it, then pass the result to patch.

However, since the result after uncompressing your patch file is a .tar archive, this is also what is passed into patch, which isn't going to work.

The easy solution

Use the single-file version of the RT patch instead, which is just a compressed .patch file (these versions can be recognized by being called "patch-..." instead of "patches-...", 3.18.9-rt5 can be downloaded from 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 the RT Preempt Howto: (just adjust it to your own kernel version / compression format)

Patching the Kernel

After downloading, unpack the kernel tarball and change into the kernel source directory. Patch 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
like image 173
sonicwave Avatar answered Sep 23 '22 23:09

sonicwave