You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When [building](building.md) your custom kernel you may wish to apply patches, or collections of patches ('patchsets') to the Linux kernel.
3
+
When [building](building.md) your custom kernel you may wish to apply patches, or collections of patches ('patchsets'), to the Linux kernel.
4
4
5
-
Patchsets are often provided with newer hardware as a temporary measure before the patches are applied to the upstream Linux kernel ('mainline') and then propagated down to the Raspberry Pi kernel sources. However, patchsets for other purposes exist; for instance to enable a fully preemptible kernel for real-time usage.
5
+
Patchsets are often provided with newer hardware as a temporary measure, before the patches are applied to the upstream Linux kernel ('mainline') and then propagated down to the Raspberry Pi kernel sources. However, patchsets for other purposes exist, for instance to enable a fully pre-emptible kernel for real-time usage.
6
6
7
-
## Version Identification
7
+
## Version identification
8
8
9
-
It's important to check what version of the kernel when downloading and applying patches. In a kernel source directory, the following command will show you the version the sources relate to:
9
+
It's important to check what version of the kernel you have when downloading and applying patches. In a kernel source directory, the following command will show you the version the sources relate to:
10
10
11
11
```
12
12
$ head Makefile -n 3
@@ -15,21 +15,21 @@ PATCHLEVEL = 10
15
15
SUBLEVEL = 25
16
16
```
17
17
18
-
In this instance the sources are for a 3.10.25 kernel, for example. You can see what version you're running on your system with the `uname -r` command.
18
+
In this instance, the sources are for a 3.10.25 kernel. You can see what version you're running on your system with the `uname -r` command.
19
19
20
20
## Applying patches
21
21
22
-
How you apply patches depends on the format in which the patches are made available. Most patches are a single file, and applied with the patch utility. For example, let's download and patch our example kernel version with the realtime kernel patches:
22
+
How you apply patches depends on the format in which the patches are made available. Most patches are a single file, and applied with the `patch` utility. For example, let's download and patch our example kernel version with the real-time kernel patches:
In our example we simply download the file, uncompress it, and then pass it to the patch utility using the cat tool and a Unix pipe.
30
+
In our example we simply download the file, uncompress it, and then pass it to the `patch` utility using the `cat` tool and a Unix pipe.
31
31
32
-
Some patchsets come as mailbox-format patchsets, arranged as a folder of patch files. We can use git to apply these patches to our kernel but first must configure git to let it know who we are when we make these changes.
32
+
Some patchsets come as mailbox-format patchsets, arranged as a folder of patch files. We can use Git to apply these patches to our kernel, but first we must configure Git to let it know who we are when we make these changes:
33
33
34
34
```
35
35
$ git config --global user.name "Your name"
@@ -42,4 +42,4 @@ Once we've done this we can apply the patches:
42
42
git am -3 /path/to/patches/*
43
43
```
44
44
45
-
If in doubt, consult with the distributor of the patches, who should tell you how to apply the patches. Some patchsets will require a specific *commit* to patch against; follow the details provided by the patch distributor.
45
+
If in doubt, consult with the distributor of the patches, who should tell you how to apply them. Some patchsets will require a specific commit to patch against; follow the details provided by the patch distributor.
0 commit comments