How to compile the Igelle Linux distribution from scratch with just two commands

Unlike many “conventional” Linux distributions, Igelle is very easy to compile from scratch. In fact, this is one of the original design objectives of the OS, in order to facilitate portability as well. The build process is supposed to be almost intuitive, but in this post I’ll introduce the current procedure, and would hereby like to encourage people to try it and post feedback.

1. Prerequisites

Building Igelle requires an already-running Linux (or Linux-like, possibly?) system with some basic tools in place. The following software must be available on the system:

  • Very standard Linux tools like bash, coreutils, etc.
  • GNU Make
  • GCC and Binutils for the host
  • Perl (this does not imply that Igelle would have any Perl code, but some components, notably glibc, seem to require Perl in order to configure)
  • Melas (mls-build must be in PATH)

(Note: this list is known not to be complete; any feedback for build failures related to this will be much appreciated)

UPDATE: the package “noweb” is required to be installed on the host in order to properly build the ifupdown package (thanks Octavio). On Ubuntu/Debian, this can be done via:

sudo apt-get install nowebm

2. Get the build files (”Igelle source code”)

Download the latest released source tarball from the Igelle project site, or (for the latest development code) alternatively clone the git tree as instructed on the site as well. Note that the git tree might break randomly in various ways during development.

NOTE: These instructions only apply for version 0.3.1 and later; they do not work completely with the 0.3.0 release (configure script parameters and directory layouts diff slightly).

Note that the contents of the source tarball and/or git tree are commonly called “source code”, however this is not the complete source of all the components included; rather, the “Igelle source code” contains pointers to download addresses on the web from where the individual components are downladed during the build.

3. Configure the build

Obviously, Igelle uses a lot of disk space and makes a lot of temporary files during the build. Therefore, it is not advisable to execute the build within the source directory. To prepare the build, create an empty directory somewhere on your spacious hard drive;

mkdir ~/igelle-build
cd ~/igelle-build

Then, use the “configure” script in the Igelle source directory to configure your build directory. The mandatory argument for “configure” is to determine the build architecture (this is the same as the GCC target tuple, for those who are familiar with this). For example;

~/source/igelle/configure --arch=armv4t-unknown-linux-gnueabi

The output of this would be roughly something like as follows;

Checking for mls-build .. /usr/bin/mls-build
Checking for local compiler .. i486-linux-gnu
Generating host/mls.config ..
Generating armv4t-unknown-linux-gnueabi/mls.config ..
Generating armv4t-unknown-linux-gnueabi/Makefile ..
Generating host/Makefile ..
Generating Makefile ..

Igelle v0.3.1 build configured as follows:

Build host:          i486-linux-gnu
Build target:        armv4t-unknown-linux-gnueabi
Target CPU:          armv4t
Target CPU family:   arm
Source tarball path: /home/user/igelle-build/sources
mls-build location:  /usr/bin/mls-build
Igelle sources:      /home/user/source/igelle/src
CPU transparency:    $(which sbox2-qemu-arm)
Default target(s):   igelle-all

To build, simply run 'make'

After this, the build should be ready for the next step.

For configuration, the only choice that must be made, is the target architecture. Although this is flexible (with this, you can optimize for specific processors, etc.), the following have been tested during development so far;

  • “armv4t-unknown-linux-gnueabi”
  • “powerpc-unknown-linux”
  • “i486-unknown-linux”

4. Execute the build

To start the build, simple run “make” as instructed after the configure. This step will obviously take a long time, and does require an active Internet connection (as the individual source packages are downloaded over the net).

5. The result

If all goes well, the build ends after some time, leaving you with a number of things;

  • Full collection of source tarballs under the “sources” directory
  • Binary packages for your build computer under “host/build” (these can be redistributed as part of the “Binary SDK” for the given architecture/versions)
  • Binary packages, files, images, kernel(s) and installers (where applicable) under the “<architecture>/build” directory (eg. “armv4t-unknown-linux-gnueabi/build”)

You will also have a directory called “root” under “host” and “<architecture>” directories; these are temporary directories where the binary packages are installed during the build. Once the build is over (and no plans for corrections), the “root” directories can be removed.

Different architectures will leave you with different files and installers. For i*86 builds, there will be an ISO installer; for ARM builds, no such installer will be built.

Conclusion

Igelle is still very much a work in progress. The resulting binaries are probably not usable for average end-users, and the build system surely has a whole lot of issues. However, if anyone finds this interesting and/or even usable at this point, I would be more than happy to hear about any experiences (good or bad).


Discussion Area - Leave a Comment