Mercurial > hg > aboriginal
changeset 96:137ba51ee993
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.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 01 Feb 2007 00:37:50 -0500 |
parents | 027e15c1cfec |
children | b5b65762dd87 |
files | build.sh cross-compiler.sh download.sh host-tools.sh include.sh mini-native.sh |
diffstat | 6 files changed, 45 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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 \
--- 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}"
--- 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"