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
parents 3d2261361009
children 51a8a0076c9d
line wrap: on
line source


# Build every target architecture, creating build-$ARCH.txt log files.
# If $FORK is set, build them in parallel.

. sources/ || exit 1

[ -z "$STATIC_CC_HOST" ] && export STATIC_CC_HOST=i686
export FAIL_QUIET=1

if [ -z "$*" ]
  [ -z "${ARCHES}" ] &&
    ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')"

  [ -z "$HWARCHES" ] &&
    HWARCHES="$(cd sources/targets; ls | grep '^hw-')"

[ ! -z "$FORK" ] && QUIET=1

trap "killtree $$" EXIT

# Build the host architecture.  This has to be built first so the other
# architectures can canadian cross static compilers to run on the host using
# this toolchain to link against a host version of uClibc.

# This also performs the and steps, which don't
# parallelize well if many instances try to call them at once.

# If this fails, don't bother trying to build the other targets.

blank_tempdir build
mkdir -p build/logs &&
(EXTRACT_ALL=1 ./ 2>&1 &&
 ./ 2>&1 &&
 ./ 2>&1 "$STATIC_CC_HOST" ||
 dienow) | tee build/logs/build-host-cc.txt | maybe_quiet

cp packages/MANIFEST build || dienow

# Build all non-hw targets, possibly in parallel

for i in ${ARCHES}
  maybe_fork "./ $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet"


# Build all hw targets, possibly in parallel

for i in ${HWARCHES}
  maybe_fork "./ $i 2>&1 | tee build/logs/build-${i}.txt | maybe_quiet"

# Run for each non-hw target.

for i in ${ARCHES}
  maybe_fork "./ $i 2>&1 | tee build/logs/smoketest-$i.txt | maybe_quiet"


# Build dropbear and strace

sources/more/ build/host-temp/hdc.sqf &&
mkdir -p build/native-static &&
for i in ${ARCHES}
  maybe_fork "sources/more/ $i build/host-temp/hdc.sqf build/native-static | tee build/logs/native-$i.txt | maybe_quiet"

# Create a file containing simple pass/fail results for all architectures.

sources/more/ --logs | tee build/logs/status.txt