annotate more/buildall-native.sh @ 1524:60ef4cdee782

Oops, forgot to check in patch removed by busybox upgrade.
author Rob Landley <rob@landley.net>
date Sat, 12 May 2012 21:35:58 -0500
parents 0921d99c1b71
children bd385934451f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1447
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
3 # Run a native build with a control image for every architecture,
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
4 # using existing system-images under build, saving log files to build/log,
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
5 # uploading output into build.
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
6
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 # If $FORK is set, build them in parallel.
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
1447
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
9 # Kill any build that doesn't produce output for $TIMEOUT (default 60) seconds.
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
10
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 . sources/utility_functions.sh || exit 1
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
12
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 if [ ! -f "$1" ]
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 then
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 echo "Can't find control image at \"$1\"" >&2
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 exit 1
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 fi
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
18
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 trap "killtree $$" EXIT
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
20
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 # Build the hdb images sequentially without timeout.sh, to avoid potential
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 # I/O storm triggering timeouts
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
23
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 FORK= more/for-each-target.sh \
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 '. sources/toys/make-hdb.sh; HDBMEGS=2048; HDB=build/system-image-$TARGET/hdb.img; echo "$HDB"; rm -f "$HDB"; make_hdb'
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
26
1447
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
27 # Put each control image's output in the build directory
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
28
1447
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
29 mkdir -p build/logs || dienow
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
30 more/for-each-target.sh 'ln -sf .. build/system-image-$TARGET/upload'
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
31
dddb3b85a7a1 Save buildall-native.sh output in build/ not (build/native-static). Update comments a lot.
Rob Landley <rob@landley.net>
parents: 1442
diff changeset
32 # Run a control image for each target, using existing hdb.img
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
33
1442
1039cd16dc92 Make timeout duration configurable.
Rob Landley <rob@landley.net>
parents: 1417
diff changeset
34 [ -z "$TIMEOUT" ] && export TIMEOUT=60
1494
0921d99c1b71 Allow buildall to do multiple native control-images, and put control image name in native-*.txt log.
Rob Landley <rob@landley.net>
parents: 1447
diff changeset
35 [ -z "$LOGFILE" ] && LOGFILE="$(echo $1 | sed 's@.*/\(.*\)\.hdc@\1@')"
1417
aabc07905de3 Now that the control-images have their own repository, remove them from this one.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 more/for-each-target.sh \
1494
0921d99c1b71 Allow buildall to do multiple native control-images, and put control image name in native-*.txt log.
Rob Landley <rob@landley.net>
parents: 1447
diff changeset
37 'more/timeout.sh $TIMEOUT "HDB=hdb.img more/native-build-from-build.sh $TARGET '"$1 | tee build/logs/native-$LOGFILE-"'$TARGET.txt"'