KernelBuildScripts

Revision 1 as of 2008-01-28 23:21:07

Clear message

Include(KernelTeamHeader)

This documents describes how to setup and use the kernel team build scripts. This is meant as a reference for the kernel team.

Basic setup

The scripts are located in a git repository at <todo>.

mkdir <whereyouwantem>
cd <whereyouwantem>
git clone git://kernel.ubuntu.com/...

The scripts will store and use configuration files located in ~/.ubuild. The base directory can be changed by exporting a shell variable set to the location of the desired location. This might be done by putting the following code into the .bashrc file.

UBUILDDIR=<mybase>
export UBUILDDIR

An initial configuration can be created by calling build-init. This will create the base configuration directory, the main config file, the groups, the distros and some default hosts.

Main config file

Path: <base>/config

This contains the global options (shell syntax):

Variable

Setting

DIST

The default distro to use.

Group definitions

Path: <base>/groups/<groupname>

These define groups of hosts to use for builds. The default group will be used if no other group is given. The autobuild group is used when scripts are started with the autobuild argument. The layout is one target host per line.

Distro definitions

Path: <base>/distros/<dist>

For each distro, this sets (shell syntax) the options that are specific for each distro:

Variable

Setting

SRCDIR

Defines the location where the kernel sources (git) for this distro are located (local host).

Host definitions

Path: <base>/hosts/<host>

Defines the environment for each host that can be used with the build scripts. New hosts should be created by (though this can also be done manually):

build-create-host <fq-hostname>

The script will check the target host and create a configuration for that. The name for that host will be the basic hostname (without domain). A suitable target host must satisfy some requirements:

  • The local system/user must be able to ssh to the target host.
  • The target host must have the the following packages installed:
    • git-core (to push the sources)

    • Either dchroot or schroot (builds are always done in a chroot environment)

  • The target host must have chroot environments ready for kernel compilation. The environments must be named <distro> for the environments that use the base architecture of that host. Or <distro>-<arch> for those that are created for different architectures (e.g. hardy-lpia).

The following variables are set in the host config file (shell syntax):

Variable

Setting

ARCHCMD

Optional command to set a desired architecture

ARCHS

Supported architectures, separated by blanks.

BASE

Base directory used for builds. This path must be valid in the chroot environment!

CHROOTCMD

Either schroot or dchroot

FAKEROOT

Command used to build as root (default fakeroot)

HOST

Fully qualified hostname

HOSTARCH

The real architecture of the host