view @ 262:b2e353ae7566

Have host-tools populate build/host with 1) toybox, 2) all the remaining busybox commands the build can use, 3) symlinks for the other dozen or so commands the build needs. Then set $PATH to _just_ build/host, yanking the rest of the $PATH so it won't call other things from the host. This way, the environmental dependencies are more explicit. (Note that some commands symlinked from the host could be built by busybox, but the busybox versions of those don't work correctly in the build.)
author Rob Landley <>
date Fri, 25 Jan 2008 03:26:35 -0600
parents f8dac531cbb5
children 1782b77fae15
line wrap: on
line source


# If run with no arguments, list architectures.

if [ $# -eq 0 ]
  echo "Usage: $0 ARCH [ARCH...]"
  exit 1

# Download source code and build host tools.

./ || exit 1

# host-tools populates one directory with every command the build needs,
# so we can ditch the old $PATH afterwards.

time ./ || exit 1
[ -f "$PATH"/toybox ] || exit 1

# Run the steps in order for each architecture listed on the command line
for i in "$@"
  echo "=== Building ARCH $i"
  time ./ $i || exit 1
  echo "=== native ($i)"
  time ./ $i || exit 1
  time ./ $i || exit 1