Linux Journal: The Kernel Hacker’s Guide to Source Code Control

“Many issues involved with Linux kernel development are
different from traditional software development processes. When
working on a portion of the kernel (or a specific driver), you need
to 1) stay aware of changes that are happening to other portions of
the kernel with which you interact, 2) constantly apply your
changes to the moving target of a fast-based kernel development
release schedule, 3) resolve any merge conflicts between changes
you have made and changes made by other people and 4) be able to
export your changes in a format others can use easily.

“For a number of years, I developed and maintained the USB to
serial port drivers and then eventually took over maintaining all
of the USB code in the kernel. In this article, I explain some of
the tools I used in the past to do this work and show how some new
tools have enhanced my ability to keep on top of changes in the
kernel and let me do my job with less effort.

“One of the most common methods of doing kernel work is to use
the patch and diff programs. You can use this and no other type of
source-code control system to do kernel development. One way is to
use two different directory trees: a ‘clean’ one and a ‘working’
one. The clean tree is a released kernel version, while the working
one is based on the same released kernel version, but contains your
modifications. Then you can use patch and diff to extract your
changes and forward port these changes to a new kernel


Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis