view www/downloads/README @ 341:e1c34ff45cd3

Add a sed invocation to build the old FWL under current (broken) Ubuntu.
author Rob Landley <>
date Sat, 31 May 2008 19:51:08 -0500
parents 82e8b8e38dd2
children c468353dd75b
line wrap: on
line source

A note about building old versions under Ubuntu 7.04 or later:

  Ubuntu 7.04 broke the /bin/sh symlink to point to the Defective Annoying
  Shell (dash), which can't run the FWL scripts.

  FWL 0.2.2 and later work around this bug in Ubuntu by explicitly saying
  #!/bin/bash at the start of each script.  To build older FWL versions
  under new Ubuntu versions, you'll have to change the "#!/bin/sh" lines
  at the start of each FWL script to say "#!/bin/bash" instead.

  Here's one way to do that:
    sed -i 's@^#!/bin/sh$@#!/bin/bash@' *.sh

  Other Linux distributions do not exhibit this bug.  (Even MacOS X has
  /bin/sh point to bash, despite using a different login shell by default.)

Contents of the Firmware Linux download directory.

Source tarballs:

  The firmware-* tarballs contain build scripts which produce a uClibc-based
  cross compiler and native build environment for various target platforms.
  Run "./" to see a list of target platforms, and run "./ $ARCH"
  to build for a given target platform.  Old versions of the build script
  tarballs are there for historical reasons; the newest version is probably
  always the one you want.


  The "cross-compiler" directory contains "host-i686" and "host-x86_64"
  directories which contain prebuilt cross compilers which run on the
  appropriate type of host.  The i686 versions were built under Ubuntu 6.06 and
  the x86_64 versions were built under Ubuntu 7.04.  Each was built using the
  newest release version of the build scripts, and when you run the build
  yourself these tarballs should be created in the "build" directory.

  Each cross-compiler-$ARCH tarball contains a compiler toolchain which
  produces binaries or the given platform, linked against uClibc.  (If you want
  to build uClibc binaries on an x86 host, use the toolchain in

  To use one of these compilers, extract the tarball and use the "$ARCH-gcc"
  binary as your compiler, which is located in the "bin" subdirectory.  You
  might find it convenient to add that to your $PATH.  (All the headers and
  libraries for the target are located relative to $ARCH-gcc, so you can
  extract the tarball anywhere you like, and move the directory it creates
  anywhere, but don't move stuff around within that directory.)

  Note: This cross compiler is small and simple and only supports C.  The
  native compiler in mini-native supports C++ as well.


  Each mini-native-$ARCH tarball contains a minimal native root filesystem
  for the given platform.  This filesystem is organized as a Linux From
  Scratch style /tools directory containing uClibc, a compiler, and basic
  system tools (mostly busybox), designed to boot with the kernel arguments
  "init=/tools/bin/sh PATH=/tools/bin".

  This filesystem contains a native version of gcc, which builds stuff relative
  to / (not to /tools), so in order to run the compiled programs either symlink
  /lib to /tools/lib, start by building and installing uClibc, or statically
  link the programs you build.  For more information, see


  This directory contains three files per target architecture:

  image-$ARCH.ext2.bz2: a bzipped ext2 filesystem image containing the
  files from the corresponding mini-native tarball.  Run bunzip2 on this before
  using it.

  zImage-$ARCH: a bootable Linux kernel configured for use with QEMU.

  run-$ a shell script that attempts to boot the corresponding ext2
  filesystem image and Linux kernel zImage files under the emulator QEMU
  (version 0.9.0 or newer).  The script expects to find both files in the
  current directory.