# HG changeset patch # User Rob Landley # Date 1170308270 18000 # Node ID 137ba51ee9936e75048fd6a2fd6a1d7e422f44db # Parent 027e15c1cfecbce7b14a9a42f3044179f0e0b648 Delete output directories on re-run, teach build to log and build multiple targets (in series), give hosttools its own target directory, add toybox to hosttools build (for gene2fs soon), update uClibc snapshot. diff -r 027e15c1cfec -r 137ba51ee993 build.sh --- a/build.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/build.sh Thu Feb 01 00:37:50 2007 -0500 @@ -1,6 +1,20 @@ -#!/bin/sh +#!/bin/bash + +source include.sh + +# I have no idea why this is spawning a subshell. I want "thing || exit | tee" +# but there doesn't seem to be a syntax for that, so we remember PID and kill. -./download.sh && -./host-tools.sh $1 && -./cross-compiler.sh $1 && -./mini-native.sh $1 +PARENT=$$ +{ + ./download.sh || kill $PARENT + ./host-tools.sh || kill $PARENT +} | tee out-all.txt + +for i in "$@" +do + { + ./cross-compiler.sh "$i" || kill $PARENT + ./mini-native.sh "$i" || kill $PARENT + } | tee "out-$i.txt" +done diff -r 027e15c1cfec -r 137ba51ee993 cross-compiler.sh --- a/cross-compiler.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/cross-compiler.sh Thu Feb 01 00:37:50 2007 -0500 @@ -4,6 +4,7 @@ source include.sh +rm -rf "${CROSS}" mkdir -p "${CROSS}" || dienow # Orange diff -r 027e15c1cfec -r 137ba51ee993 download.sh --- a/download.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/download.sh Thu Feb 01 00:37:50 2007 -0500 @@ -16,7 +16,7 @@ SHA1=f768757ec898f6e1c1b98b3ccb705ee23872e125 \ download && -URL=http://www.uclibc.org/downloads/snapshots/uClibc-20070108.tar.bz2 \ +URL=http://www.uclibc.org/downloads/snapshots/uClibc-20070130.tar.bz2 \ SHA1= \ download && @@ -28,6 +28,10 @@ SHA1=147e12bf96a8d857fda1d43f0d7ea599b89cebf9 \ download && +URL=http://landley.net/code/toybox/downloads/toybox-0.0.3.tar.bz2 \ +SHA1= \ +download && + # Ye olde emulator URL=http://qemu.org/qemu-0.8.2.tar.gz \ diff -r 027e15c1cfec -r 137ba51ee993 host-tools.sh --- a/host-tools.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/host-tools.sh Thu Feb 01 00:37:50 2007 -0500 @@ -5,20 +5,33 @@ echo -e "\e[0m" echo "=== Building host tools" +NO_ARCH=1 source include.sh -mkdir -p "${CROSS}/bin" || dienow +rm -rf "${HOSTTOOLS}" + +mkdir -p "${HOSTTOOLS}" || dienow # Build squashfs setupfor squashfs cd squashfs-tools && make && -cp mksquashfs unsquashfs "${CROSS}/bin" && +cp mksquashfs unsquashfs "${HOSTTOOLS}" && cd .. && $CLEANUP squashfs* [ $? -ne 0 ] && dienow +# Build toybox + +setupfor toybox && +make defconfig && +make && +make instlist && +make install_flat PREFIX="${HOSTTOOLS}" + +[ $? -ne 0 ] && dienow + # Build qemu (if it's not already installed) TEMP="qemu-${QEMU_TEST}" diff -r 027e15c1cfec -r 137ba51ee993 include.sh --- a/include.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/include.sh Thu Feb 01 00:37:50 2007 -0500 @@ -201,7 +201,8 @@ export CROSS="${BUILD}/cross-compiler-$ARCH" export NATIVE="${BUILD}/mini-native-$ARCH" - export PATH=${CROSS}/bin:"$PATH" + export HOSTTOOLS="${BUILD}/host" + export PATH="${CROSS}/bin:${HOSTTOOLS}:$PATH" fi [ -z "$CLEANUP" ] && CLEANUP="rm -rf" diff -r 027e15c1cfec -r 137ba51ee993 mini-native.sh --- a/mini-native.sh Mon Jan 29 14:41:37 2007 -0500 +++ b/mini-native.sh Thu Feb 01 00:37:50 2007 -0500 @@ -3,6 +3,9 @@ # Get lots of predefined environment variables and shell functions. source include.sh + +rm -rf "${NATIVE}" + TOOLS="${NATIVE}/tools" mkdir -p "${TOOLS}/bin" || dienow