Kernel: Difference between revisions
DanielDrake (talk | contribs) No edit summary |
|||
Line 12: | Line 12: | ||
Current maintainers: Chris Ball, Daniel Drake, Paul Fox |
Current maintainers: Chris Ball, Daniel Drake, Paul Fox |
||
We work on specific git branches for each operating system release. |
|||
⚫ | |||
{| border="1" cellspacing="0" cellpadding="2" width="100%" class="wikitable" |
|||
! operating system release |
|||
! git branches |
|||
|- |
|||
| [[11.2.0]] |
|||
| [http://dev.laptop.org/git/olpc-2.6/log/?h=olpc-2.6.35 olpc-2.6.35] |
|||
|- |
|||
| [[Release_notes/10.1.3|10.1.3]] |
|||
| [http://dev.laptop.org/git/olpc-2.6/log/?h=olpc-2.6.31 olpc-2.6.31] |
|||
|} |
|||
⚫ | |||
OLPC-specific configurations can be found at arch/x86/configs/, these are what we use for automated builds and official releases. This configuration is also installed in /boot in our software releases. |
OLPC-specific configurations can be found at arch/x86/configs/, these are what we use for automated builds and official releases. This configuration is also installed in /boot in our software releases. |
Revision as of 05:42, 27 May 2011
The OLPC kernel
OLPC OS Releases use our OLPC-modified version of the Linux kernel.
The OLPC kernel is maintained in git:
Current maintainers: Chris Ball, Daniel Drake, Paul Fox
We work on specific git branches for each operating system release.
operating system release | git branches |
---|---|
11.2.0 | olpc-2.6.35 |
10.1.3 | olpc-2.6.31 |
Or looking at git history may identify which branches we are actively working on, and looking at the version of each branch compared to the kernel shipped in each release will help you identify which branch corresponds to which release(s).
OLPC-specific configurations can be found at arch/x86/configs/, these are what we use for automated builds and official releases. This configuration is also installed in /boot in our software releases.
Questions and contributions should be sent to the devel mailing list.
Installing kernel RPMs
Due to OLPC's versioned filesystem layout, installing a new kernel RPM is not enough for it to become active on reboot. This is explained in detail in /boot/README. To summarise, after installing a kernel you must copy it to a special place:
If running a software release that uses partitions:
rsync --delete-before -av /boot/ /bootpart/boot/
If running a software release that does not use partitions:
cp -a /boot/* /versions/boot/current/boot/
Building an OLPC kernel
- Check out the kernel from git
- Switch to the appropriate branch
- Make your changes (updating the configs under arch/x86/configs/ if changes are needed)
- Commit all your changes
- Run make clean distclean
- Run make xo_1-kernel-rpm for XO-1, or make xo_1_5-kernel-rpm for XO-1.5.
RPM files will be output which you can install on an XO (with the above versioned filesystem layout issues in mind).
Automatic RPM generation
Some branches are automatically built every 30 minutes (but only when there are new changes), the results are published at http://dev.laptop.org/~kernels/
The directories you see there are also linked to RPM dropboxes, therefore are automatically published for inclusion in development builds. In other words, to get your kernel changes included in the current software release development efforts, you simply have to push your changes to the correct branch of olpc-2.6.
The utility behind this magic is olpc-kernel-builder:
- http://dev.laptop.org/git/projects/olpc-kernel-builder/
- git://dev.laptop.org/projects/olpc-kernel-builder
- Maintainer: Chris Ball
Running vanilla kernels
In late 2010, OLPC started a focused effort to upstream its kernel patches so that unmodified "vanilla" kernels run with complete functionality on the XO.
As of 2.6.38 this is coming along nicely, and these efforts will continue til everything is upstream. Unmodified kernels run reasonably well with most functionality available.
You may have to hunt around a bit to satisfy the configuration options so that the relevant drivers get built, and the XO-1.5 needs some special kernel parameters to boot (you can find them in a recent olpc-2.6 branch in the XO-1.5 defconfig as CONFIG_CMDLINE). If in doubt, feel free to ask on the devel mailing list for someone's recent .config file.
Boot your development kernel from USB
When doing kernel development, it is time consuming to commit each small change, make an RPM, install RPM on the XO, reboot, and test. Instead, you can follow this procedure:
On your development system, prepare a USB disk as follows:
- /boot/olpc.fth (download for XO-1 or XO-1.5, be sure to rename to olpc.fth)
- /boot/irfs.img (download here - this is a hacked OLPC initramfs which doesn't require /ofw support)
- /boot/bzImage (your kernel that you want to test)
Now plug this disk into your XO, turn it on, and the system will load the kernel from USB while booting the rest of the system as normal. If your new kernel crashes badly, just unplug the USB disk and boot the system again - it will revert to booting the "good" kernel from local disk.
Note: for XO-1 this only works with JFFS2. (small tweaks to olpc.fth or the hacked initramfs would be needed for ubifs).