Linux Kernel Architecture

(Jacob Rumans) #1
Mauerer runapp02.tex V2 - 09/04/2008 6:09pm Page 1166

Appendix B: Working with the Source Code


Git does not rank behind BitKeeper in terms of kernel developer productivity. Because it is a very useful
tool to track kernel development history, investigate errors, and carry out programming work, the focus
here is on its most important characteristics. However, if you are interested in detailed information on
the capabilities of git, refer to the documentation that comes with the product.

When working with git, it is very useful to create acloneof Linus Torvalds’s repository as it
contains the ‘‘official‘‘ kernel versions. The repository of developer version 2.6 is available at
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git.Itcanbeclonedusing
the following command:

wolfgang@meitner>git clone git://git.kernel.org/pub/scm/linux/kernel/git-torvalds/linux-2.6.git


Depending on the network connection, a file transfer initiated by this command takes between a few
minutes and several hours (with extremely slow modems).

The following sections deal with several important commands used to track kernel development his-
tory, although these represent only part of the git functionality. Further information can be obtained by
invoking the online help withgit help. The help system provides an overview of available commands.
A detailed description of the individual commands can be requested by enteringgit helpcommand.

TrackingDevelopmentHistory


Git employscommitsto group development steps. When a new feature that requires modification of
severalfilesisaddedtothekernel,thechangestoallthefilesareconcentratedinacommitthatisapplied
as a whole to a repository. Each commit includes a comment to indicate the purpose of the change. An
individual comment may also be added to each file in a commit.

Displaying Commits


Thegit logcommand displays all commits applied to a repository. For example:

wolfgang@meitner>git log
commit f1d39b291e2263f5e2f2ec5d4061802f76d8ae67
tree 29c33d63b3679103459932d43b8818abdcc7d3d5
parent fd60ae404f104f12369e654af9cf03b1f1047661
author Unicorn Chang <[email protected]> Tue, 01 Aug 2006 12:18:07 +0800
committer Jeff Garzik <[email protected]> Thu, 03 Aug 2006 17:34:52 -0400

[PATCH] ahci: skip protocol test altogether in spurious interrupt code

Skip protocol test altogether in spurious interrupt code. If PIOS is receive
when it shouldn’t, ahci will raise protocol violation.

Signed-off-by: Unicorn Chang <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>

commit c54772e751c0262073e85a7aa87f093fc0dd44f1
tree 5b6ef64c20ac5c2027f73a59bc7a6b4b21f0b63e
parent e454358ace657af953b5b289f49cf733973f41e4
author Brice Goglin <[email protected]> Sun, 30 Jul 2006 00:14:15 -0400
committer Jeff Garzik <[email protected]> Thu, 03 Aug 2006 17:31:10 -0400

[PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler
Free download pdf