Kernel

From OLPC
Jump to navigation Jump to search

We use a modified version of the Linux kernel on the OLPC laptop.

The OLPC kernel git repository

We use git to track changes that we've made, as well as to easily merge with Linus's (and others!) kernel tree. The git repository can be downloading with the following command:

git clone git://dev.laptop.org/olpc-2.6

Alternatively, you can use gitweb to view and search changes by going to:

http://dev.laptop.org/git?p=olpc-2.6;a=summary

Note that at the bottom of that page, there is a list of branches. We keep around different branches for a number of reasons; within a cloned git repository, you can switch to branch 'FOO' by running:

git checkout FOO

The branches currently in use are:

  • master - this is the default branch, and is the equivalent of cvs's HEAD. Code that we want in our future releases goes into this branch, and needs to be vetted before being committed.
  • stable - this is the branch that we automatically pull kernels from when we build a release. It is usually a snapshot of the 'master' branch, although we sometimes cherry-pick fixes into it.
  • powermgmt - this branch is where all the power management (suspend/resume) activity is happening. The code in this tree is committed as necessary in order to get things related to power management working. Use this tree if you'd like suspend/resume to work; however, there are no guarantees that it won't cause your XO to feed you to the kittens.
  • origin - this is a git-ism; it basically marks where the 'master' branch was checked out from. It can be ignored.
  • devtree - this branch is being used for development on the in-kernel OpenFirmware device tree.

The other branches are no longer used, and can be ignored.

OLPC kernel configuration

The Linux kernel has a config file that describes the various options that are built into the kernel. For OLPC, we store that in the root of the git repository, in the '.config' file. Via gitweb, it can be viewed (for the 'master' branch) here:

http://dev.laptop.org/git?p=olpc-2.6;a=blob;h=5d17aae5c1f0870942059ee5673524d5f0fecc16;hb=bf6f56ec50707ddef93d893474c9b72b9d3727c6;f=.config

For official OLPC kernel RPMS (and on OLPC OS images), the config ends up being installed as /boot/config-$VERS. This allows you to see how the currently running kernel is configured.