scripts: update to autotest scripts
This commit is contained in:
parent
f2358f2441
commit
a5b92a001e
@ -8,9 +8,12 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
export BUILDROOT="/tmp/all.build"
|
||||
rm -rf $BUILDROOT
|
||||
|
||||
echo "Testing ArduPlane build"
|
||||
pushd ArduPlane
|
||||
for b in all apm2 sitl linux; do
|
||||
for b in sitl linux; do
|
||||
pwd
|
||||
make clean
|
||||
make $b -j4
|
||||
@ -28,7 +31,7 @@ popd
|
||||
|
||||
echo "Testing APMRover build"
|
||||
pushd APMrover2
|
||||
for b in all apm2 sitl linux; do
|
||||
for b in sitl linux; do
|
||||
pwd
|
||||
make clean
|
||||
make $b -j4
|
||||
@ -37,7 +40,7 @@ popd
|
||||
|
||||
echo "Testing AntennaTracker build"
|
||||
pushd AntennaTracker
|
||||
for b in apm2 sitl; do
|
||||
for b in sitl; do
|
||||
pwd
|
||||
make clean
|
||||
make $b -j4
|
||||
@ -50,15 +53,13 @@ examples="Tools/CPUInfo"
|
||||
for d in $examples; do
|
||||
pushd $d
|
||||
make clean
|
||||
make apm2 -j4
|
||||
make clean
|
||||
make sitl -j4
|
||||
popd
|
||||
done
|
||||
|
||||
test -d ../libmaple && {
|
||||
echo "Testing flymaple build"
|
||||
for d in ArduPlane APMrover2; do
|
||||
for d in APMrover2; do
|
||||
pushd $d
|
||||
make clean
|
||||
make flymaple -j4
|
||||
|
36
Tools/scripts/build_all_fast.sh
Executable file
36
Tools/scripts/build_all_fast.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# useful script to test all the different build types that we support.
|
||||
# This helps when doing large merges
|
||||
# Andrew Tridgell, November 2011
|
||||
|
||||
. config.mk
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
echo "Testing ArduPlane build"
|
||||
pushd ArduPlane
|
||||
for b in all apm2 sitl linux; do
|
||||
pwd
|
||||
make clean
|
||||
make $b -j4
|
||||
done
|
||||
popd
|
||||
|
||||
for d in ArduCopter APMrover2 ArduPlane AntennaTracker; do
|
||||
pushd $d
|
||||
make clean
|
||||
make sitl -j4
|
||||
make clean
|
||||
make linux -j4
|
||||
make clean
|
||||
make px4-v2
|
||||
popd
|
||||
done
|
||||
|
||||
pushd Tools/Replay
|
||||
make clean
|
||||
make linux -j4
|
||||
popd
|
||||
|
||||
exit 0
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/prefix/bin:$HOME/APM/px4/gcc-arm-none-eabi-4_7-2014q2/bin:$PATH
|
||||
export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/prefix/bin:$HOME/APM/px4/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH
|
||||
export PYTHONUNBUFFERED=1
|
||||
export PYTHONPATH=$HOME/APM
|
||||
|
||||
@ -40,7 +40,7 @@ lock_file() {
|
||||
|
||||
if test -f "$lck" && kill -0 $pid 2> /dev/null; then
|
||||
LOCKAGE=$(($(date +%s) - $(stat -c '%Y' "build.lck")))
|
||||
test $LOCKAGE -gt 7200 && {
|
||||
test $LOCKAGE -gt 30000 && {
|
||||
echo "old lock file $lck is valid for $pid with age $LOCKAGE seconds"
|
||||
}
|
||||
return 1
|
||||
@ -88,6 +88,9 @@ report_pull_failure() {
|
||||
oldhash=$(cd APM && git rev-parse HEAD)
|
||||
|
||||
pushd APM
|
||||
git checkout -f master
|
||||
git fetch origin
|
||||
git reset --hard origin/master
|
||||
git pull || report_pull_failure
|
||||
git clean -f -f -x -d -d
|
||||
git tag autotest-$(date '+%Y-%m-%d-%H%M%S') -m "test tag `date`"
|
||||
@ -148,7 +151,7 @@ popd
|
||||
githash=$(cd APM && git rev-parse HEAD)
|
||||
hdate=$(date +"%Y-%m-%d-%H:%m")
|
||||
|
||||
for d in ArduPlane ArduCopter APMrover2; do
|
||||
for d in ArduPlane ArduCopter APMrover2 AntennaTracker; do
|
||||
pushd APM/$d
|
||||
rm -rf ../../buildlogs/$d.build
|
||||
(date && TMPDIR=../../buildlogs make) > ../../buildlogs/$d.txt 2>&1
|
||||
@ -177,6 +180,6 @@ killall -9 JSBSim || /bin/true
|
||||
# raise core limit
|
||||
ulimit -c 10000000
|
||||
|
||||
timelimit 12000 APM/Tools/autotest/autotest.py --timeout=11500 > buildlogs/autotest-output.txt 2>&1
|
||||
timelimit 22000 APM/Tools/autotest/autotest.py --timeout=20000 > buildlogs/autotest-output.txt 2>&1
|
||||
|
||||
) >> build.log 2>&1
|
||||
|
@ -22,34 +22,63 @@ error_count=0
|
||||
|
||||
. config.mk
|
||||
|
||||
board_branch() {
|
||||
board="$1"
|
||||
case $board in
|
||||
apm1|apm2)
|
||||
echo "-AVR"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# checkout the right version of the tree
|
||||
checkout() {
|
||||
vehicle="$1"
|
||||
tag="$2"
|
||||
board="$3"
|
||||
frame="$4"
|
||||
echo "Trying checkout $vehicle $tag $board $frame"
|
||||
git stash
|
||||
if [ "$tag" = "latest" ]; then
|
||||
vtag="master"
|
||||
vtag2="master"
|
||||
else
|
||||
vtag="$vehicle-$tag-$board"
|
||||
vtag2="$vehicle-$tag"
|
||||
vtag="$vehicle-$tag"
|
||||
fi
|
||||
|
||||
echo "FORCING NON-BOARD SPECIFIC BUILD"
|
||||
vtag=$vtag2
|
||||
# try frame specific tag
|
||||
if [ -n "$frame" ]; then
|
||||
vtag2="$vtag-$frame"
|
||||
|
||||
echo "Checkout for $vehicle for $board with tag $tag"
|
||||
git checkout -f "$vtag2" && {
|
||||
echo "Using frame specific tag $vtag2"
|
||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||
git log -1
|
||||
return 0
|
||||
}
|
||||
fi
|
||||
|
||||
git checkout -f "$vtag" || git checkout -f "$vtag2" || {
|
||||
return 1
|
||||
# try board type specific branch extension
|
||||
vtag2="$vtag"$(board_branch $board)
|
||||
|
||||
git checkout -f "$vtag2" && {
|
||||
echo "Using board specific tag $vtag2"
|
||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||
git log -1
|
||||
return 0
|
||||
}
|
||||
|
||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||
git log -1
|
||||
git checkout -f "$vtag" && {
|
||||
echo "Using generic tag $vtag"
|
||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||
git log -1
|
||||
return 0
|
||||
}
|
||||
|
||||
return 0
|
||||
echo "Failed to find tag for $vehicle $tag $board $frame"
|
||||
return 1
|
||||
}
|
||||
|
||||
# check if we should skip this build because we have already
|
||||
@ -126,7 +155,7 @@ build_arduplane() {
|
||||
echo "Building ArduPlane $tag binaries from $(pwd)"
|
||||
pushd ArduPlane
|
||||
for b in apm1 apm2 navio pxf; do
|
||||
checkout ArduPlane $tag $b || {
|
||||
checkout ArduPlane $tag $b "" || {
|
||||
echo "Failed checkout of ArduPlane $b $tag"
|
||||
error_count=$((error_count+1))
|
||||
continue
|
||||
@ -141,15 +170,15 @@ build_arduplane() {
|
||||
continue
|
||||
}
|
||||
extension=$(board_extension $b)
|
||||
copyit $TMPDIR/ArduPlane.build/ArduPlane.$extension $ddir $tag
|
||||
copyit $BUILDROOT/ArduPlane.$extension $ddir $tag
|
||||
touch $binaries/Plane/$tag
|
||||
done
|
||||
echo "Building ArduPlane PX4 binaries"
|
||||
ddir=$binaries/Plane/$hdate/PX4
|
||||
checkout ArduPlane $tag PX4 || {
|
||||
checkout ArduPlane $tag PX4 "" || {
|
||||
echo "Failed checkout of ArduPlane PX4 $tag"
|
||||
error_count=$((error_count+1))
|
||||
checkout ArduPlane "latest" ""
|
||||
checkout ArduPlane "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
@ -157,12 +186,13 @@ build_arduplane() {
|
||||
make px4 || {
|
||||
echo "Failed build of ArduPlane PX4 $tag"
|
||||
error_count=$((error_count+1))
|
||||
checkout ArduPlane "latest" ""
|
||||
checkout ArduPlane "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
copyit ArduPlane-v1.px4 $ddir $tag &&
|
||||
copyit ArduPlane-v2.px4 $ddir $tag
|
||||
copyit ArduPlane-v2.px4 $ddir $tag &&
|
||||
test ! -f ArduPlane-v4.px4 || copyit ArduPlane-v4.px4 $ddir $tag
|
||||
if [ "$tag" = "latest" ]; then
|
||||
copyit px4io-v1.bin $binaries/PX4IO/$hdate/PX4IO $tag
|
||||
copyit px4io-v1.elf $binaries/PX4IO/$hdate/PX4IO $tag
|
||||
@ -170,7 +200,7 @@ build_arduplane() {
|
||||
copyit px4io-v2.elf $binaries/PX4IO/$hdate/PX4IO $tag
|
||||
fi
|
||||
}
|
||||
checkout ArduPlane "latest" ""
|
||||
checkout ArduPlane "latest" "" ""
|
||||
popd
|
||||
}
|
||||
|
||||
@ -182,12 +212,12 @@ build_arducopter() {
|
||||
frames="quad tri hexa y6 octa octa-quad heli"
|
||||
for b in navio pxf; do
|
||||
for f in $frames; do
|
||||
checkout ArduCopter $tag $b || {
|
||||
echo "Failed checkout of ArduCopter $b $tag"
|
||||
checkout ArduCopter $tag $b $f || {
|
||||
echo "Failed checkout of ArduCopter $b $tag $f"
|
||||
error_count=$((error_count+1))
|
||||
continue
|
||||
}
|
||||
echo "Building ArduCopter $b binaries"
|
||||
echo "Building ArduCopter $b binaries $f"
|
||||
ddir=$binaries/Copter/$hdate/$b-$f
|
||||
skip_build $tag $ddir && continue
|
||||
make clean || continue
|
||||
@ -197,19 +227,18 @@ build_arducopter() {
|
||||
continue
|
||||
}
|
||||
extension=$(board_extension $b)
|
||||
copyit $TMPDIR/ArduCopter.build/ArduCopter.$extension $ddir $tag
|
||||
copyit $BUILDROOT/ArduCopter.$extension $ddir $tag
|
||||
touch $binaries/Copter/$tag
|
||||
done
|
||||
done
|
||||
checkout ArduCopter $tag PX4 || {
|
||||
echo "Failed checkout of ArduCopter PX4 $tag"
|
||||
error_count=$((error_count+1))
|
||||
checkout ArduCopter "latest" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
rm -rf ../Build.ArduCopter
|
||||
for f in $frames; do
|
||||
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
|
||||
echo "Building ArduCopter PX4-$f binaries"
|
||||
ddir="$binaries/Copter/$hdate/PX4-$f"
|
||||
skip_build $tag $ddir && continue
|
||||
@ -219,9 +248,10 @@ build_arducopter() {
|
||||
continue
|
||||
}
|
||||
copyit ArduCopter-v1.px4 $ddir $tag &&
|
||||
copyit ArduCopter-v2.px4 $ddir $tag
|
||||
copyit ArduCopter-v2.px4 $ddir $tag &&
|
||||
test ! -f ArduCopter-v4.px4 || copyit ArduCopter-v4.px4 $ddir $tag
|
||||
done
|
||||
checkout ArduCopter "latest" ""
|
||||
checkout ArduCopter "latest" "" ""
|
||||
popd
|
||||
}
|
||||
|
||||
@ -232,7 +262,7 @@ build_rover() {
|
||||
pushd APMrover2
|
||||
for b in apm1 apm2 navio pxf; do
|
||||
echo "Building APMrover2 $b binaries"
|
||||
checkout APMrover2 $tag $b || continue
|
||||
checkout APMrover2 $tag $b "" || continue
|
||||
ddir=$binaries/Rover/$hdate/$b
|
||||
skip_build $tag $ddir && continue
|
||||
make clean || continue
|
||||
@ -242,13 +272,13 @@ build_rover() {
|
||||
continue
|
||||
}
|
||||
extension=$(board_extension $b)
|
||||
copyit $TMPDIR/APMrover2.build/APMrover2.$extension $ddir $tag
|
||||
copyit $BUILDROOT/APMrover2.$extension $ddir $tag
|
||||
touch $binaries/Rover/$tag
|
||||
done
|
||||
echo "Building APMrover2 PX4 binaries"
|
||||
ddir=$binaries/Rover/$hdate/PX4
|
||||
checkout APMrover2 $tag PX4 || {
|
||||
checkout APMrover2 "latest" ""
|
||||
checkout APMrover2 $tag PX4 "" || {
|
||||
checkout APMrover2 "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
@ -256,14 +286,15 @@ build_rover() {
|
||||
make px4 || {
|
||||
echo "Failed build of APMrover2 PX4 $tag"
|
||||
error_count=$((error_count+1))
|
||||
checkout APMrover2 "latest" ""
|
||||
checkout APMrover2 "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
copyit APMrover2-v1.px4 $binaries/Rover/$hdate/PX4 $tag &&
|
||||
copyit APMrover2-v2.px4 $binaries/Rover/$hdate/PX4 $tag
|
||||
copyit APMrover2-v2.px4 $binaries/Rover/$hdate/PX4 $tag &&
|
||||
test ! -f APMrover2-v4.px4 || copyit APMrover2-v4.px4 $binaries/Rover/$hdate/PX4 $tag
|
||||
}
|
||||
checkout APMrover2 "latest" ""
|
||||
checkout APMrover2 "latest" "" ""
|
||||
popd
|
||||
}
|
||||
|
||||
@ -274,7 +305,7 @@ build_antennatracker() {
|
||||
pushd AntennaTracker
|
||||
for b in apm2; do
|
||||
echo "Building AntennaTracker $b binaries"
|
||||
checkout AntennaTracker $tag $b || continue
|
||||
checkout AntennaTracker $tag $b "" || continue
|
||||
ddir=$binaries/AntennaTracker/$hdate/$b
|
||||
skip_build $tag $ddir && continue
|
||||
make clean || continue
|
||||
@ -284,13 +315,13 @@ build_antennatracker() {
|
||||
continue
|
||||
}
|
||||
extension=$(board_extension $b)
|
||||
copyit $TMPDIR/AntennaTracker.build/AntennaTracker.$extension $ddir $tag
|
||||
copyit $BUILDROOT/AntennaTracker.$extension $ddir $tag
|
||||
touch $binaries/AntennaTracker/$tag
|
||||
done
|
||||
echo "Building AntennaTracker PX4 binaries"
|
||||
ddir=$binaries/AntennaTracker/$hdate/PX4
|
||||
checkout AntennaTracker $tag PX4 || {
|
||||
checkout AntennaTracker "latest" ""
|
||||
checkout AntennaTracker $tag PX4 "" || {
|
||||
checkout AntennaTracker "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
@ -298,14 +329,15 @@ build_antennatracker() {
|
||||
make px4 || {
|
||||
echo "Failed build of AntennaTracker PX4 $tag"
|
||||
error_count=$((error_count+1))
|
||||
checkout AntennaTracker "latest" ""
|
||||
checkout AntennaTracker "latest" "" ""
|
||||
popd
|
||||
return
|
||||
}
|
||||
copyit AntennaTracker-v1.px4 $binaries/AntennaTracker/$hdate/PX4 $tag &&
|
||||
copyit AntennaTracker-v2.px4 $binaries/AntennaTracker/$hdate/PX4 $tag
|
||||
copyit AntennaTracker-v2.px4 $binaries/AntennaTracker/$hdate/PX4 $tag &&
|
||||
test ! -f AntennaTracker-v4.px4 || copyit AntennaTracker-v4.px4 $binaries/AntennaTracker/$hdate/PX4 $tag
|
||||
}
|
||||
checkout AntennaTracker "latest" ""
|
||||
checkout AntennaTracker "latest" "" ""
|
||||
popd
|
||||
}
|
||||
|
||||
@ -314,10 +346,15 @@ build_antennatracker() {
|
||||
git submodule update
|
||||
}
|
||||
|
||||
export BUILDROOT="$TMPDIR/binaries.build"
|
||||
rm -rf $BUILDROOT
|
||||
|
||||
# make sure PX4 is rebuilt from scratch
|
||||
pushd ArduPlane
|
||||
make px4-clean || exit 1
|
||||
popd
|
||||
for d in ArduPlane ArduCopter APMrover2 AntennaTracker; do
|
||||
pushd $d
|
||||
make px4-clean || exit 1
|
||||
popd
|
||||
done
|
||||
|
||||
for build in stable beta latest; do
|
||||
build_arduplane $build
|
||||
|
79
Tools/scripts/build_ci.sh
Executable file
79
Tools/scripts/build_ci.sh
Executable file
@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
# useful script to test all the different build types that we support.
|
||||
# This helps when doing large merges
|
||||
# Andrew Tridgell, November 2011
|
||||
|
||||
set -ex
|
||||
|
||||
. ~/.profile
|
||||
|
||||
# CXX and CC are exported by default by travis
|
||||
unset CXX CC
|
||||
|
||||
export BUILDROOT=/tmp/travis.build.$$
|
||||
rm -rf $BUILDROOT
|
||||
|
||||
# If CI_BUILD_TARGET is not set, default to all of them
|
||||
if [ -z "$CI_BUILD_TARGET" ]; then
|
||||
CI_BUILD_TARGET="sitl linux navio raspilot minlure bebop px4-v2 px4-v4"
|
||||
fi
|
||||
|
||||
declare -A build_platforms
|
||||
declare -A build_concurrency
|
||||
declare -A build_extra_clean
|
||||
declare -A waf_supported_boards
|
||||
|
||||
build_platforms=( ["ArduPlane"]="navio raspilot minlure bebop sitl linux px4-v2"
|
||||
["ArduCopter"]="navio raspilot minlure bebop sitl linux px4-v2 px4-v4"
|
||||
["APMrover2"]="navio raspilot minlure bebop sitl linux px4-v2"
|
||||
["AntennaTracker"]="navio raspilot minlure bebop sitl linux px4-v2"
|
||||
["Tools/Replay"]="linux")
|
||||
|
||||
build_concurrency=(["navio"]="-j2"
|
||||
["raspilot"]="-j2"
|
||||
["minlure"]="-j2"
|
||||
["bebop"]="-j2"
|
||||
["sitl"]="-j2"
|
||||
["linux"]="-j2"
|
||||
["px4-v2"]=""
|
||||
["px4-v4"]="")
|
||||
|
||||
build_extra_clean=(["px4-v2"]="make px4-cleandep")
|
||||
|
||||
waf=modules/waf/waf-light
|
||||
|
||||
# get list of boards supported by the waf build
|
||||
for board in $($waf list_boards | head -n1); do waf_supported_boards[$board]=1; done
|
||||
|
||||
echo "Targets: $CI_BUILD_TARGET"
|
||||
for t in $CI_BUILD_TARGET; do
|
||||
echo "Starting make based build for target ${t}..."
|
||||
for v in ${!build_platforms[@]}; do
|
||||
if [[ ${build_platforms[$v]} != *$t* ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "Building $v for ${t}..."
|
||||
|
||||
pushd $v
|
||||
make clean
|
||||
if [ ${build_extra_clean[$t]+_} ]; then
|
||||
${build_extra_clean[$t]}
|
||||
fi
|
||||
|
||||
make $t ${build_concurrency[$t]}
|
||||
popd
|
||||
done
|
||||
|
||||
if [[ -n ${waf_supported_boards[$t]} ]]; then
|
||||
echo "Starting waf build for board ${t}..."
|
||||
$waf configure --board $t
|
||||
$waf clean
|
||||
$waf ${build_concurrency[$t]} all
|
||||
if [[ $t == linux ]]; then
|
||||
$waf check
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo build OK
|
||||
exit 0
|
@ -6,7 +6,7 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
targets="clean apm2"
|
||||
targets="navio"
|
||||
|
||||
[ $# -gt 0 ] && {
|
||||
targets="$*"
|
||||
@ -16,6 +16,9 @@ export PATH=/usr/lib/ccache:$PATH
|
||||
|
||||
TESTS=$(find libraries -name 'Makefile' | grep -v FLYMAPLE | xargs -i dirname '{}')
|
||||
|
||||
export BUILDROOT="/tmp/examples.build"
|
||||
rm -rf $BUILDROOT
|
||||
|
||||
for b in $TESTS; do
|
||||
echo "TESTING $b"
|
||||
pushd $b
|
||||
|
66
Tools/scripts/configure-ci.sh
Executable file
66
Tools/scripts/configure-ci.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
# Install dependencies and configure the environment for CI build testing
|
||||
|
||||
set -ex
|
||||
|
||||
PKGS="build-essential gawk ccache genromfs libc6-i386 \
|
||||
python-argparse python-empy python-serial zlib1g-dev gcc-4.9 g++-4.9"
|
||||
|
||||
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
|
||||
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
|
||||
|
||||
RPI_ROOT="master"
|
||||
RPI_TARBALL="$RPI_ROOT.tar.gz"
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt-get -qq -y update
|
||||
sudo apt-get -qq -y install $PKGS
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-4.9
|
||||
|
||||
pushd $HOME
|
||||
|
||||
mkdir -p $HOME/opt
|
||||
pushd $HOME/opt
|
||||
|
||||
# PX4 toolchain
|
||||
compiler=$ARM_ROOT
|
||||
if [ ! -d "$HOME/opt/$compiler" ]; then
|
||||
wget http://firmware.diydrones.com/Tools/PX4-tools/$ARM_TARBALL
|
||||
tar -xf $ARM_TARBALL
|
||||
fi
|
||||
|
||||
# RPi/BBB toolchain
|
||||
compiler="tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64"
|
||||
if [ ! -d "$HOME/opt/$compiler" ]; then
|
||||
wget http://firmware.diydrones.com/Tools/Travis/NavIO/$RPI_TARBALL
|
||||
tar -xf $RPI_TARBALL
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
mkdir -p $HOME/bin
|
||||
|
||||
# configure ccache
|
||||
ln -s /usr/bin/ccache ~/bin/g++
|
||||
ln -s /usr/bin/ccache ~/bin/gcc
|
||||
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
|
||||
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
|
||||
ln -s /usr/bin/ccache ~/bin/arm-linux-gnueabihf-g++
|
||||
ln -s /usr/bin/ccache ~/bin/arm-linux-gnueabihf-gcc
|
||||
|
||||
exportline="export PATH=$HOME/bin:"
|
||||
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-4_9-2015q3/bin:"
|
||||
exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:"
|
||||
exportline="${exportline}:\$PATH"
|
||||
|
||||
if grep -Fxq "$exportline" ~/.profile; then
|
||||
echo nothing to do;
|
||||
else
|
||||
echo $exportline >> ~/.profile;
|
||||
fi
|
||||
|
||||
. ~/.profile
|
||||
|
||||
popd
|
||||
|
@ -16,8 +16,8 @@ ARCH_AUR_PKGS="genromfs"
|
||||
|
||||
# GNU Tools for ARM Embedded Processors
|
||||
# (see https://launchpad.net/gcc-arm-embedded/)
|
||||
ARM_ROOT="gcc-arm-none-eabi-4_7-2014q2"
|
||||
ARM_TARBALL="$ARM_ROOT-20140408-linux.tar.bz2"
|
||||
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
|
||||
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
|
||||
ARM_TARBALL_URL="http://firmware.diydrones.com/Tools/PX4-tools/$ARM_TARBALL"
|
||||
|
||||
# Ardupilot Tools
|
||||
|
@ -5,20 +5,19 @@ CWD=$(pwd)
|
||||
OPT="/opt"
|
||||
|
||||
BASE_PKGS="gawk make git arduino-core curl"
|
||||
SITL_PKGS="g++ python-pip python-matplotlib python-serial python-wxgtk2.8 python-scipy python-opencv python-numpy python-pyparsing ccache"
|
||||
AVR_PKGS="gcc-avr binutils-avr avr-libc"
|
||||
PYTHON_PKGS="pymavlink MAVProxy droneapi"
|
||||
SITL_PKGS="g++ python-pip python-matplotlib python-serial python-wxgtk2.8 python-scipy python-opencv python-numpy python-pyparsing ccache realpath"
|
||||
PYTHON_PKGS="pymavlink MAVProxy droneapi catkin_pkg"
|
||||
PX4_PKGS="python-serial python-argparse openocd flex bison libncurses5-dev \
|
||||
autoconf texinfo build-essential libftdi-dev libtool zlib1g-dev \
|
||||
zip genromfs"
|
||||
zip genromfs python-empy"
|
||||
BEBOP_PKGS="g++-arm-linux-gnueabihf"
|
||||
UBUNTU64_PKGS="libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386"
|
||||
ASSUME_YES=false
|
||||
|
||||
# GNU Tools for ARM Embedded Processors
|
||||
# (see https://launchpad.net/gcc-arm-embedded/)
|
||||
ARM_ROOT="gcc-arm-none-eabi-4_7-2014q2"
|
||||
ARM_TARBALL="$ARM_ROOT-20140408-linux.tar.bz2"
|
||||
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
|
||||
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
|
||||
ARM_TARBALL_URL="http://firmware.diydrones.com/Tools/PX4-tools/$ARM_TARBALL"
|
||||
|
||||
# Ardupilot Tools
|
||||
@ -59,7 +58,7 @@ sudo usermod -a -G dialout $USER
|
||||
|
||||
$APT_GET remove modemmanager
|
||||
$APT_GET update
|
||||
$APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS $BEBOP_PKGS $UBUNTU64_PKGS $AVR_PKGS
|
||||
$APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS $BEBOP_PKGS $UBUNTU64_PKGS
|
||||
sudo pip2 -q install $PYTHON_PKGS
|
||||
|
||||
if [ ! -d $OPT/$ARM_ROOT ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user