view sources/more/ @ 972:cfa6262528f3

Genericize native build. Break out dropbear and strace packages from (and clean up what remains, mirror list is now in New script downloads, extracts, and creates a system image with "here document" build script to build dropbear and strace. New script works on arbitrary hdc image, providing FTP upload to a directory. The setup/fork logic to build all architectures is now in for this, just like everything else. Update to take optional list of architectures to build on command line. Factor out (in embeddable manner) so distcc (in and ftp server (in can both use it. Upgrade to new busybox version while we're there. HGi removed sources/more/
author Rob Landley <>
date Fri, 05 Feb 2010 10:33:06 -0600
children 6d3db5bf731a
line wrap: on
line source


# setup hdc.sqf
# find build -name "hdb.img" | xargs rm

# Launch a system image under the emulator under the control of a filesystem
# image, with an FTP server to upload results to.

. sources/ || exit 1

# Parse arguments

if [ $# -ne 3 ]
  echo "usage: $0 ARCH HDCFILE OUTPUTDIR" >&2
  exit 1

if [ ! -f "$2" ]
  echo "Filesystem image $2 missing" >&2
  exit 1
HDCFILE="$(readlink -f $2)"
mkdir -p "$3" || dienow
STAGE_DIR="$(readlink -f $3)"

# Fire off the ftp daemon, making sure it's killed when this script exits

. sources/toys/ || exit 1
build/host/netcat -s -p $PORT -L build/host/ftpd -w "$STAGE_DIR" &
trap "kill $(jobs -p)" EXIT
disown $(jobs -p)

# Run emulator as a child process, feeding in -hdc and some extra environment
# variables so it auto-launches the build process.

echo === Begin native build for $ARCH

rm -f sources/system-image-"$ARCH"/hdb.img
  sources/ 60 ./ "$ARCH"

echo === End native build for $ARCH