Merge branch 'next' into schwabe/ar9x_test_and_fix

This commit is contained in:
Bertrand Songis
2016-08-01 07:03:17 +02:00
404 changed files with 3963 additions and 6172 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
# Stops on first error, echo on
set -e
set -x
SRCDIR=$1
OUTDIR=$2
COMMON_OPTIONS="-DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=$3 -DGVARS=YES -DHELI=YES"
STM32_OPTIONS="${COMMON_OPTIONS} -DLUA=YES"
rm -rf build
mkdir build
cd build
cmake ${COMMON_OPTIONS} -DPCB=9X ${SRCDIR}
make -j2 libsimulator
cmake ${COMMON_OPTIONS} -DPCB=GRUVIN9X ${SRCDIR}
make -j2 libsimulator
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 ${SRCDIR}
make -j2 libsimulator
cmake ${COMMON_OPTIONS} -DPCB=SKY9X ${SRCDIR}
make -j2 libsimulator
cmake ${COMMON_OPTIONS} -DPCB=9XRPRO ${SRCDIR}
make -j2 libsimulator
cmake ${STM32_OPTIONS} -DPCB=X9D ${SRCDIR}
make -j2 libsimulator
cmake ${STM32_OPTIONS} -DPCB=X9D+ ${SRCDIR}
make -j2 libsimulator
cmake ${STM32_OPTIONS} -DPCB=X9E ${SRCDIR}
make -j2 libsimulator
cmake ${STM32_OPTIONS} -DPCB=HORUS ${SRCDIR}
make -j2 libsimulator
make -j2 package
cp *.deb ${OUTDIR}
+92
View File
@@ -0,0 +1,92 @@
#!/bin/bash
# Stops on first error, echo on
set -e
set -x
SCRIPT=$(readlink -f "$0")
SRCDIR=$(dirname "$SCRIPT")/..
COMMON_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt55"
mkdir build || true
cd build
# OpenTX on 9X stock with FrSky telemetry
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=9X -DHELI=YES -DEXT=FRSKY ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on 9X stock with Mavlink telemetry
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=9X -DHELI=YES -DEXT=MAVLINK ${SRCDIR}
make -j2 firmware
# OpenTX on Mega2560
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 -DHELI=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Mega2560 with Mavlink telemetry
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 -DEXT=MAVLINK -DHELI=YES -DAUDIO=YES -DVOICE=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on gruvin9x board
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=GRUVIN9X -DHELI=YES -DAUDIO=YES -DVOICE=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Sky9x
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=SKY9X -DHELI=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on AR9X
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=AR9X -DHELI=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Taranis
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9D -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Taranis X9E
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9E -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES --DPPM_UNIT_PERCENT_PREC1=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Taranis Plus
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9D+ -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES -DCURVES=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Horus
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=HORUS -DHELI=NO -DUSB=SERIAL -DCLI=YES -DDEBUG=YES -DGVARS=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
# make -j2 gtests ; ./gtests
# Companion
rm -rf *
cmake ${COMMON_OPTIONS} ${SRCDIR}
make -j2
+54
View File
@@ -0,0 +1,54 @@
#!/bin/bash
set -e
branch=next
docker=nightly22
workdir=/home/opentx/nightly22
output=/var/www/html/2.2/nightly
# Incrementnightly index
index=`cat index.txt`
index=`expr $index + 1`
echo $index > index.txt
suffix="N$index"
cd ${workdir}
# Call sdcard generation
code/tools/nightly22/build-sdcard.sh
# Create on-demand build environment
cp code/radio/util/Dockerfile .
docker build -t new-$docker --build-arg OPENTX_VERSION_SUFFIX=$suffix .
docker rmi $docker || true
docker tag new-$docker $docker
docker rmi new-$docker
# Build Linux companion
docker run -dit --name companion -v /home/opentx/$docker:/opentx $docker
docker exec companion sh -c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt"
cp binaries/stamp-opentx.txt $output/firmware
docker exec companion rm -rf build
docker exec companion /opentx/code/tools/build-companion.sh /opentx/code /opentx/binaries/ $suffix
docker stop companion
docker rm companion
cp binaries/*.deb $output/companion/linux/
# Clean binaries It will be hosting built on demand firmware
rm -rf binaries/*
rm -rf binaries/.lock
# Request companion compilation on Windows
cd $output/companion/windows
wget -qO- http://winbox.open-tx.org/companion-builds/compile22.php?branch=$branch\&suffix=$suffix
wget -O companion-windows-2.2.0$suffix.exe http://winbox.open-tx.org/companion-builds/companion-windows-2.2.0$suffix.exe
chmod -Rf g+w companion-windows-2.2.0$suffix.exe
# Update windows stamp
rm -f companion-windows.stamp
echo "#define VERSION "'"2.2.0'$suffix'"' >> companion-windows.stamp
+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
set -e
branch=next
workdir=/home/opentx/nightly22
output=/var/www/html/2.2/nightly
cd ${workdir}
# Copy git sdcard data
rm -Rf ${workdir}/sdcard
cp -r ${workdir}/code/radio/sdcard .
# Get images for Horus
mkdir -p ${workdir}/sdcard/horus/IMAGES
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
# Request sound pack generation
wget -qO- http://winbox.open-tx.org/voice-builds/compile22.php?branch=${branch}
# Get sounds
cd sdcard
wget http://winbox.open-tx.org/voice-builds/english-irish-taranis.zip
wget http://winbox.open-tx.org/voice-builds/english-scottish-taranis.zip
wget http://winbox.open-tx.org/voice-builds/english-american-taranis.zip
wget http://winbox.open-tx.org/voice-builds/english-australian-taranis.zip
wget http://winbox.open-tx.org/voice-builds/english-english-taranis.zip
wget http://winbox.open-tx.org/voice-builds/french-taranis.zip
# Prepare the sdcard zip files for Horus
unzip english-irish-taranis.zip -d ${workdir}/sdcard/horus
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-irish
unzip english-scottish-taranis.zip -d ${workdir}/sdcard/horus
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-scottish
unzip english-australian-taranis.zip -d ${workdir}/sdcard/horus
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-australian
unzip english-american-taranis.zip -d ${workdir}/sdcard/horus
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-american
unzip english-english-taranis -d ${workdir}/sdcard/horus
unzip french-taranis.zip -d ${workdir}/sdcard/horus
wget -O ${workdir}/sdcard/horus/SOUNDS/en/english.cvs http://winbox.open-tx.org/voice-builds/english-english-taranis.csv
wget -O ${workdir}/sdcard/horus/SOUNDS/fr/french.cvs http://winbox.open-tx.org/voice-builds/french-taranis.csv
# Duplicate for Taranis and create sdcards.zip
mkdir ${workdir}/sdcard/taranis/SOUNDS
cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis/
rm -f ${workdir}/sdcard/*.zip
cd ${workdir}/sdcard/taranis && zip -r ${output}/sdcard/sdcard-taranis.zip *
cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/sdcard-horus.zip *
rm -Rf ${workdir}/sdcard