Skip to content

Commit ca543f3

Browse files
authored
Copy edit
1 parent 0dc2fbc commit ca543f3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

linux/kernel/patching.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Patching the Kernel
1+
# Patching the kernel
22

3-
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.
44

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.
66

7-
## Version Identification
7+
## Version identification
88

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:
1010

1111
```
1212
$ head Makefile -n 3
@@ -15,21 +15,21 @@ PATCHLEVEL = 10
1515
SUBLEVEL = 25
1616
```
1717

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.
1919

2020
## Applying patches
2121

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:
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:
2323

2424
```
2525
$ wget https://www.kernel.org/pub/linux/kernel/projects/rt/3.10/older/patch-3.10.25-rt23.patch.gz
2626
$ gunzip patch-3.10.25-rt23.patch.gz
2727
$ cat patch-3.10.25-rt23.patch | patch -p1
2828
```
2929

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.
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.
3131

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:
3333

3434
```
3535
$ git config --global user.name "Your name"
@@ -42,4 +42,4 @@ Once we've done this we can apply the patches:
4242
git am -3 /path/to/patches/*
4343
```
4444

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

Comments
 (0)