hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/process/applying-patches.rst
....@@ -216,20 +216,20 @@
216216 generate a patch representing the differences between two patches and then
217217 apply the result.
218218
219
-This will let you move from something like 4.7.2 to 4.7.3 in a single
219
+This will let you move from something like 5.7.2 to 5.7.3 in a single
220220 step. The -z flag to interdiff will even let you feed it patches in gzip or
221221 bzip2 compressed form directly without the use of zcat or bzcat or manual
222222 decompression.
223223
224
-Here's how you'd go from 4.7.2 to 4.7.3 in a single step::
224
+Here's how you'd go from 5.7.2 to 5.7.3 in a single step::
225225
226
- interdiff -z ../patch-4.7.2.gz ../patch-4.7.3.gz | patch -p1
226
+ interdiff -z ../patch-5.7.2.gz ../patch-5.7.3.gz | patch -p1
227227
228228 Although interdiff may save you a step or two you are generally advised to
229229 do the additional steps since interdiff can get things wrong in some cases.
230230
231231 Another alternative is ``ketchup``, which is a python script for automatic
232
-downloading and applying of patches (http://www.selenic.com/ketchup/).
232
+downloading and applying of patches (https://www.selenic.com/ketchup/).
233233
234234 Other nice tools are diffstat, which shows a summary of changes made by a
235235 patch; lsdiff, which displays a short listing of affected files in a patch
....@@ -241,66 +241,71 @@
241241 Where can I download the patches?
242242 =================================
243243
244
-The patches are available at http://kernel.org/
244
+The patches are available at https://kernel.org/
245245 Most recent patches are linked from the front page, but they also have
246246 specific homes.
247247
248
-The 4.x.y (-stable) and 4.x patches live at
248
+The 5.x.y (-stable) and 5.x patches live at
249249
250
- https://www.kernel.org/pub/linux/kernel/v4.x/
250
+ https://www.kernel.org/pub/linux/kernel/v5.x/
251251
252
-The -rc patches live at
252
+The -rc patches are not stored on the webserver but are generated on
253
+demand from git tags such as
253254
254
- https://www.kernel.org/pub/linux/kernel/v4.x/testing/
255
+ https://git.kernel.org/torvalds/p/v5.1-rc1/v5.0
256
+
257
+The stable -rc patches live at
258
+
259
+ https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/
255260
256261
257
-The 4.x kernels
262
+The 5.x kernels
258263 ===============
259264
260265 These are the base stable releases released by Linus. The highest numbered
261266 release is the most recent.
262267
263268 If regressions or other serious flaws are found, then a -stable fix patch
264
-will be released (see below) on top of this base. Once a new 4.x base
269
+will be released (see below) on top of this base. Once a new 5.x base
265270 kernel is released, a patch is made available that is a delta between the
266
-previous 4.x kernel and the new one.
271
+previous 5.x kernel and the new one.
267272
268
-To apply a patch moving from 4.6 to 4.7, you'd do the following (note
269
-that such patches do **NOT** apply on top of 4.x.y kernels but on top of the
270
-base 4.x kernel -- if you need to move from 4.x.y to 4.x+1 you need to
271
-first revert the 4.x.y patch).
273
+To apply a patch moving from 5.6 to 5.7, you'd do the following (note
274
+that such patches do **NOT** apply on top of 5.x.y kernels but on top of the
275
+base 5.x kernel -- if you need to move from 5.x.y to 5.x+1 you need to
276
+first revert the 5.x.y patch).
272277
273278 Here are some examples::
274279
275
- # moving from 4.6 to 4.7
280
+ # moving from 5.6 to 5.7
276281
277
- $ cd ~/linux-4.6 # change to kernel source dir
278
- $ patch -p1 < ../patch-4.7 # apply the 4.7 patch
282
+ $ cd ~/linux-5.6 # change to kernel source dir
283
+ $ patch -p1 < ../patch-5.7 # apply the 5.7 patch
279284 $ cd ..
280
- $ mv linux-4.6 linux-4.7 # rename source dir
285
+ $ mv linux-5.6 linux-5.7 # rename source dir
281286
282
- # moving from 4.6.1 to 4.7
287
+ # moving from 5.6.1 to 5.7
283288
284
- $ cd ~/linux-4.6.1 # change to kernel source dir
285
- $ patch -p1 -R < ../patch-4.6.1 # revert the 4.6.1 patch
286
- # source dir is now 4.6
287
- $ patch -p1 < ../patch-4.7 # apply new 4.7 patch
289
+ $ cd ~/linux-5.6.1 # change to kernel source dir
290
+ $ patch -p1 -R < ../patch-5.6.1 # revert the 5.6.1 patch
291
+ # source dir is now 5.6
292
+ $ patch -p1 < ../patch-5.7 # apply new 5.7 patch
288293 $ cd ..
289
- $ mv linux-4.6.1 linux-4.7 # rename source dir
294
+ $ mv linux-5.6.1 linux-5.7 # rename source dir
290295
291296
292
-The 4.x.y kernels
297
+The 5.x.y kernels
293298 =================
294299
295300 Kernels with 3-digit versions are -stable kernels. They contain small(ish)
296301 critical fixes for security problems or significant regressions discovered
297
-in a given 4.x kernel.
302
+in a given 5.x kernel.
298303
299304 This is the recommended branch for users who want the most recent stable
300305 kernel and are not interested in helping test development/experimental
301306 versions.
302307
303
-If no 4.x.y kernel is available, then the highest numbered 4.x kernel is
308
+If no 5.x.y kernel is available, then the highest numbered 5.x kernel is
304309 the current stable kernel.
305310
306311 .. note::
....@@ -308,23 +313,23 @@
308313 The -stable team usually do make incremental patches available as well
309314 as patches against the latest mainline release, but I only cover the
310315 non-incremental ones below. The incremental ones can be found at
311
- https://www.kernel.org/pub/linux/kernel/v4.x/incr/
316
+ https://www.kernel.org/pub/linux/kernel/v5.x/incr/
312317
313
-These patches are not incremental, meaning that for example the 4.7.3
314
-patch does not apply on top of the 4.7.2 kernel source, but rather on top
315
-of the base 4.7 kernel source.
318
+These patches are not incremental, meaning that for example the 5.7.3
319
+patch does not apply on top of the 5.7.2 kernel source, but rather on top
320
+of the base 5.7 kernel source.
316321
317
-So, in order to apply the 4.7.3 patch to your existing 4.7.2 kernel
318
-source you have to first back out the 4.7.2 patch (so you are left with a
319
-base 4.7 kernel source) and then apply the new 4.7.3 patch.
322
+So, in order to apply the 5.7.3 patch to your existing 5.7.2 kernel
323
+source you have to first back out the 5.7.2 patch (so you are left with a
324
+base 5.7 kernel source) and then apply the new 5.7.3 patch.
320325
321326 Here's a small example::
322327
323
- $ cd ~/linux-4.7.2 # change to the kernel source dir
324
- $ patch -p1 -R < ../patch-4.7.2 # revert the 4.7.2 patch
325
- $ patch -p1 < ../patch-4.7.3 # apply the new 4.7.3 patch
328
+ $ cd ~/linux-5.7.2 # change to the kernel source dir
329
+ $ patch -p1 -R < ../patch-5.7.2 # revert the 5.7.2 patch
330
+ $ patch -p1 < ../patch-5.7.3 # apply the new 5.7.3 patch
326331 $ cd ..
327
- $ mv linux-4.7.2 linux-4.7.3 # rename the kernel source dir
332
+ $ mv linux-5.7.2 linux-5.7.3 # rename the kernel source dir
328333
329334 The -rc kernels
330335 ===============
....@@ -343,38 +348,38 @@
343348 development kernels but do not want to run some of the really experimental
344349 stuff (such people should see the sections about -next and -mm kernels below).
345350
346
-The -rc patches are not incremental, they apply to a base 4.x kernel, just
347
-like the 4.x.y patches described above. The kernel version before the -rcN
351
+The -rc patches are not incremental, they apply to a base 5.x kernel, just
352
+like the 5.x.y patches described above. The kernel version before the -rcN
348353 suffix denotes the version of the kernel that this -rc kernel will eventually
349354 turn into.
350355
351
-So, 4.8-rc5 means that this is the fifth release candidate for the 4.8
352
-kernel and the patch should be applied on top of the 4.7 kernel source.
356
+So, 5.8-rc5 means that this is the fifth release candidate for the 5.8
357
+kernel and the patch should be applied on top of the 5.7 kernel source.
353358
354359 Here are 3 examples of how to apply these patches::
355360
356
- # first an example of moving from 4.7 to 4.8-rc3
361
+ # first an example of moving from 5.7 to 5.8-rc3
357362
358
- $ cd ~/linux-4.7 # change to the 4.7 source dir
359
- $ patch -p1 < ../patch-4.8-rc3 # apply the 4.8-rc3 patch
363
+ $ cd ~/linux-5.7 # change to the 5.7 source dir
364
+ $ patch -p1 < ../patch-5.8-rc3 # apply the 5.8-rc3 patch
360365 $ cd ..
361
- $ mv linux-4.7 linux-4.8-rc3 # rename the source dir
366
+ $ mv linux-5.7 linux-5.8-rc3 # rename the source dir
362367
363
- # now let's move from 4.8-rc3 to 4.8-rc5
368
+ # now let's move from 5.8-rc3 to 5.8-rc5
364369
365
- $ cd ~/linux-4.8-rc3 # change to the 4.8-rc3 dir
366
- $ patch -p1 -R < ../patch-4.8-rc3 # revert the 4.8-rc3 patch
367
- $ patch -p1 < ../patch-4.8-rc5 # apply the new 4.8-rc5 patch
370
+ $ cd ~/linux-5.8-rc3 # change to the 5.8-rc3 dir
371
+ $ patch -p1 -R < ../patch-5.8-rc3 # revert the 5.8-rc3 patch
372
+ $ patch -p1 < ../patch-5.8-rc5 # apply the new 5.8-rc5 patch
368373 $ cd ..
369
- $ mv linux-4.8-rc3 linux-4.8-rc5 # rename the source dir
374
+ $ mv linux-5.8-rc3 linux-5.8-rc5 # rename the source dir
370375
371
- # finally let's try and move from 4.7.3 to 4.8-rc5
376
+ # finally let's try and move from 5.7.3 to 5.8-rc5
372377
373
- $ cd ~/linux-4.7.3 # change to the kernel source dir
374
- $ patch -p1 -R < ../patch-4.7.3 # revert the 4.7.3 patch
375
- $ patch -p1 < ../patch-4.8-rc5 # apply new 4.8-rc5 patch
378
+ $ cd ~/linux-5.7.3 # change to the kernel source dir
379
+ $ patch -p1 -R < ../patch-5.7.3 # revert the 5.7.3 patch
380
+ $ patch -p1 < ../patch-5.8-rc5 # apply new 5.8-rc5 patch
376381 $ cd ..
377
- $ mv linux-4.7.3 linux-4.8-rc5 # rename the kernel source dir
382
+ $ mv linux-5.7.3 linux-5.8-rc5 # rename the kernel source dir
378383
379384
380385 The -mm patches and the linux-next tree