OS Builder

From OLPC
Revision as of 16:38, 9 April 2011 by DanielDrake (talk | contribs)
Jump to navigation Jump to search

olpc-os-builder or OS Builder is a utility that allows you to build operating system (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 an 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 the olpc-os-builder version.

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, so that you avoid encountering problems due to changes between Fedora versions. The version of Fedora OLPC used is also in the table.

{{#ask: Status::released Build system::OS Builder

 |mainlabel=OLPC OS version
 |?Target platforms
 |?Build system version = olpc-os-builder version
 |?Build platform = Built using
 |sort=Release date
 |order=descending

}}

The first step is to prepare a computer system by installing the Fedora version that matches the build that you wish to reproduce/customise (see the above table).

Next, you need to download the olpc-os-builder sources, which you can find here. The version that you should download is listed in the above table. Note that the above table shows (e.g.) v1.3.x for release 10.1.3, this means that you should take the latest olpc-os-builder version starting with version number v1.3. The official release will have been built with v1.3.0, but later olpc-os-builder releases are guaranteed not to change the default reconstructed output, but will solve build problems under different environments and perhaps offer you some more customization options.

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), reuse the configuration file that was used by OLPC, which is included in the olpc-os-builder,
  • To customize an OLPC OS release, make a copy of the OLPC OS configuration file, and make your own customizations.

The configuration 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

Source code

If you wish to reconstruct or customize an unreleased/development OLPC OS version, instead of using a released version of olpc-os-builder, 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 quick-start instructions at doc/README.devel

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:

Signing preparation

The signing module has 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.

Recipes

Your goals are not covered in the recipes above? Check the README files included in the modules for a more complete list of options.

If you installed from source or from git, see the available READMEs with

 ls modules/*/README

if you installed from rpm, you can do

 ls /usr/share/olpc-os-builder/modules.d/*/README