annotate more/buildall.sh @ 1192:8d5a672cd293

build-control-images.sh got broken out a while ago, remove redundant code from buildall.
author Rob Landley <rob@landley.net>
date Tue, 03 Aug 2010 11:07:37 -0500
parents c5ebf1e353c7
children dadbb8873a36
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1182
c5ebf1e353c7 Apparently this never quite got updated for commit 1116.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
3 # Build every target architecture, saving log files to build/log.
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
4 # If $FORK is set, build them in parallel.
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
5
669
1cf41855bb85 More error checking.
Rob Landley <rob@landley.net>
parents: 630
diff changeset
6 . sources/functions.sh || exit 1
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
7
1182
c5ebf1e353c7 Apparently this never quite got updated for commit 1116.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
8 [ -z "$CROSS_HOST_ARCH" ] && export CROSS_HOST_ARCH=i686
778
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
9
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
10 trap "killtree $$" EXIT
e373d2b6d0b8 Add killtree and make stuff use it. Update smoketest-all.sh to use doforklog, allowing FORK=1 to run stuff in parallel.
Rob Landley <rob@landley.net>
parents: 776
diff changeset
11
787
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
12 # Build the host architecture. This has to be built first so the other
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
13 # architectures can canadian cross static compilers to run on the host using
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
14 # this toolchain to link against a host version of uClibc.
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
15
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
16 # This also performs the download.sh and host-tools.sh steps, which don't
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
17 # parallelize well if many build.sh instances try to call them at once.
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
18
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
19 # If this fails, don't bother trying to build the other targets.
610
a47844b73616 New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff changeset
20
755
38534e7a4844 Largely cosmetic change.
Rob Landley <rob@landley.net>
parents: 744
diff changeset
21 blank_tempdir build
787
23bff7aa79eb Teach buildall.sh to use new build.sh infrastructure, and replace doforklog with orthogonal maybe_fork and maybe_quiet functions.
Rob Landley <rob@landley.net>
parents: 778
diff changeset
22 mkdir -p build/logs &&
962
3d2261361009 Remove the --extract option from download.sh, since EXTRACT_ALL=1 does the same thing and everything _else_ is controlled by environment variables. At it to the config file and adjust existing users.
Rob Landley <rob@landley.net>
parents: 954
diff changeset
23 (EXTRACT_ALL=1 ./download.sh 2>&1 &&
902
ab47c4944591 Make buildall.sh do less host-specific work before allowing parallel builds to start.
Rob Landley <rob@landley.net>
parents: 885
diff changeset
24 ./host-tools.sh 2>&1 &&
1182
c5ebf1e353c7 Apparently this never quite got updated for commit 1116.
Rob Landley <rob@landley.net>
parents: 1157
diff changeset
25 ./simple-cross-compiler.sh 2>&1 "$CROSS_HOST_ARCH" ||
902
ab47c4944591 Make buildall.sh do less host-specific work before allowing parallel builds to start.
Rob Landley <rob@landley.net>
parents: 885
diff changeset
26 dienow) | tee build/logs/build-host-cc.txt | maybe_quiet
630
0e8a887f9d8b buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents: 610
diff changeset
27
885
06f80138cb90 Add MANIFEST file to buildall.sh output.
Rob Landley <rob@landley.net>
parents: 852
diff changeset
28 cp packages/MANIFEST build || dienow
06f80138cb90 Add MANIFEST file to buildall.sh output.
Rob Landley <rob@landley.net>
parents: 852
diff changeset
29
916
991a74436235 Build the rest of cross-static's host arch along with other architectures, and move hw- targets to explicitly build after non-hw targets.
Rob Landley <rob@landley.net>
parents: 902
diff changeset
30 # Build all non-hw targets, possibly in parallel
717
5a3ebc77340c Teach buildall.sh to canadian cross static cross compilers with --enable-shared and uClibc++ when you set "$CROSS_COMPILERS_EH".
Rob Landley <rob@landley.net>
parents: 669
diff changeset
31
1157
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1124
diff changeset
32 more/for-each-target.sh \
1114
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
33 './build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt'
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
34
1192
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
35 more/build-control-images.sh
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
36
1114
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
37 # Run smoketest.sh for each non-hw target.
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
38
1157
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1124
diff changeset
39 more/for-each-target.sh \
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1124
diff changeset
40 'more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt'
1114
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
41
be94bf38648b Break up buildall.sh so it's easier to run individual portions of it.
Rob Landley <rob@landley.net>
parents: 1103
diff changeset
42 # Build static-tools (dropbear and strace) for each target
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 736
diff changeset
43
1192
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
44 mkdir -p build/native-static || dienow
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
45 more/for-each-target.sh \
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
46 'ln -sf ../native-static build/system-image-$TARGET/upload'
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
47
1157
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1124
diff changeset
48 more/for-each-target.sh \
1192
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
49 'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/static-tools.hdc | tee build/logs/native-$TARGET.txt"'
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
50
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
51 # If using a test version of busybox, run busybox test suite.
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
52
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
53 is_in_list busybox "$USE_UNSTABLE" &&
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
54 more/for-each-target.sh \
8d5a672cd293 build-control-images.sh got broken out a while ago, remove redundant code from buildall.
Rob Landley <rob@landley.net>
parents: 1182
diff changeset
55 'more/timeout.sh 60 "more/native-build-from-build.sh $TARGET build/control-images/busybox-test.hdc" | tee build/logs/busybox-test-$TARGET.txt'
974
51a8a0076c9d Oops. Wait for native build to finish before exiting.
Rob Landley <rob@landley.net>
parents: 972
diff changeset
56
852
6ecee01bffa6 Update paths and comments in cronjob.sh, rename "none" to "stable", minor cleanup to logging.
Rob Landley <rob@landley.net>
parents: 850
diff changeset
57 # Create a file containing simple pass/fail results for all architectures.
6ecee01bffa6 Update paths and comments in cronjob.sh, rename "none" to "stable", minor cleanup to logging.
Rob Landley <rob@landley.net>
parents: 850
diff changeset
58
1157
300e6d919d86 Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
Rob Landley <rob@landley.net>
parents: 1124
diff changeset
59 more/smoketest-all.sh --logs | tee build/logs/status.txt