OS Builder: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(13 intermediate revisions by 9 users not shown)
Line 1: Line 1:
'''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.
'''olpc-os-builder''' or '''OS Builder''' (and sometimes known as "OOB") is a utility that allows you to build operating system (OS) images for XO laptops, including various customizations.


Starting in December 2009, it is the build tool used to produce official OLPC OS releases.
Starting in December 2009, it is the build tool used to produce official OLPC OS releases.
Line 5: Line 5:
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.
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 ==
== Preparation ==

The plan is to package olpc-os-builder and include it in official Fedora (so that it can be installed simply through <tt>yum</tt>). 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.
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.
'''On your image-constructing host system, it is generally a requirement (and if not, it is strongly advisable) to use the same version and architecture of Fedora as the version and architecture of Fedora used in the target image.''' For example, if you are building an OLPC OS release that is based on top of Fedora 14, your host system must also be running Fedora 14 (e.g. F15 will not work, due to RPMDB format changes). The table below also shows which Fedora version should be used to build each release.


{{#ask:
{{#ask:
Line 23: Line 21:
}}
}}


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).
So, the first steps are to choose an OLPC OS version to reproduce, and then to prepare a computer system by installing the Fedora version that it is built upon. You are advised to choose the latest OLPC OS version. All releases shown in the above table are regarded as stable.


Next, you need to download the olpc-os-builder sources, which you can find [http://dev.laptop.org/pub/source/olpc-os-builder/ 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.
Note that the above table shows (e.g.) v1.3.x for release [[10.1.3]], this means that (if presented with a choice) 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.


== Installing olpc-os-builder ==
As your regular Linux user, extract the sources with the following command:
# tar xvjf olpc-os-builder-*.tar.bz2


=== Method 1: From Fedora ===
A new directory will be created under the existing one (e.g. <tt>olpc-os-builder-1.1.0</tt>), with the contents of the utility. Use <tt>cd</tt> to change directory, e.g.:
# cd olpc-os-builder-1.1.0


: '''This method only works for release [[11.2.0]] and newer. For older releases, skip this section and continue to Method 2.'''
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.


: '''This is the general, recommended approach.'''
== Usage ==


As olpc-os-builder is an official Fedora package, you can obtain it by running the following command as root on your already-prepared host system:
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.


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


This will install the latest version of olpc-os-builder that is suitable for building images on the version of Fedora installed on your host system. If you wish to install a previous version, you can find an appropriate package [http://koji.fedoraproject.org/koji/packageinfo?packageID=11477 on koji].
== Download/install development version ==


=== Method 2: From source tarball ===
[http://dev.laptop.org/git/projects/olpc-os-builder Source code]


If you are rebuilding a release older than [[11.2.0]], or if you prefer to work from a source tarball for any other reason, follow the instructions at '''[[/Usage from tarball]]'''
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).


=== Method 3: Development version ===
As root, run:
# yum install git


If you wish to build an unstable, in-development, not-yet-released OLPC OS release, you need to use the development version of olpc-os-builder directly from our git tree. See [[/Development]].
Then, as your regular user:
% git clone git://dev.laptop.org/projects/olpc-os-builder
% cd olpc-os-builder


== Usage ==
Now follow the quick-start instructions at [http://dev.laptop.org/git/projects/olpc-os-builder/tree/doc/README.devel doc/README.devel]

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 supplied by olpc-os-builder are installed into <tt>/usr/share/doc/olpc-os-builder-*/examples</tt>. For example, having installed olpc-os-builder-3.0.x on Fedora 14, you can reconstruct the [[11.2.0]] release for XO-1.5 with (as root):
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
# olpc-os-builder /usr/share/doc/olpc-os-builder-3.0.0/examples/olpc-os-11.2.0-xo1.5.ini
% git pull


If using a source tarball or the development version, the command to run is <tt>./osbuilder.py</tt> from the root directory of olpc-os-builder, and configurations can be found in the <tt>examples/</tt> subdirectory. e.g.
Then, as root, repeat the following part of the installation process again:
# make install


# ./osbuilder.py examples/olpc-os-11.2.0-xo1.5.ini
Development OS releases are usually made with the following build configurations:
* <tt>[http://dev.laptop.org/git/projects/olpc-os-builder/tree/examples/f11-xo1.ini examples/f11-xo1.ini]</tt> for XO-1
* <tt>[http://dev.laptop.org/git/projects/olpc-os-builder/tree/examples/f11-xo1.5.ini examples/f11-xo1.5.ini]</tt> for XO-1.5


== Signing preparation ==
== Signing preparation ==
Line 73: Line 64:
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:
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
$ git clone git://dev.laptop.org/bios-crypto
# cd bios-crypto/build
$ cd bios-crypto/build
# make
$ make cli


You can now point the signing module configuration at the bios-crypto directory.
You can now point the signing module configuration at the bios-crypto directory.
Line 81: Line 72:
= Recipes =
= Recipes =


* [[OS_Builder/Add_Restricted|Add restricted software]] such as Adobe Flash, codecs, OpenGL, and vMeta,
* [[OS_Builder/Add additional Activities|Add Activities]]
* [[OS_Builder/Add additional Activities|Add Activities]]
* [[OS_Builder/Add_OpenDNS_Configuration|Add OpenDNS configuration]]
* [[OS_Builder/Add_OpenDNS_Configuration|Add OpenDNS configuration]]
* [[OS_Builder/Add repositories and packages|Add repositories and packages]]
* [[OS_Builder/Add repositories and packages|Add repositories and packages]]
* [[OS_Builder/Add Adobe Flash support|Add Adobe Flash support]]
* [[OS_Builder/Tweak boot animation|Tweak the boot animation]]
* [[OS_Builder/Tweak boot animation|Tweak the boot animation]]
* [[OS_Builder/Edit a config file|Edit a config file]]
* [[OS_Builder/Run on XO hardware|Run on XO hardware]]
* [[OS_Builder/Enable_taptoclick|Enable Tap to Click]]


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


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

== Subpages of {{FULLPAGENAME}}==
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}


[[category:build system]]
[[category:build system]]

Latest revision as of 23:18, 3 February 2015

olpc-os-builder or OS Builder (and sometimes known as "OOB") is a utility that allows you to build operating system (OS) images for XO 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.

Preparation

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 generally a requirement (and if not, it is strongly advisable) to use the same version and architecture of Fedora as the version and architecture of Fedora used in the target image. For example, if you are building an OLPC OS release that is based on top of Fedora 14, your host system must also be running Fedora 14 (e.g. F15 will not work, due to RPMDB format changes). The table below also shows which Fedora version should be used to build each release.

{{#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

}}

So, the first steps are to choose an OLPC OS version to reproduce, and then to prepare a computer system by installing the Fedora version that it is built upon. You are advised to choose the latest OLPC OS version. All releases shown in the above table are regarded as stable.

Note that the above table shows (e.g.) v1.3.x for release 10.1.3, this means that (if presented with a choice) 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.

Installing olpc-os-builder

Method 1: From Fedora

This method only works for release 11.2.0 and newer. For older releases, skip this section and continue to Method 2.
This is the general, recommended approach.

As olpc-os-builder is an official Fedora package, you can obtain it by running the following command as root on your already-prepared host system:

# yum install olpc-os-builder

This will install the latest version of olpc-os-builder that is suitable for building images on the version of Fedora installed on your host system. If you wish to install a previous version, you can find an appropriate package on koji.

Method 2: From source tarball

If you are rebuilding a release older than 11.2.0, or if you prefer to work from a source tarball for any other reason, follow the instructions at /Usage from tarball

Method 3: Development version

If you wish to build an unstable, in-development, not-yet-released OLPC OS release, you need to use the development version of olpc-os-builder directly from our git tree. See /Development.

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 supplied by olpc-os-builder are installed into /usr/share/doc/olpc-os-builder-*/examples. For example, having installed olpc-os-builder-3.0.x on Fedora 14, you can reconstruct the 11.2.0 release for XO-1.5 with (as root):

# olpc-os-builder /usr/share/doc/olpc-os-builder-3.0.0/examples/olpc-os-11.2.0-xo1.5.ini

If using a source tarball or the development version, the command to run is ./osbuilder.py from the root directory of olpc-os-builder, and configurations can be found in the examples/ subdirectory. e.g.

# ./osbuilder.py examples/olpc-os-11.2.0-xo1.5.ini

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 cli

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

Subpages of OS Builder