Mercurial > hg > aboriginal
view sources/more/setup-native-build.sh @ 972:cfa6262528f3
Genericize native build.
Break out dropbear and strace packages from download.sh (and clean up what
remains, mirror list is now in include.sh).
New script setup-native.build.sh downloads, extracts, and creates
a system image with "here document" build script to build dropbear and strace.
New native-build.sh script works on arbitrary hdc image, providing FTP upload
to a directory. The setup/fork logic to build all architectures is now in
buildall.sh for this, just like everything else.
Update buildall.sh to take optional list of architectures to build on command
line.
Factor out unique-port.sh (in embeddable manner) so distcc (in run-emulator.sh)
and ftp server (in native-build.sh) can both use it.
Upgrade to new busybox version while we're there.
HGi removed sources/more/setup-native-static-build.sh
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 05 Feb 2010 10:33:06 -0600 |
parents | |
children |
line wrap: on
line source
#!/bin/bash # Download all the source tarballs we haven't got up-to-date copies of. # The tarballs are downloaded into the "packages" directory, which is # created as needed. source sources/include.sh || exit 1 if [ $# -ne 1 ] then echo "usage: $0 FILENAME" >&2 exit 1 fi if [ -e "$1" ] then echo "$1" exists exit 0 fi SRCDIR="$SRCDIR/native" mkdir -p "$SRCDIR" || dienow echo "=== Download source code." # Note: set SHA1= blank to skip checksum validation. URL=http://downloads.sf.net/sourceforge/strace/strace-4.5.19.tar.bz2 \ SHA1=5554c2fd8ffae5c1e2b289b2024aa85a0889c989 \ download || dienow URL=http://matt.ucc.asn.au/dropbear/releases/dropbear-0.52.tar.bz2 \ SHA1=8c1745a9b64ffae79f28e25c6fe9a8b96cac86d8 \ download || dienow echo === Got all source. cleanup_oldfiles # Set up working directories WORK="$WORK"/sub blank_tempdir "$WORK" # Extract source code into new image directory setupfor dropbear setupfor strace cat > "$WORK"/init << 'EOF' || dienow #!/bin/bash echo Started second stage init cd /home && mkdir output && echo === Native build static dropbear cp -sfR /mnt/dropbear dropbear && cd dropbear && LDFLAGS="--static" ./configure --disable-zlib && make -j $CPUS PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 SCPPROGRESS=1 && cp dropbearmulti /home/output && cd .. && rm -rf dropbear || exit 1 echo === Native build static strace cp -sfR /mnt/strace strace && cd strace && CFLAGS="--static" ./configure && make -j $CPUS && cp strace /home/output && cd .. && rm -rf strace || dienow echo === Upload cd /home/output for i in * do ftpput 10.0.2.2 -P $OUTPORT $ARCH-$i $i done sync EOF chmod +x "$WORK"/init || dienow cd "$TOP" mksquashfs "$WORK" "$1" -noappend -all-root