2013-03-10 03:16:56 -03:00
|
|
|
#!/bin/bash
|
|
|
|
# script to build the latest binaries for each vehicle type, ready to upload
|
|
|
|
# Andrew Tridgell, March 2013
|
|
|
|
|
|
|
|
export PATH=$PATH:/bin:/usr/bin
|
|
|
|
|
2016-03-29 19:01:24 -03:00
|
|
|
export TMPDIR=$PWD/build.tmp.binaries
|
2013-03-10 03:16:56 -03:00
|
|
|
echo $TMDIR
|
|
|
|
rm -rf $TMPDIR
|
|
|
|
echo "Building in $TMPDIR"
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
date
|
2015-04-19 19:59:50 -03:00
|
|
|
git checkout -f master
|
2013-03-10 03:16:56 -03:00
|
|
|
githash=$(git rev-parse HEAD)
|
|
|
|
|
|
|
|
hdate=$(date +"%Y-%m/%Y-%m-%d-%H:%m")
|
|
|
|
mkdir -p binaries/$hdate
|
|
|
|
binaries=$PWD/../buildlogs/binaries
|
2015-06-23 08:43:28 -03:00
|
|
|
BASEDIR=$PWD
|
2013-03-10 03:16:56 -03:00
|
|
|
|
2014-01-22 04:00:15 -04:00
|
|
|
error_count=0
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
. config.mk
|
|
|
|
|
2015-08-19 21:13:18 -03:00
|
|
|
board_branch() {
|
|
|
|
board="$1"
|
|
|
|
case $board in
|
|
|
|
apm1|apm2)
|
|
|
|
echo "-AVR"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo ""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
# checkout the right version of the tree
|
|
|
|
checkout() {
|
|
|
|
vehicle="$1"
|
|
|
|
tag="$2"
|
2014-01-14 07:25:42 -04:00
|
|
|
board="$3"
|
2015-09-06 23:10:46 -03:00
|
|
|
frame="$4"
|
|
|
|
echo "Trying checkout $vehicle $tag $board $frame"
|
2013-03-23 00:30:44 -03:00
|
|
|
git stash
|
|
|
|
if [ "$tag" = "latest" ]; then
|
2014-01-14 00:59:02 -04:00
|
|
|
vtag="master"
|
2013-03-23 00:30:44 -03:00
|
|
|
else
|
2015-08-19 21:13:18 -03:00
|
|
|
vtag="$vehicle-$tag"
|
2013-03-23 00:30:44 -03:00
|
|
|
fi
|
2014-01-14 07:25:42 -04:00
|
|
|
|
2015-09-06 23:10:46 -03:00
|
|
|
# try frame specific tag
|
|
|
|
if [ -n "$frame" ]; then
|
|
|
|
vtag2="$vtag-$frame"
|
|
|
|
|
|
|
|
git checkout -f "$vtag2" && {
|
|
|
|
echo "Using frame specific tag $vtag2"
|
2016-03-28 01:01:01 -03:00
|
|
|
[ -f $BASEDIR/.gitmodules ] && git submodule update --recursive -f
|
2015-09-06 23:10:46 -03:00
|
|
|
git log -1
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
# try board type specific branch extension
|
2015-08-27 23:00:07 -03:00
|
|
|
vtag2="$vtag"$(board_branch $board)
|
2015-02-11 15:21:03 -04:00
|
|
|
|
2015-08-19 21:13:18 -03:00
|
|
|
git checkout -f "$vtag2" && {
|
|
|
|
echo "Using board specific tag $vtag2"
|
2016-03-28 01:01:01 -03:00
|
|
|
[ -f $BASEDIR/.gitmodules ] && git submodule update --recursive -f
|
2015-08-19 21:13:18 -03:00
|
|
|
git log -1
|
|
|
|
return 0
|
2014-01-14 00:59:02 -04:00
|
|
|
}
|
2014-01-14 07:25:42 -04:00
|
|
|
|
2015-08-19 21:13:18 -03:00
|
|
|
git checkout -f "$vtag" && {
|
|
|
|
echo "Using generic tag $vtag"
|
2016-03-28 01:01:01 -03:00
|
|
|
[ -f $BASEDIR/.gitmodules ] && git submodule update --recursive -f
|
2015-08-19 21:13:18 -03:00
|
|
|
git log -1
|
|
|
|
return 0
|
|
|
|
}
|
2014-01-14 07:25:42 -04:00
|
|
|
|
2015-09-06 23:10:46 -03:00
|
|
|
echo "Failed to find tag for $vehicle $tag $board $frame"
|
2015-08-19 21:13:18 -03:00
|
|
|
return 1
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
# check if we should skip this build because we have already
|
|
|
|
# built this version
|
|
|
|
skip_build() {
|
2013-12-27 19:09:40 -04:00
|
|
|
[ "$FORCE_BUILD" = "1" ] && return 1
|
2013-03-23 00:30:44 -03:00
|
|
|
tag="$1"
|
|
|
|
ddir="$2"
|
|
|
|
bname=$(basename $ddir)
|
|
|
|
ldir=$(dirname $(dirname $(dirname $ddir)))/$tag/$bname
|
2015-06-25 22:32:15 -03:00
|
|
|
[ -f $BASEDIR/.gitmodules ] || {
|
|
|
|
echo "Skipping build without submodules"
|
|
|
|
return 0
|
|
|
|
}
|
2013-03-23 00:30:44 -03:00
|
|
|
[ -d "$ldir" ] || {
|
|
|
|
echo "$ldir doesn't exist - building"
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
oldversion=$(cat "$ldir/git-version.txt" | head -1)
|
|
|
|
newversion=$(git log -1 | head -1)
|
|
|
|
[ "$oldversion" = "$newversion" ] && {
|
|
|
|
echo "Skipping build - version match $newversion"
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
echo "$ldir needs rebuild"
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2013-04-24 03:14:12 -03:00
|
|
|
addfwversion() {
|
|
|
|
destdir="$1"
|
|
|
|
git log -1 > "$destdir/git-version.txt"
|
|
|
|
[ -f APM_Config.h ] && {
|
2015-05-22 01:11:20 -03:00
|
|
|
shopt -s nullglob
|
|
|
|
version=$(grep 'define.THISFIRMWARE' *.pde *.h 2> /dev/null | cut -d'"' -f2)
|
2013-04-24 03:14:12 -03:00
|
|
|
echo >> "$destdir/git-version.txt"
|
|
|
|
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
|
2016-03-19 01:14:13 -03:00
|
|
|
python $BASEDIR/Tools/PrintVersion.py >"$destdir/firmware-version.txt"
|
2013-04-24 03:14:12 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
# copy the built firmware to the right directory
|
2013-03-10 03:16:56 -03:00
|
|
|
copyit() {
|
|
|
|
file="$1"
|
|
|
|
dir="$2"
|
2013-03-23 00:30:44 -03:00
|
|
|
tag="$3"
|
2013-03-10 03:16:56 -03:00
|
|
|
bname=$(basename $dir)
|
2013-03-23 00:30:44 -03:00
|
|
|
tdir=$(dirname $(dirname $(dirname $dir)))/$tag/$bname
|
|
|
|
if [ "$tag" = "latest" ]; then
|
|
|
|
mkdir -p "$dir"
|
|
|
|
/bin/cp "$file" "$dir"
|
2013-04-24 03:14:12 -03:00
|
|
|
addfwversion "$dir"
|
2013-03-23 00:30:44 -03:00
|
|
|
fi
|
|
|
|
echo "Copying $file to $tdir"
|
|
|
|
mkdir -p "$tdir"
|
2013-04-24 03:14:12 -03:00
|
|
|
addfwversion "$tdir"
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
rsync "$file" "$tdir"
|
2013-03-10 03:16:56 -03:00
|
|
|
}
|
|
|
|
|
2015-06-23 00:43:09 -03:00
|
|
|
board_extension() {
|
|
|
|
board="$1"
|
|
|
|
case $board in
|
|
|
|
apm1|apm2)
|
|
|
|
echo "hex"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "elf"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
# build plane binaries
|
|
|
|
build_arduplane() {
|
|
|
|
tag="$1"
|
2014-07-13 03:53:08 -03:00
|
|
|
echo "Building ArduPlane $tag binaries from $(pwd)"
|
2013-03-10 03:16:56 -03:00
|
|
|
pushd ArduPlane
|
2015-06-23 00:43:09 -03:00
|
|
|
for b in apm1 apm2 navio pxf; do
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduPlane $tag $b "" || {
|
2014-01-22 04:00:15 -04:00
|
|
|
echo "Failed checkout of ArduPlane $b $tag"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
2013-03-23 00:30:44 -03:00
|
|
|
echo "Building ArduPlane $b binaries"
|
|
|
|
ddir=$binaries/Plane/$hdate/$b
|
|
|
|
skip_build $tag $ddir && continue
|
|
|
|
make clean || continue
|
2014-01-22 04:00:15 -04:00
|
|
|
make $b -j4 || {
|
|
|
|
echo "Failed build of ArduPlane $b $tag"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
2015-06-23 00:43:09 -03:00
|
|
|
extension=$(board_extension $b)
|
2016-01-16 01:04:19 -04:00
|
|
|
copyit $BUILDROOT/ArduPlane.$extension $ddir $tag
|
2013-04-22 22:23:47 -03:00
|
|
|
touch $binaries/Plane/$tag
|
2013-03-23 00:30:44 -03:00
|
|
|
done
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Building ArduPlane PX4 binaries"
|
|
|
|
ddir=$binaries/Plane/$hdate/PX4
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduPlane $tag PX4 "" || {
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Failed checkout of ArduPlane PX4 $tag"
|
|
|
|
error_count=$((error_count+1))
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduPlane "latest" "" ""
|
2015-06-14 17:53:20 -03:00
|
|
|
popd
|
|
|
|
return
|
|
|
|
}
|
|
|
|
skip_build $tag $ddir || {
|
2016-02-24 04:32:58 -04:00
|
|
|
make px4-clean
|
2016-03-29 17:44:57 -03:00
|
|
|
make px4 -j2 || {
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Failed build of ArduPlane PX4 $tag"
|
2014-01-22 04:00:15 -04:00
|
|
|
error_count=$((error_count+1))
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduPlane "latest" "" ""
|
2014-07-13 19:13:28 -03:00
|
|
|
popd
|
|
|
|
return
|
2014-01-22 04:00:15 -04:00
|
|
|
}
|
2015-06-14 17:53:20 -03:00
|
|
|
copyit ArduPlane-v1.px4 $ddir $tag &&
|
2016-01-18 20:18:51 -04:00
|
|
|
copyit ArduPlane-v2.px4 $ddir $tag &&
|
2016-01-18 23:18:16 -04:00
|
|
|
test ! -f ArduPlane-v4.px4 || copyit ArduPlane-v4.px4 $ddir $tag
|
2015-06-14 17:53:20 -03:00
|
|
|
if [ "$tag" = "latest" ]; then
|
|
|
|
copyit px4io-v1.bin $binaries/PX4IO/$hdate/PX4IO $tag
|
|
|
|
copyit px4io-v1.elf $binaries/PX4IO/$hdate/PX4IO $tag
|
|
|
|
copyit px4io-v2.bin $binaries/PX4IO/$hdate/PX4IO $tag
|
|
|
|
copyit px4io-v2.elf $binaries/PX4IO/$hdate/PX4IO $tag
|
|
|
|
fi
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduPlane "latest" "" ""
|
2013-03-10 03:16:56 -03:00
|
|
|
popd
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
2013-03-10 03:16:56 -03:00
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
# build copter binaries
|
|
|
|
build_arducopter() {
|
|
|
|
tag="$1"
|
2014-07-13 03:53:08 -03:00
|
|
|
echo "Building ArduCopter $tag binaries from $(pwd)"
|
2013-03-10 03:16:56 -03:00
|
|
|
pushd ArduCopter
|
2013-11-12 18:06:35 -04:00
|
|
|
frames="quad tri hexa y6 octa octa-quad heli"
|
2015-06-23 00:43:09 -03:00
|
|
|
for b in navio pxf; do
|
|
|
|
for f in $frames; do
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduCopter $tag $b $f || {
|
|
|
|
echo "Failed checkout of ArduCopter $b $tag $f"
|
2015-06-23 00:43:09 -03:00
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
2015-09-06 23:10:46 -03:00
|
|
|
echo "Building ArduCopter $b binaries $f"
|
2015-06-23 00:43:09 -03:00
|
|
|
ddir=$binaries/Copter/$hdate/$b-$f
|
|
|
|
skip_build $tag $ddir && continue
|
|
|
|
make clean || continue
|
|
|
|
make $b-$f -j4 || {
|
|
|
|
echo "Failed build of ArduCopter $b-$f $tag"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
extension=$(board_extension $b)
|
2016-01-16 01:04:19 -04:00
|
|
|
copyit $BUILDROOT/ArduCopter.$extension $ddir $tag
|
2015-06-23 00:43:09 -03:00
|
|
|
touch $binaries/Copter/$tag
|
|
|
|
done
|
|
|
|
done
|
2015-06-14 17:53:20 -03:00
|
|
|
for f in $frames; do
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduCopter $tag PX4 $f || {
|
|
|
|
echo "Failed checkout of ArduCopter PX4 $tag $f"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
checkout ArduCopter "latest" "" ""
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
rm -rf ../Build.ArduCopter
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Building ArduCopter PX4-$f binaries"
|
|
|
|
ddir="$binaries/Copter/$hdate/PX4-$f"
|
|
|
|
skip_build $tag $ddir && continue
|
2016-02-24 04:32:58 -04:00
|
|
|
make px4-clean
|
2016-03-29 17:44:57 -03:00
|
|
|
make px4-$f -j2 || {
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Failed build of ArduCopter PX4 $tag"
|
2014-01-22 04:00:15 -04:00
|
|
|
error_count=$((error_count+1))
|
2015-06-14 17:53:20 -03:00
|
|
|
continue
|
2014-01-22 04:00:15 -04:00
|
|
|
}
|
2015-06-14 17:53:20 -03:00
|
|
|
copyit ArduCopter-v1.px4 $ddir $tag &&
|
2016-01-18 20:18:51 -04:00
|
|
|
copyit ArduCopter-v2.px4 $ddir $tag &&
|
2016-01-18 23:18:16 -04:00
|
|
|
test ! -f ArduCopter-v4.px4 || copyit ArduCopter-v4.px4 $ddir $tag
|
2015-06-14 17:53:20 -03:00
|
|
|
done
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout ArduCopter "latest" "" ""
|
2013-03-10 03:16:56 -03:00
|
|
|
popd
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
2013-03-10 03:16:56 -03:00
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
# build rover binaries
|
|
|
|
build_rover() {
|
|
|
|
tag="$1"
|
2014-07-13 03:53:08 -03:00
|
|
|
echo "Building APMrover2 $tag binaries from $(pwd)"
|
2013-03-10 03:16:56 -03:00
|
|
|
pushd APMrover2
|
2015-06-23 00:43:09 -03:00
|
|
|
for b in apm1 apm2 navio pxf; do
|
2013-03-23 00:30:44 -03:00
|
|
|
echo "Building APMrover2 $b binaries"
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout APMrover2 $tag $b "" || continue
|
2013-03-23 00:30:44 -03:00
|
|
|
ddir=$binaries/Rover/$hdate/$b
|
|
|
|
skip_build $tag $ddir && continue
|
|
|
|
make clean || continue
|
2014-01-22 04:00:15 -04:00
|
|
|
make $b -j4 || {
|
|
|
|
echo "Failed build of APMrover2 $b $tag"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
2015-06-23 00:43:09 -03:00
|
|
|
extension=$(board_extension $b)
|
2016-01-16 01:04:19 -04:00
|
|
|
copyit $BUILDROOT/APMrover2.$extension $ddir $tag
|
2013-04-22 22:23:47 -03:00
|
|
|
touch $binaries/Rover/$tag
|
2013-03-23 00:30:44 -03:00
|
|
|
done
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Building APMrover2 PX4 binaries"
|
|
|
|
ddir=$binaries/Rover/$hdate/PX4
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout APMrover2 $tag PX4 "" || {
|
|
|
|
checkout APMrover2 "latest" "" ""
|
2015-06-14 17:53:20 -03:00
|
|
|
popd
|
|
|
|
return
|
|
|
|
}
|
|
|
|
skip_build $tag $ddir || {
|
2016-02-24 04:32:58 -04:00
|
|
|
make px4-clean
|
2016-03-29 17:44:57 -03:00
|
|
|
make px4 -j2 || {
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Failed build of APMrover2 PX4 $tag"
|
|
|
|
error_count=$((error_count+1))
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout APMrover2 "latest" "" ""
|
2014-07-13 19:13:28 -03:00
|
|
|
popd
|
|
|
|
return
|
|
|
|
}
|
2015-06-14 17:53:20 -03:00
|
|
|
copyit APMrover2-v1.px4 $binaries/Rover/$hdate/PX4 $tag &&
|
2016-01-18 20:18:51 -04:00
|
|
|
copyit APMrover2-v2.px4 $binaries/Rover/$hdate/PX4 $tag &&
|
2016-01-18 23:18:16 -04:00
|
|
|
test ! -f APMrover2-v4.px4 || copyit APMrover2-v4.px4 $binaries/Rover/$hdate/PX4 $tag
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout APMrover2 "latest" "" ""
|
2013-03-10 03:16:56 -03:00
|
|
|
popd
|
2013-03-23 00:30:44 -03:00
|
|
|
}
|
2013-03-10 03:16:56 -03:00
|
|
|
|
2014-08-14 00:40:50 -03:00
|
|
|
# build antenna tracker binaries
|
|
|
|
build_antennatracker() {
|
|
|
|
tag="$1"
|
|
|
|
echo "Building AntennaTracker $tag binaries from $(pwd)"
|
|
|
|
pushd AntennaTracker
|
|
|
|
for b in apm2; do
|
|
|
|
echo "Building AntennaTracker $b binaries"
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout AntennaTracker $tag $b "" || continue
|
2014-08-14 00:40:50 -03:00
|
|
|
ddir=$binaries/AntennaTracker/$hdate/$b
|
|
|
|
skip_build $tag $ddir && continue
|
|
|
|
make clean || continue
|
|
|
|
make $b -j4 || {
|
|
|
|
echo "Failed build of AntennaTracker $b $tag"
|
|
|
|
error_count=$((error_count+1))
|
|
|
|
continue
|
|
|
|
}
|
2015-06-23 00:43:09 -03:00
|
|
|
extension=$(board_extension $b)
|
2016-01-16 01:04:19 -04:00
|
|
|
copyit $BUILDROOT/AntennaTracker.$extension $ddir $tag
|
2014-08-14 00:40:50 -03:00
|
|
|
touch $binaries/AntennaTracker/$tag
|
|
|
|
done
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Building AntennaTracker PX4 binaries"
|
|
|
|
ddir=$binaries/AntennaTracker/$hdate/PX4
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout AntennaTracker $tag PX4 "" || {
|
|
|
|
checkout AntennaTracker "latest" "" ""
|
2015-06-14 17:53:20 -03:00
|
|
|
popd
|
|
|
|
return
|
|
|
|
}
|
|
|
|
skip_build $tag $ddir || {
|
2016-02-24 04:32:58 -04:00
|
|
|
make px4-clean
|
2016-03-29 17:44:57 -03:00
|
|
|
make px4 -j2 || {
|
2015-06-14 17:53:20 -03:00
|
|
|
echo "Failed build of AntennaTracker PX4 $tag"
|
|
|
|
error_count=$((error_count+1))
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout AntennaTracker "latest" "" ""
|
2014-08-14 00:40:50 -03:00
|
|
|
popd
|
|
|
|
return
|
|
|
|
}
|
2015-06-14 17:53:20 -03:00
|
|
|
copyit AntennaTracker-v1.px4 $binaries/AntennaTracker/$hdate/PX4 $tag &&
|
2016-01-18 20:18:51 -04:00
|
|
|
copyit AntennaTracker-v2.px4 $binaries/AntennaTracker/$hdate/PX4 $tag &&
|
2016-01-18 23:18:16 -04:00
|
|
|
test ! -f AntennaTracker-v4.px4 || copyit AntennaTracker-v4.px4 $binaries/AntennaTracker/$hdate/PX4 $tag
|
2014-08-14 00:40:50 -03:00
|
|
|
}
|
2015-09-06 23:10:46 -03:00
|
|
|
checkout AntennaTracker "latest" "" ""
|
2014-08-14 00:40:50 -03:00
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
2015-06-23 20:36:21 -03:00
|
|
|
[ -f .gitmodules ] && {
|
|
|
|
git submodule init
|
2016-03-28 01:01:01 -03:00
|
|
|
git submodule update --recursive -f
|
2015-06-23 20:36:21 -03:00
|
|
|
}
|
2015-06-09 03:57:30 -03:00
|
|
|
|
2016-01-16 01:04:19 -04:00
|
|
|
export BUILDROOT="$TMPDIR/binaries.build"
|
|
|
|
rm -rf $BUILDROOT
|
|
|
|
|
2015-06-23 20:36:21 -03:00
|
|
|
# make sure PX4 is rebuilt from scratch
|
2015-11-05 01:38:48 -04:00
|
|
|
for d in ArduPlane ArduCopter APMrover2 AntennaTracker; do
|
|
|
|
pushd $d
|
|
|
|
make px4-clean || exit 1
|
|
|
|
popd
|
|
|
|
done
|
2015-03-26 02:36:05 -03:00
|
|
|
|
2013-03-23 00:30:44 -03:00
|
|
|
for build in stable beta latest; do
|
|
|
|
build_arduplane $build
|
|
|
|
build_arducopter $build
|
|
|
|
build_rover $build
|
2014-08-18 01:00:16 -03:00
|
|
|
build_antennatracker $build
|
2013-03-23 00:30:44 -03:00
|
|
|
done
|
|
|
|
|
2013-03-10 03:16:56 -03:00
|
|
|
rm -rf $TMPDIR
|
|
|
|
|
2016-03-31 21:32:18 -03:00
|
|
|
if ./Tools/scripts/generate-manifest.py $binaries http://firmware.ardupilot.org >$binaries/manifest.json.new; then
|
|
|
|
echo "Manifest generation succeeded"
|
|
|
|
# provide a pre-compressed manifest. For reference, a 7M manifest
|
|
|
|
# "gzip -9"s to 300k in 1 second, "xz -e"s to 80k in 26 seconds
|
|
|
|
gzip -9 <$binaries/manifest.json.new >$binaries/manifest.json.gz.new
|
|
|
|
mv $binaries/manifest.json.new $binaries/manifest.json
|
|
|
|
mv $binaries/manifest.json.gz.new $binaries/manifest.json.gz
|
|
|
|
else
|
|
|
|
echo "Manifest generation failed"
|
|
|
|
fi
|
|
|
|
|
2014-01-22 04:00:15 -04:00
|
|
|
exit $error_count
|