How will it benefit the entire community

When making a coding patch for Linux, the first thing that you will want to do is download the source tree. The source tree is a directory that contains all of the source code for the Linux kernel. To download it, go to git clone

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git.
You can download it for free.

Step 2: Code in your patch.

Linux patches must be written in the format “unified diff.” If you aren’t familiar with coding, read the additional books in this series to get a better understanding of how to move forward in this area. Patches are usually begun like this:

SRCTREE= linux

MYFILE= drivers/net/mydriver.c

cd $SRCTREE

cp $MYFILE $MYFILE.orig

vi $MYFILE # make your change

cd ..

diff -up $SRCTREE/$MYFILE.orig, > /tmp/patch

Make sure that you only write in one patch at a time, as this makes the process of submitting your patches much easier.

Step 3: Pitch your patch.

A moderator is going to review your patch before it can become a part of the Linux protocol. In order for him or her to think that your patch is worth the effort, you need to pitch it. Clearly explain exactly what your patch is intended for. Are you writing code for an improvement, or are you trying to fix a line or two of code to eliminate some bugs? State exactly what your objective is and why your patch is a necessary improvement. How will it help people? How will it benefit the entire community? Clearly answer these questions.

Popular Posts