SuSE Support Database

Title: Applying kernel patches

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

Applying kernel patches

Question:

How do I patch the kernel?

Answer:

In the following example we want to patch the kernel 2.0.28 to 2.0.29. A necessary precondition is of course the availability of both the 2.0.28 source tree and the 2.0.29 patch. Change into the directory /usr/src/linux-2.0.28. For a compressed patch, enter the following command :
        cd /usr/src/linux-2.0.28
        zcat /tmp/patch-2.0.29.gz | patch -p1 2> out
The same procedure can be used when applying S.u.S.E. patches from ftp.suse.com. E.g.
        cd /usr/src/linux-2.0.33
        zcat /tmp/suse-2.0.33.gz | patch -p1 2> out

In both cases you should check the file "out" for error messages.

Accordingly the command for an uncompressed patch is

        patch -p1 < /tmp/patch-2.0.29 2> out
The parameter -p is very important! It specifies how many elements of the path, from which the patch was made, should be removed. If you are e.g. in the directory /usr/src, then you could simply use -p0 as parameter. However usually several kernel versions are available at the same time. Therefore it is highly recommended to change into the desired directory and to apply the patch with the switch -p1. This ensures, that the right source tree is being patched. Please read the man page for patch for further information.

If you would like to patch a kernel 2.0.0 to 2.0.29, then you must apply all patches from patch-2.0.1.gz until patch-2.0.29.gz one after the other!

After having applied the patches, you must configure, compile and install the kernel. This is described in the kernel chapter of the handbook. Don't forget the modules

---

Keywords: KERNEL, PATCH

---

Categories: Kernel

---

Feedback welcome: Send Mail to mantel@suse.de (Please give the following subject: SDB-kernelpatch)

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-kernelpatch, Copyright SuSE GmbH, Nuremberg, Germany - Version: 25. Mar 1997
Impressum - Last generated: 24. Feb 1999 14:53:55 by maddin with sdb_gen 1.00.0