OS Builder

From OLPC
Revision as of 10:38, 8 July 2010 by DanielDrake (talk | contribs)
Jump to: navigation, search

olpc-os-builder or OS Builder is a utility that allows you to build OS images for XO-1 and XO-1.5 laptops, including various customizations.

Starting in December 2009, it is the build tool used to produce official OLPC OS releases.

This utility makes it easy for you to replicate the OLPC OS build, as well as allowing you to make your own customizations, using a different set of activities, and so on.

Download and install

The plan is to package olpc-os-builder and include it in official Fedora (so that it can be installed simply through yum). As this work has not yet been completed, the process is a little more complicated.

First, you need to identify which version of OLPC OS you wish to replicate or customize. You need to use the same version of olpc-os-builder that OLPC used to make the official release. The table below will help you to identify this.

On your image-constructing host system, it is strongly advisable to use the same version as Fedora that OLPC used to create the official release. That information can also be found in the table below.

OLPC OS version olpc-os-builder version Built using
10.1.0 (XO-1.5 only) 1.0.0 (Download) Fedora 11
10.1.1 (XO-1.5 only) 1.1.0 (Download) Fedora 11

Download the appropriate olpc-os-builder version from the table above. As your regular Linux user, extract the sources with the following command:

# tar xvjf olpc-os-builder-*.tar.bz2

A new directory will be created under the existing one (e.g. olpc-os-builder-1.1.0), with the contents of the utility. Use cd to change directory, e.g.:

# cd olpc-os-builder-1.1.0

You are now ready to follow the remainder of the installation instructions, which can be found in doc/README within the olpc-os-builder directory.

Usage

Each build is made from a specific configuration file.

  • To reconstruct an OLPC OS release exactly (without customizations), you will simply reuse the configuration file that was used by OLPC, which is included in the olpc-os-builder
  • To customize an OLPC OS release, you will make a copy of the specific OLPC OS configuration file, and make your own customizations.

The files used to build OLPC OS releases can be found in the examples/ subdirectory of olpc-os-builder. For example, examples/olpc-os-10.1.1-xo1.5.ini was the configuration used by OLPC to construct the official OLPC OS 10.1.1 for XO-1.5 release.

Download/install development version

In the situation that you wish to reconstruct or customize an unreleased/development OLPC OS version, instead of using a released version of olpc-os-builder you will have to check out the most recent development version of olpc-os-builder from git. Note that the development version will not be able to (correctly) reconstruct or customize official OLPC OS releases which have been finalized (use the above process to obtain the correct olpc-os-builder version for that purpose).

As root, run:

# yum install git

Then, as your regular user:

# git clone git://dev.laptop.org/projects/olpc-os-builder
# cd olpc-os-builder

Now follow the documentation at doc/README

To update your local copy of the development version with any changes that have been made by OLPC since your initial checkout, as your regular user run:

# cd olpc-os-builder
# git pull

Then, as root, repeat the following part of the installation process again:

# make install

Development OS releases are usually made with the following build configurations:

  • examples/f11-xo1.ini for XO-1
  • examples/f11-xo1.5.ini for XO-1.5

Signing preparation

Certain funcionalities of the signing module have an additional requirement: you need to check out and build OLPC's bios-crypto code. As your regular user in (e.g.) your home directory, run the following commands:

# git clone git://dev.laptop.org/bios-crypto
# cd bios-crypto/build
# make

You can now point the signing module configuration at the bios-crypto directory.