Mercurial > hg > aboriginal
annotate sources/build-all-targets.sh @ 511:8e4b2c131ceb
Fix --static-host (emulator-build.sh got renamed run-from-build.sh).
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 30 Nov 2008 18:58:33 -0600 |
parents | 9a36ec9d02f7 |
children | 43594615dfab |
rev | line source |
---|---|
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # Nightly snapshot build script. |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
454
ccca664cbac1
Upgrade build wrapper, teach wait4background to skip certain processes (such as ssh) mentioned in optional second argument.
Rob Landley <rob@landley.net>
parents:
452
diff
changeset
|
5 # Wrapper can set: |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
6 # USE_UNSTABLE=busybox,toybox,uClibc |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
7 # USE_STATIC_HOST=i686 |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 |
458
44853486b6e2
Make --fork 1 produce synchronous build display but call ssh in the background, and set default nice level to 20.
Rob Landley <rob@landley.net>
parents:
454
diff
changeset
|
9 [ -z "$NICE" ] && NICE="nice -n 20" |
44853486b6e2
Make --fork 1 produce synchronous build display but call ssh in the background, and set default nice level to 20.
Rob Landley <rob@landley.net>
parents:
454
diff
changeset
|
10 |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 source sources/functions.sh |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
13 # Parse command line arguments |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
15 FORKCOUNT=1 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
16 while [ ! -z "$1" ] |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
17 do |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
18 if [ "$1" == "--fork" ] |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
19 then |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
20 shift |
480
1e915d20eb1f
Bugfox for --fork option parsing.
Rob Landley <rob@landley.net>
parents:
478
diff
changeset
|
21 FORKCOUNT="$(echo $1 | sed -n '/^[0-9]/{;s/[^0-9]//g;p;}')" |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
22 [ ! -z "$FORKCOUNT" ] && shift || FORKCOUNT=0 |
502
9a36ec9d02f7
Add a --static-host command line option to build-all-targets.sh.
Rob Landley <rob@landley.net>
parents:
500
diff
changeset
|
23 elif [ "$1" == "--static-host" ] |
9a36ec9d02f7
Add a --static-host command line option to build-all-targets.sh.
Rob Landley <rob@landley.net>
parents:
500
diff
changeset
|
24 then |
9a36ec9d02f7
Add a --static-host command line option to build-all-targets.sh.
Rob Landley <rob@landley.net>
parents:
500
diff
changeset
|
25 shift |
9a36ec9d02f7
Add a --static-host command line option to build-all-targets.sh.
Rob Landley <rob@landley.net>
parents:
500
diff
changeset
|
26 USE_STATIC_HOST="$1" |
9a36ec9d02f7
Add a --static-host command line option to build-all-targets.sh.
Rob Landley <rob@landley.net>
parents:
500
diff
changeset
|
27 shift |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
28 else |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
29 echo "Unknown argument $1" |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
30 dienow |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
31 fi |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
32 done |
452
bca5476beb41
Add --fork option to build-all-targets.sh (with --fork 3). Remove old forkbomb.sh.
Rob Landley <rob@landley.net>
parents:
450
diff
changeset
|
33 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
34 # Define functions |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 function build_this_target() |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 { |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
38 if [ ! -e build/cross-compiler-$1/bin/$1-gcc ] |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
39 then |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
40 $NICE ./cross-compiler.sh $1 && |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
41 ln build/cross-compiler-$1.tar.bz2 buildall || return 1 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
42 fi |
458
44853486b6e2
Make --fork 1 produce synchronous build display but call ssh in the background, and set default nice level to 20.
Rob Landley <rob@landley.net>
parents:
454
diff
changeset
|
43 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
44 $NICE ./mini-native.sh $1 && |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
45 ln build/mini-native-$1.tar.bz2 buildall || return 1 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
46 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
47 $NICE ./package-mini-native.sh $1 && |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
48 ln build/system-image-$1.tar.bz2 buildall || return 1 |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 } |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
50 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
51 function build_and_log() |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
52 { |
500
63e8b28ea07f
Fix logging errors and die on error.
Rob Landley <rob@landley.net>
parents:
494
diff
changeset
|
53 { build_this_target $ARCH 2>&1 || ([ ! -z "$FAIL_FATAL" ] && dienow) |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
54 } | tee >(bzip2 > buildall/logs/$1-$ARCH.txt.bz2) |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
55 } |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
56 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
57 # Iterate through architectures, either sequentially or in parallel. |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
58 # Run "$1 $ARCH", in parallel if necessary. |
458
44853486b6e2
Make --fork 1 produce synchronous build display but call ssh in the background, and set default nice level to 20.
Rob Landley <rob@landley.net>
parents:
454
diff
changeset
|
59 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
60 function for_each_arch() |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
61 { |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
62 for ARCH in $(cd sources/targets; ls); |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
63 do |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
64 echo Launching $ARCH |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
65 if [ "$FORKCOUNT" -eq 1 ] |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
66 then |
500
63e8b28ea07f
Fix logging errors and die on error.
Rob Landley <rob@landley.net>
parents:
494
diff
changeset
|
67 FAIL_FATAL=1 "$@" "$ARCH" || dienow |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
68 else |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
69 ("$@" $ARCH 2>&1 </dev/null | |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
70 grep "^==="; echo Completed $i ) & |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
71 [ "$FORKCOUNT" -gt 0 ] && wait4background $[${FORKCOUNT}-1] "ssh " |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
72 fi |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
73 done |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
74 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
75 wait4background 0 |
452
bca5476beb41
Add --fork option to build-all-targets.sh (with --fork 3). Remove old forkbomb.sh.
Rob Landley <rob@landley.net>
parents:
450
diff
changeset
|
76 } |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
77 |
454
ccca664cbac1
Upgrade build wrapper, teach wait4background to skip certain processes (such as ssh) mentioned in optional second argument.
Rob Landley <rob@landley.net>
parents:
452
diff
changeset
|
78 # Clean up old builds, fetch fresh packages. |
452
bca5476beb41
Add --fork option to build-all-targets.sh (with --fork 3). Remove old forkbomb.sh.
Rob Landley <rob@landley.net>
parents:
450
diff
changeset
|
79 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
80 rm -rf build/host |
452
bca5476beb41
Add --fork option to build-all-targets.sh (with --fork 3). Remove old forkbomb.sh.
Rob Landley <rob@landley.net>
parents:
450
diff
changeset
|
81 (hg pull -u; ./download.sh || dienow) & |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
82 rm -rf build buildall & |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
83 wait4background 0 |
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
84 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
85 mkdir -p buildall/logs || dienow |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
86 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
87 # Build host tools, extract packages (not asynchronous). |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
88 |
500
63e8b28ea07f
Fix logging errors and die on error.
Rob Landley <rob@landley.net>
parents:
494
diff
changeset
|
89 ($NICE ./host-tools.sh && $NICE ./download.sh --extract || dienow) 2>&1 | |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
90 tee >(bzip2 > buildall/logs/host-tools.txt.bz2) |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
91 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
92 # Create and upload readme (requires build/sources to be extracted) |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
93 |
494
a32c75dcf508
Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
493
diff
changeset
|
94 (do_readme && cat sources/toys/README.footer) | tee buildall/README & |
452
bca5476beb41
Add --fork option to build-all-targets.sh (with --fork 3). Remove old forkbomb.sh.
Rob Landley <rob@landley.net>
parents:
450
diff
changeset
|
95 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
96 # If we need to create static cross compilers, build a version of mini-native |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
97 # to act as the host system. (That way they're statically linked against |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
98 # uClibc, not whatever the host's library is.) |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
99 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
100 if [ ! -z "$USE_STATIC_HOST" ] |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
101 then |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
102 ($NICE ./build.sh "$USE_STATIC_HOST" || dienow) | |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
103 tee >(bzip2 > buildall/logs/static-host-$USE_STATIC_HOST.txt.bz2) |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
104 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
105 # Feed a script into qemu. Pass data back and forth via netcat. |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
106 # This intentionally _doesn't_ use $NICE, so the distcc master node is higher |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
107 # priority than the distccd slave nodes. |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
108 |
511
8e4b2c131ceb
Fix --static-host (emulator-build.sh got renamed run-from-build.sh).
Rob Landley <rob@landley.net>
parents:
502
diff
changeset
|
109 ./run-from-build.sh "$USE_STATIC_HOST" << EOF |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
110 # |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
111 export USE_UNSTABLE=$USE_UNSTABLE |
493
5cce2f8b6ec9
Build all targets and actually build them static.
Rob Landley <rob@landley.net>
parents:
491
diff
changeset
|
112 export CROSS_BUILD_STATIC=1 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
113 cd /home && |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
114 netcat 10.0.2.2 $(build/host/netcat -s 127.0.0.1 -l hg archive -t tgz -) | tar xvz && |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
115 cd firmware-* && |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
116 netcat 10.0.2.2 $(build/host/netcat -s 127.0.0.1 -l tar c sources/packages) | tar xv && |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
117 ./download.sh --extract && |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
118 mkdir -p build/logs || exit 1 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
119 |
493
5cce2f8b6ec9
Build all targets and actually build them static.
Rob Landley <rob@landley.net>
parents:
491
diff
changeset
|
120 for i in \$(cd sources/targets; ls) |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
121 do |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
122 ./cross-compiler.sh \$i | tee build/logs/cross-static-\$i.txt |
491
1e52d09f49d6
Next round of trying to make USE_STATIC_HOST work. (Requires new alt-toybox snapshot to fix a netcat bug.)
Rob Landley <rob@landley.net>
parents:
489
diff
changeset
|
123 bzip2 build/logs/cross-static-\$i.txt |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
124 done |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
125 cd build |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
126 tar c logs/* cross-compiler-*.tar.bz2 | netcat 10.0.2.2 \ |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
127 $(cd buildall; ../build/host/netcat -s 127.0.0.1 -l tar xv) |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
128 sync |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
129 exit |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
130 EOF |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
131 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
132 # Extract the cross compilers |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
133 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
134 for i in buildall/cross-compiler-*.tar.bz2 |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
135 do |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
136 echo Extracting $i |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
137 tar -xj -f $i -C build || dienow |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
138 done |
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
139 fi |
450
e5e8830b0e18
Script to build all targets and optionally upload the tarballs via ssh, plus create a README.txt listing packages and versions used.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
140 |
464
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
141 # Build each architecture |
99e039a4b8bc
Move README generation to functions.sh, clean up build-all-target.sh option parsing.
Rob Landley <rob@landley.net>
parents:
460
diff
changeset
|
142 |
489
c65c82d85fea
Add BUILD_STATIC_HOST option, and put output in rsyncable buildall directory.
Rob Landley <rob@landley.net>
parents:
480
diff
changeset
|
143 for_each_arch build_and_log native |