I needed a reasonably complete development environment including git (which was not already included in my machine).
sudo apt-get git
Then I create my sandbox for my experiments and fill it with the current revision:
$ sudo apt-get git $ cd sandbox $ git clone git://git.ipfire.org/ipfire-2.x.git Initialized empty Git repository in /home/mcon/sandbox/ipfire-2.x/.git/ remote: Counting objects: 39828, done. remote: Compressing objects: 100% (13496/13496), done. remote: Total 39828 (delta 25030), reused 39714 (delta 24959) Receiving objects: 100% (39828/39828), 36.06 MiB | 233 KiB/s, done. Resolving deltas: 100% (25030/25030), done. $ cd ipfire-2.x $ ./make.sh downloadsrc No configuration found! Do you want to create one (y/N)?y ***This will create your configuration... ***If your are ready press <ENTER>! ***The buildscript will create a full iso image. ***If you want to skip any package please enter its name here seperated with space. Actually in the list are: Do you want to change this? (y/N) ***When you have compiled successfully, there is the possibility ***to upload the iso image to a ftp server. ***If the url is empty there will be no upload. Actually there is: Do you want to change this? (y/N) ***When you add some new software you can easyly ***upload the source code to our repository server. ***If the url is empty there will be no upload. Actually there is: Do you want to change this? (y/N) ***If there are some important messages you ***can get a notification mail. ***Please type one ore more email adresses (seperated by comma). Actually there is: Do you want to change this? (y/N) ***Saving... [ DONE ] Preload all source files Loading 7zip [ DONE ] Loading alsa [ DONE ] ...
Then, after a LOOOOOONG time
... Loading xz [ DONE ] Loading zerofree [ DONE ] Loading zlib [ DONE ] ***Verifying md5sums all files md5sum match [ DONE ]
Now we need to get the toolchain, which cannot be built on a 64bit machine (it is a good idea to get it anyways, since compilation time is substantial).
$ linux32 ./make.sh gettoolchain Nov 15 20:03:22: Load toolchain tar.gz for i686 Nov 15 20:06:04: toolchain md5 ok
Notice I used linux32 to pretend I'm on a 32bit O.S., but I'm still working as a normal, non-privileged user. This will change shortly because the build engine needs root privileges.
Now we are all set to start the first, normal compilation:
$ sudo linux32 ./make.sh build Using installed toolchain [ SKIP ] Resetting our nice level to 10 [ DONE ] Checking if we're running as root user [ DONE ] Checking for necessary space on disk [ DONE ] *** Building LFS version options time (sec) status stage2 [ ipfire ] [ 1 ] [ DONE ] linux-libc-header [ 22.214.171.124 ] [ 5 ] [ DONE ] man-pages [ 2.34 ] [ 12 ] [ DONE ] glibc [ 2.3.6 ] . . .
... after a LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG time ...
. . . util-linux [ 2.12r ] [ 11 ] [ DONE ] vim [ 7.0 ] [ 38 ] [ DONE ] grub [ 0.97 ] [ 16 ] [ DONE ] *** Building IPFire (Last stage took 1790 secs) version options time (sec) status configroot [ ipfire ] [ 1 ] [ DONE ] backup [ ipfire ] [ 0 ] [ DONE ] dhcp [ 3.1.0 ] [ 21 ] [ DONE ] . . .
... after a LOOOOOOOOOOOOOOOOOOOOOOONG time ...
. . . minicom [ 2.4 ] [ 14 ] [ DONE ] ddrescue [ 1.12 ] [ 2 ] [ DONE ] imspector [ 20101008 ] [ 23 ] [ DONE ] *** Building installer (Last stage took 11284 secs) version options time (sec) status as86 [ 0.16.17 ] [ 1 ] [ DONE ] mbr [ 1.1.8 ] [ 3 ] [ DONE ] memtest [ 4.10 ] [ 2 ] [ DONE ] ... pcmciautils [ 014 ] [ 2 ] [ DONE ] installer [ ipfire ] [ 2 ] [ DONE ] initrd [ ipfire ] [ 35 ] [ DONE ] *** Building packages (Last stage took 1058 secs) version options time (sec) status strip [ ipfire ] [ 40 ] [ DONE ] Generating packages list from logs [ DONE ] cdrom [ ipfire ] [ ED=full ][ 136 ] [ DONE ] usb-stick [ ipfire ] [ ED=full ][ 22 ] [ DONE ] flash-images [ ipfire ] [ ED=full ][ 134 ] [ FAIL ] ERROR: Building flash-images ED=full Check /home/mcon/sandbox/ipfire-2.x/log/_build.packages.log for errors if applicable
Oops, what went wrong?
It turns out it's a problem of interaction with ubuntu/gnome handling of mounted filesystems: when a filesystem is mounted ubuntu scans it to present it in the “Places” menu. If it will be unmounted too soon it may still be “busy”.
This may be cured inserting a delay in the right place i.e.:
…/lfs/flash-images#170 should become:
sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" $(MNThdd)/etc/inittab sed -i -e "s|#7:2345:respawn:|7:2345:respawn:|g" $(MNThdd)/etc/inittab sleep 10 #<-- this line added by MCon umount $(MNThdd)/boot umount $(MNThdd)
Restart the build. This time everything is fine:
... installer [ ipfire ] [ 0 ] [ DONE ] initrd [ ipfire ] [ 0 ] [ DONE ] *** Building packages (Last stag version) options time (sec) status strip [ ipfire ] [ 49 ] [ DONE ] Generating packages list from logs [ DONE ] cdrom [ ipfire ] [ ED=full ][ 140 ] [ DONE ] usb-stick [ ipfire ] [ ED=full ][ 22 ] [ DONE ] flash-images [ ipfire ] [ ED=full ][ 213 ] [ DONE ] core-updates [ ipfire ] [ 2 ] [ DONE ] 7zip [ 4.65 ] [ 0 ] [ DONE ] alsa [ 1.0.23 ] [ 1 ] [ DONE ] ... watchdog [ 5.9 ] [ 0 ] [ DONE ] xfsprogs [ 2.9.4 ] [ 0 ] [ DONE ] xvid [ 1.2.1 ] [ 0 ] [ DONE ] xen-image [ ipfire ] [ ED=full ][ 200 ] [ DONE ] Generating files list from logs [ DONE ] *** Checking Logfiles for new Fi versionge options1 s time (sec) status Changes in cdrtools-2.01.01 check rootfile! ***Build is finished now and took 0 hour(s) 12 minute(s) 24 second(s)!
At this point you have a completely rebuilt IPFire and we can turn to building something new.