How to apply the kernel patch
Code View:
Bash> cd/usr/src
Bash> wget www.kernel.org/pub/linux/kernel/people/akpm/patches/X.Y/X.Y.Z/X.Y.Zmm2/
X.Y.Z-mm2.bz2
Apply the patch:
Bash> cd/usr/src/linux-X.Y.Z/
Bash> bzip2-dc ../X.Y.Z-mm2.bz2 | patch-p1
The-dc option asks bzip2 to uncompress the specified files to standard output. This is piped to the patch utility,
Which applies changes to each modified file in the code tree.
To generate a kernel patch out of your changes, use the diff command:
Code View:
Bash> diff-Nur/path/to/original/kernel/path/to/your/kernel> changes. patch
Note that the original kernel precedes the changed version in the diff-ing order. As per 2.6 kernel
Patch submission conventions, you also need to add a line at the end of the patch that says this:
Signed-off-by: Name <Email>
With this, you cershould that you wrote the code yourself and that you have the right to contribute it.