What is Firmware Linux?

Firmware Linux is build system that produces a bootable single file linux system for various hardware platforms. Along the way, the build produces a relocatable cross compiler for the target hardware, and also a native build environment.

The build system is a series of shell scripts, which download, compile, and use the appropriate source packages to generate the output files. These shell scripts are written to be easily read and modified.

The system built by these scripts consists of the following source packages:

Firmware Linux is licensed under GPL version 2. Its component packages are licensed under their respective licenses (mostly GPL and LGPL).

How do I use it?

build.sh: Start here. This is the master script which runs all the other build stages. It takes one argument, the platform to build for. (Run it with no arguments to see a list of supported platforms.) The individual stage scripts can also be run individually, with the same argument as build.sh.

download.sh: This script checks the sources/packages directory for source tarballs, and downloads any that are missing or have invalid SHA1 checksums. It also deletes any old files in sources/packages not used by the current build version, and populates sources/build-links with version-independent symlinks for use by later build stages.

cross-compiler.sh: This script produces a cross compiler for the indicated target platform. The working copy is produced in the build directory, and a copy is saved as "cross-compiler-$ARCH.tar.bz2" for use outside the build system. This cross compiler is fully relocatable (using the wrapper script in sources/toys/gcc-uClibc.c), so and any normal user can extract it into their home directory, add cross-compiler-$ARCH/bin to their $PATH, and run $ARCH-gcc to create target binaries. It contains gcc, binutils, linux kernel headers, and the uClibc C library.

The cross compiler script also builds squashfs tools, a target platform emulator (QEMU), and uses the emulator to confirm that the cross compiler works. This script can take an optional first argument, --short, to skip those steps. This is useful if you want to build several cross compilers without multiple copies of QEMU. (The short build will also delete the build/cross-compiler-$ARCH directory after tarring it up, since the result isn't usable by later build stages.)

mini-native.sh: This script uses the cross compiler to create a minimal native build environment for the target platfrom. This native environment consists of just seven packages: busybox, uClibc, the linux kernel, gcc, binutils, make, and bash. This is a fully self-hosting development environment, capable of rebuilding itself from source code, organized as a Linux From Scratch /tools directory. It also produces a bootable Linux kernel for the target platform, and packages the /tools directory as a squashfs image for use by QEMU.

package-mini-native.sh: This script creates an ext2 filesystem image for use with qemu. It currently does this using a User Mode Linux image created by the host-tools.sh script.

More to come...