aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/applying-patches.txt29
1 files changed, 18 insertions, 11 deletions
diff --git a/Documentation/applying-patches.txt b/Documentation/applying-patches.txt
index 681e426e2482..05a08c2c1889 100644
--- a/Documentation/applying-patches.txt
+++ b/Documentation/applying-patches.txt
@@ -2,7 +2,8 @@
2 Applying Patches To The Linux Kernel 2 Applying Patches To The Linux Kernel
3 ------------------------------------ 3 ------------------------------------
4 4
5 (Written by Jesper Juhl, August 2005) 5 Original by: Jesper Juhl, August 2005
6 Last update: 2005-12-02
6 7
7 8
8 9
@@ -118,7 +119,7 @@ wrong.
118 119
119When patch encounters a change that it can't fix up with fuzz it rejects it 120When patch encounters a change that it can't fix up with fuzz it rejects it
120outright and leaves a file with a .rej extension (a reject file). You can 121outright and leaves a file with a .rej extension (a reject file). You can
121read this file to see exactely what change couldn't be applied, so you can 122read this file to see exactly what change couldn't be applied, so you can
122go fix it up by hand if you wish. 123go fix it up by hand if you wish.
123 124
124If you don't have any third party patches applied to your kernel source, but 125If you don't have any third party patches applied to your kernel source, but
@@ -127,7 +128,7 @@ and have made no modifications yourself to the source files, then you should
127never see a fuzz or reject message from patch. If you do see such messages 128never see a fuzz or reject message from patch. If you do see such messages
128anyway, then there's a high risk that either your local source tree or the 129anyway, then there's a high risk that either your local source tree or the
129patch file is corrupted in some way. In that case you should probably try 130patch file is corrupted in some way. In that case you should probably try
130redownloading the patch and if things are still not OK then you'd be advised 131re-downloading the patch and if things are still not OK then you'd be advised
131to start with a fresh tree downloaded in full from kernel.org. 132to start with a fresh tree downloaded in full from kernel.org.
132 133
133Let's look a bit more at some of the messages patch can produce. 134Let's look a bit more at some of the messages patch can produce.
@@ -180,9 +181,11 @@ wish to apply.
180 181
181Are there any alternatives to `patch'? 182Are there any alternatives to `patch'?
182--- 183---
183 Yes there are alternatives. You can use the `interdiff' program 184 Yes there are alternatives.
184(http://cyberelk.net/tim/patchutils/) to generate a patch representing the 185
185differences between two patches and then apply the result. 186 You can use the `interdiff' program (http://cyberelk.net/tim/patchutils/) to
187generate a patch representing the differences between two patches and then
188apply the result.
186This will let you move from something like 2.6.12.2 to 2.6.12.3 in a single 189This will let you move from something like 2.6.12.2 to 2.6.12.3 in a single
187step. The -z flag to interdiff will even let you feed it patches in gzip or 190step. The -z flag to interdiff will even let you feed it patches in gzip or
188bzip2 compressed form directly without the use of zcat or bzcat or manual 191bzip2 compressed form directly without the use of zcat or bzcat or manual
@@ -197,7 +200,7 @@ do the additional steps since interdiff can get things wrong in some cases.
197 Another alternative is `ketchup', which is a python script for automatic 200 Another alternative is `ketchup', which is a python script for automatic
198downloading and applying of patches (http://www.selenic.com/ketchup/). 201downloading and applying of patches (http://www.selenic.com/ketchup/).
199 202
200Other nice tools are diffstat which shows a summary of changes made by a 203 Other nice tools are diffstat which shows a summary of changes made by a
201patch, lsdiff which displays a short listing of affected files in a patch 204patch, lsdiff which displays a short listing of affected files in a patch
202file, along with (optionally) the line numbers of the start of each patch 205file, along with (optionally) the line numbers of the start of each patch
203and grepdiff which displays a list of the files modified by a patch where 206and grepdiff which displays a list of the files modified by a patch where
@@ -258,7 +261,7 @@ $ patch -p1 -R < ../patch-2.6.11.1 # revert the 2.6.11.1 patch
258 # source dir is now 2.6.11 261 # source dir is now 2.6.11
259$ patch -p1 < ../patch-2.6.12 # apply new 2.6.12 patch 262$ patch -p1 < ../patch-2.6.12 # apply new 2.6.12 patch
260$ cd .. 263$ cd ..
261$ mv linux-2.6.11.1 inux-2.6.12 # rename source dir 264$ mv linux-2.6.11.1 linux-2.6.12 # rename source dir
262 265
263 266
264The 2.6.x.y kernels 267The 2.6.x.y kernels
@@ -433,7 +436,11 @@ $ cd ..
433$ mv linux-2.6.12-mm1 linux-2.6.13-rc3-mm3 # rename the source dir 436$ mv linux-2.6.12-mm1 linux-2.6.13-rc3-mm3 # rename the source dir
434 437
435 438
436This concludes this list of explanations of the various kernel trees and I 439This concludes this list of explanations of the various kernel trees.
437hope you are now crystal clear on how to apply the various patches and help 440I hope you are now clear on how to apply the various patches and help testing
438testing the kernel. 441the kernel.
442
443Thank you's to Randy Dunlap, Rolf Eike Beer, Linus Torvalds, Bodo Eggert,
444Johannes Stezenbach, Grant Coady, Pavel Machek and others that I may have
445forgotten for their reviews and contributions to this document.
439 446