.. | .. |
---|
216 | 216 | generate a patch representing the differences between two patches and then |
---|
217 | 217 | apply the result. |
---|
218 | 218 | |
---|
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 |
---|
220 | 220 | step. The -z flag to interdiff will even let you feed it patches in gzip or |
---|
221 | 221 | bzip2 compressed form directly without the use of zcat or bzcat or manual |
---|
222 | 222 | decompression. |
---|
223 | 223 | |
---|
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:: |
---|
225 | 225 | |
---|
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 |
---|
227 | 227 | |
---|
228 | 228 | Although interdiff may save you a step or two you are generally advised to |
---|
229 | 229 | do the additional steps since interdiff can get things wrong in some cases. |
---|
230 | 230 | |
---|
231 | 231 | 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/). |
---|
233 | 233 | |
---|
234 | 234 | Other nice tools are diffstat, which shows a summary of changes made by a |
---|
235 | 235 | patch; lsdiff, which displays a short listing of affected files in a patch |
---|
.. | .. |
---|
241 | 241 | Where can I download the patches? |
---|
242 | 242 | ================================= |
---|
243 | 243 | |
---|
244 | | -The patches are available at http://kernel.org/ |
---|
| 244 | +The patches are available at https://kernel.org/ |
---|
245 | 245 | Most recent patches are linked from the front page, but they also have |
---|
246 | 246 | specific homes. |
---|
247 | 247 | |
---|
248 | | -The 4.x.y (-stable) and 4.x patches live at |
---|
| 248 | +The 5.x.y (-stable) and 5.x patches live at |
---|
249 | 249 | |
---|
250 | | - https://www.kernel.org/pub/linux/kernel/v4.x/ |
---|
| 250 | + https://www.kernel.org/pub/linux/kernel/v5.x/ |
---|
251 | 251 | |
---|
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 |
---|
253 | 254 | |
---|
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/ |
---|
255 | 260 | |
---|
256 | 261 | |
---|
257 | | -The 4.x kernels |
---|
| 262 | +The 5.x kernels |
---|
258 | 263 | =============== |
---|
259 | 264 | |
---|
260 | 265 | These are the base stable releases released by Linus. The highest numbered |
---|
261 | 266 | release is the most recent. |
---|
262 | 267 | |
---|
263 | 268 | 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 |
---|
265 | 270 | 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. |
---|
267 | 272 | |
---|
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). |
---|
272 | 277 | |
---|
273 | 278 | Here are some examples:: |
---|
274 | 279 | |
---|
275 | | - # moving from 4.6 to 4.7 |
---|
| 280 | + # moving from 5.6 to 5.7 |
---|
276 | 281 | |
---|
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 |
---|
279 | 284 | $ cd .. |
---|
280 | | - $ mv linux-4.6 linux-4.7 # rename source dir |
---|
| 285 | + $ mv linux-5.6 linux-5.7 # rename source dir |
---|
281 | 286 | |
---|
282 | | - # moving from 4.6.1 to 4.7 |
---|
| 287 | + # moving from 5.6.1 to 5.7 |
---|
283 | 288 | |
---|
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 |
---|
288 | 293 | $ 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 |
---|
290 | 295 | |
---|
291 | 296 | |
---|
292 | | -The 4.x.y kernels |
---|
| 297 | +The 5.x.y kernels |
---|
293 | 298 | ================= |
---|
294 | 299 | |
---|
295 | 300 | Kernels with 3-digit versions are -stable kernels. They contain small(ish) |
---|
296 | 301 | critical fixes for security problems or significant regressions discovered |
---|
297 | | -in a given 4.x kernel. |
---|
| 302 | +in a given 5.x kernel. |
---|
298 | 303 | |
---|
299 | 304 | This is the recommended branch for users who want the most recent stable |
---|
300 | 305 | kernel and are not interested in helping test development/experimental |
---|
301 | 306 | versions. |
---|
302 | 307 | |
---|
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 |
---|
304 | 309 | the current stable kernel. |
---|
305 | 310 | |
---|
306 | 311 | .. note:: |
---|
.. | .. |
---|
308 | 313 | The -stable team usually do make incremental patches available as well |
---|
309 | 314 | as patches against the latest mainline release, but I only cover the |
---|
310 | 315 | 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/ |
---|
312 | 317 | |
---|
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. |
---|
316 | 321 | |
---|
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. |
---|
320 | 325 | |
---|
321 | 326 | Here's a small example:: |
---|
322 | 327 | |
---|
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 |
---|
326 | 331 | $ 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 |
---|
328 | 333 | |
---|
329 | 334 | The -rc kernels |
---|
330 | 335 | =============== |
---|
.. | .. |
---|
343 | 348 | development kernels but do not want to run some of the really experimental |
---|
344 | 349 | stuff (such people should see the sections about -next and -mm kernels below). |
---|
345 | 350 | |
---|
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 |
---|
348 | 353 | suffix denotes the version of the kernel that this -rc kernel will eventually |
---|
349 | 354 | turn into. |
---|
350 | 355 | |
---|
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. |
---|
353 | 358 | |
---|
354 | 359 | Here are 3 examples of how to apply these patches:: |
---|
355 | 360 | |
---|
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 |
---|
357 | 362 | |
---|
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 |
---|
360 | 365 | $ 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 |
---|
362 | 367 | |
---|
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 |
---|
364 | 369 | |
---|
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 |
---|
368 | 373 | $ 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 |
---|
370 | 375 | |
---|
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 |
---|
372 | 377 | |
---|
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 |
---|
376 | 381 | $ 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 |
---|
378 | 383 | |
---|
379 | 384 | |
---|
380 | 385 | The -mm patches and the linux-next tree |
---|