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).

Hi,
1) Possibly error in the configure script, lines 19 & 163:
“>& /dev/null” is csh syntax, but scrip uses “#! /bin/sh”
I received “~/source/igelle/configure: 169: Syntax error: Bad fd number”.
I tried replace “>& /dev/null” to “>/dev/null 2>&1″ and it works fine.
2) Question:
How and where I can get an information about build architecture for my device? I am not familiar with GCC target tuple an so on.
For example, I have E-ten X800 PDA (CPU Samsung S3C2442B). I know that this is ARM arch and unfortunately that’s all. Does it mean that I should use “armv4t-unknown-linux-gnueabi”?
Regards.
for 1) noted, and thank you. although this works well on gnu bash 3.2. which shell are you running this on? if you find any similar issues, feel free to also email patches to fix.
for 2), as mentioned here:
http://wiki.openmoko.org/wiki/Samsung_S3C2442B
http://en.wikipedia.org/wiki/ARM_architecture
this particular CPU seems to be an ARM920T core, which would mean the ARMv4T instructions set should be ok. the rest of the tuple “..-unknown-linux-gnueabi” can be retained in most configurations. Therefore the armv4t-unknown-linux-gnueabi would hopefully work for that device. do take note that you will also need a compatible kernel built for the device in order to boot. this can probably be the hard part; wonder if anyone has info or experience on a compatible kernel for this device?
A. [Solved] Confirmation
———————
Yes, it works much better with bash 3.2 (instead of /bin/sh, which was used before).
I just replaced first strings to “#!/bin/bash” in these files :
1) ~/source/igelle/configure
2) /usr/bin/mls-build
3) /usr/bin/mls-make-deb
B. [Solved] Automake & autoconf packages must be installed (in Ubuntu 8.04.1)
———————–
Then I found the following error:
================================
sbox2-1.99.0.23/utils/signaltester.c
patching file utils/sb2-init
Hunk #1 succeeded at 283 (offset 54 lines).
./autogen.sh: line 6: aclocal: command not found
./autogen.sh: line 7: autoheader: command not found
./autogen.sh: line 8: autoconf: command not found
make[1]: *** [sbox2] Error 127
make[1]: Leaving directory `/home/alexo/igelle-build/host’
make: *** [all] Error 2
================================
I’ve just installed two packages: autoconf & automake (I’m using Ubuntu 8.04.1) which contain these three commands. It was a minor problem.
C. Download issues
1. [Solved] Script can’t download http://download.igelle.org/sw/melas-qemu-0.8.2.tar.bz2 file (I tried 3 or 4 times).
I have direct connection to the Internet, that’s why I think that the reason of the issue somewhere on download.igelle.org site. Maybe I am wrong, I’m not sure.
========================================
–22:44:59– http://download.igelle.org/sw/melas-qemu-0.8.2.tar.bz2
=> `melas-qemu-0.8.2.tar.bz2′
Resolving download.igelle.org… 64.79.205.236
Connecting to download.igelle.org|64.79.205.236|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1,304,599 (1.2M) [application/x-bzip2]
8% [========> .... ] 106,810 –.–K/s ETA 20:20
========================================
But this file was downloaded via browser and I just put it to ~/igelle-build/sources directory.
2. [Partially solved] There is no more 4.7.26 version of whois package on http://ftp.debian.org/debian/pool/main/w/whois. There are only 27 & 28.
=============================
[1/3] Building whois..
–23:09:35– http://ftp.debian.org/debian/pool/main/w/whois/whois_4.7.26.tar.gz
=> `whois_4.7.26.tar.gz’
Resolving http://ftp.debian.org... 128.101.240.212
Connecting to http://ftp.debian.org|128.101.240.212|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
23:09:36 ERROR 404: Not Found.
=============================
I found exactly 26 version of this tar file in the Internet and copied it to ~/igelle-build/sources directory.
By the way, I didn’t find a text file contains info about whois version (only in binary files).
3. [Error]
After downloading fix-embedded-paths.c file i found the following error.
Possible reason: as I can see there are folder names which contains spaces (e.g. “gcc4- 1″).
Anyway I didn’t find workaround or solution. Please help.
=================================================================
00:31:54 (19.07 KB/s) - `fix-embedded-paths.c’ saved [14115/14115]
/home/alexo/igelle-build/sources/fix-embedded-paths.c: In function ‘testit’:
/home/alexo/igelle-build/sources/fix-embedded-paths.c:368: warning: initializer element is not constant
/home/alexo/igelle-build/sources/fix-embedded-paths.c:368: warning: (near initialization for ‘all_tests[2]’)
`/home/alexo/igelle-build/host/build/gcc4-cross-4.2.3/linux-headers-2.6.20.1/include/asm-alpha’ -> `/home/alexo/igelle-build/host/build/gcc4-cross-4.2.3-staging/usr/gcc4- 1/sysroot- 1/usr/include/asm-alpha’
…. some strings…
`/home/alexo/igelle-build/host/build/gcc4-cross-4.2.3/linux-headers-2.6.20.1/include/sound/seq_midi_emul.h’ -> `/home/alexo/igelle-build/host/build/gcc4-cross-4.2.3-staging/usr/gcc4- 1/sysroot- 1/usr/include/sound/seq_midi_emul.h’
ln: target `/home/alexo/igelle-build/host/build/gcc4-cross-4.2.3-staging/usr/gcc4- 1/sysroot- 1/usr/include/asm’ is not a directory
make[1]: *** [gcc4-cross] Error 1
make[1]: Leaving directory `/home/alexo/igelle-build/host’
make: *** [all] Error 2
=================================================================
Regards (and sorry for a long post),
Alexey.
hm. for the last part, it looks quite unusual. what looks like happens there is that in these filenames there is a ” 1″ (space and 1) where there should be the target architecture (ie. instead of “gcc4- 1″ it should stand “gcc4-armv4t-unknown-linux-gnueabi” or somesuch). i have not seen this elsewhere, although i do think this has to do with the same shell scripting incompatibilities you had earlier. is your /bin/sh not bash? probably forcing this part of the build run through bash would also help — although i think this one is run from the host makefile.
Yes, you’re right.. In Ubuntu we should do the following:
$ ls -l $(which sh)
lrwxrwxrwx 1 root root 4 2008-04-25 15:11 /bin/sh -> dash
$ sudo ln -sf /bin/bash /bin/sh
$ ls -l $(which sh)
lrwxrwxrwx 1 root root 9 2008-09-18 00:04 /bin/sh -> /bin/bash
I will recompile all from scratch.
I’m very interested with this Linux OS, reading on your objectives. I suggest a COMMUNITY FORUM shall be created soon.
By the way, I cannot find an installation instruction.
Suggestion agreed. I will be putting up a community forum and a wiki, at a minimum, ASAP. Please bear with me
Installation instructions would also need to be written. All contributions in this territory are also most welcome 