aboriginal

changeset 1344:6a04a89a0d19

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.)
author Rob Landley <rob@landley.net>
date Sun, 03 Apr 2011 15:08:35 -0500
parents 214b23b707b0
children f0b13de49034
files more/buildall.sh
diffstat 1 files changed, 27 insertions(+), 16 deletions(-) [+]
line diff
     1.1 --- a/more/buildall.sh	Sun Apr 03 15:05:11 2011 -0500
     1.2 +++ b/more/buildall.sh	Sun Apr 03 15:08:35 2011 -0500
     1.3 @@ -18,26 +18,37 @@
     1.4  
     1.5  # If this fails, don't bother trying to build the other targets.
     1.6  
     1.7 -blank_tempdir build
     1.8 -mkdir -p build/logs &&
     1.9 -(EXTRACT_ALL=1 ./download.sh 2>&1 &&
    1.10 - ./host-tools.sh 2>&1 &&
    1.11 - ./simple-cross-compiler.sh 2>&1 "$CROSS_HOST_ARCH" ||
    1.12 - dienow) | tee build/logs/build-host-cc.txt | maybe_quiet
    1.13 +if [ -z "$BUILD_NATIVE_ONLY" ]
    1.14 +then
    1.15 +  [ -z "$NO_CLEAN" ] && blank_tempdir build
    1.16  
    1.17 -cp packages/MANIFEST build || dienow
    1.18 +  mkdir -p build/logs &&
    1.19 +  (EXTRACT_ALL=1 ./download.sh 2>&1 &&
    1.20 +   ./host-tools.sh 2>&1 &&
    1.21 +   ./simple-cross-compiler.sh 2>&1 "$CROSS_HOST_ARCH" ||
    1.22 +   dienow) | tee build/logs/build-host-cc.txt | maybe_quiet
    1.23  
    1.24 -# Build all non-hw targets, possibly in parallel
    1.25 +  cp packages/MANIFEST build || dienow
    1.26  
    1.27 -more/for-each-target.sh \
    1.28 -  './build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt'
    1.29 +  # Build all non-hw targets, possibly in parallel
    1.30  
    1.31 -more/build-control-images.sh
    1.32 +  more/for-each-target.sh \
    1.33 +    './build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt'
    1.34  
    1.35 -# Run smoketest.sh for each non-hw target.
    1.36 +  more/build-control-images.sh
    1.37  
    1.38 -more/for-each-target.sh \
    1.39 -  'more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt'
    1.40 +  # Run smoketest.sh for each non-hw target.
    1.41 +
    1.42 +  more/for-each-target.sh \
    1.43 +    'more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt'
    1.44 +
    1.45 +fi
    1.46 +
    1.47 +# Build the hdb images sequentially without timeout.sh, to avoid potential
    1.48 +# I/O storm triggering timeouts
    1.49 +
    1.50 +FORK= more/for-each-target.sh \
    1.51 +  '. sources/toys/make-hdb.sh; HDBMEGS=2048; HDB=build/system-image-$TARGET/hdb.img; echo "$HDB"; rm -f "$HDB"; make_hdb'
    1.52  
    1.53  # Build static-tools (dropbear and strace) for each target
    1.54  
    1.55 @@ -46,13 +57,13 @@
    1.56    'ln -sf ../native-static build/system-image-$TARGET/upload'
    1.57  
    1.58  more/for-each-target.sh \
    1.59 -  'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/static-tools.hdc | tee build/logs/native-$TARGET.txt"'
    1.60 +  '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"'
    1.61  
    1.62  # If using a test version of busybox, run busybox test suite.
    1.63  
    1.64  is_in_list busybox "$USE_UNSTABLE" &&
    1.65    more/for-each-target.sh \
    1.66 -    'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/busybox-test.hdc" | tee build/logs/busybox-test-$TARGET.txt'
    1.67 +    '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'
    1.68  
    1.69  # Create a file containing simple pass/fail results for all architectures.
    1.70