# HG changeset patch # User Rob Landley # Date 1301861315 18000 # Node ID 6a04a89a0d198e0c1c6928be19902660a12ba314 # Parent 214b23b707b0865231a9a3d48ae6019b9f0ba575 Add BUILD_NATIVE_ONLY and NO_CLEAN controls to buildall.sh. Also break out the hdb.img creation and do that single threaded for all targets, then reuse the scratch drives. (Avoids triggering timeout.sh due to disk thrashing on large FORK=1 builds.) diff -r 214b23b707b0 -r 6a04a89a0d19 more/buildall.sh --- a/more/buildall.sh Sun Apr 03 15:05:11 2011 -0500 +++ b/more/buildall.sh Sun Apr 03 15:08:35 2011 -0500 @@ -18,26 +18,37 @@ # If this fails, don't bother trying to build the other targets. -blank_tempdir build -mkdir -p build/logs && -(EXTRACT_ALL=1 ./download.sh 2>&1 && - ./host-tools.sh 2>&1 && - ./simple-cross-compiler.sh 2>&1 "$CROSS_HOST_ARCH" || - dienow) | tee build/logs/build-host-cc.txt | maybe_quiet +if [ -z "$BUILD_NATIVE_ONLY" ] +then + [ -z "$NO_CLEAN" ] && blank_tempdir build -cp packages/MANIFEST build || dienow + mkdir -p build/logs && + (EXTRACT_ALL=1 ./download.sh 2>&1 && + ./host-tools.sh 2>&1 && + ./simple-cross-compiler.sh 2>&1 "$CROSS_HOST_ARCH" || + dienow) | tee build/logs/build-host-cc.txt | maybe_quiet + + cp packages/MANIFEST build || dienow + + # Build all non-hw targets, possibly in parallel -# Build all non-hw targets, possibly in parallel + more/for-each-target.sh \ + './build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt' -more/for-each-target.sh \ - './build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt' + more/build-control-images.sh + + # Run smoketest.sh for each non-hw target. -more/build-control-images.sh + more/for-each-target.sh \ + 'more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt' + +fi -# Run smoketest.sh for each non-hw target. +# Build the hdb images sequentially without timeout.sh, to avoid potential +# I/O storm triggering timeouts -more/for-each-target.sh \ - 'more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt' +FORK= more/for-each-target.sh \ + '. sources/toys/make-hdb.sh; HDBMEGS=2048; HDB=build/system-image-$TARGET/hdb.img; echo "$HDB"; rm -f "$HDB"; make_hdb' # Build static-tools (dropbear and strace) for each target @@ -46,13 +57,13 @@ 'ln -sf ../native-static build/system-image-$TARGET/upload' more/for-each-target.sh \ - 'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/static-tools.hdc | tee build/logs/native-$TARGET.txt"' + 'more/timeout.sh 60 "HDB=hdb.img more/native-build-from-build.sh $TARGET build/control-images/static-tools.hdc | tee build/logs/native-$TARGET.txt"' # If using a test version of busybox, run busybox test suite. is_in_list busybox "$USE_UNSTABLE" && more/for-each-target.sh \ - 'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/busybox-test.hdc" | tee build/logs/busybox-test-$TARGET.txt' + 'more/timeout.sh 60 "HDB=hdb.img more/native-build-from-build.sh $TARGET build/control-images/busybox-test.hdc" | tee build/logs/busybox-test-$TARGET.txt' # Create a file containing simple pass/fail results for all architectures.