Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
synapticvoid committed Nov 9, 2016
2 parents d19a3a4 + ff9301e commit d429947
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.1.0 - 2016-11-09
- Add support for RPi 1 & RPi 3
- Add support of Qt 5.6.2

v1.0.0 - 2016-11-03
- Initial release with full and minimal scripts for RPi 2

14 changes: 14 additions & 0 deletions compile-all-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

for DEVICE in 'linux-rasp-pi-g++' 'linux-rasp-pi2-g++' 'linux-rpi3-g++'; do
for VERSION in '5.6.2' '5.7.0'; do
export QTRPI_TARGET_DEVICE=$DEVICE
export QTRPI_QT_VERSION=$VERSION
echo "Compile $DEVICE $VERSION"
./utils/synchronize-qt-modules.sh -c \
&& ./utils/compile-qt-modules.sh \
&& ./utils/compile-example-qopenglwidget.sh \
&& ./utils/generate-compressed-qtrpi.sh
done
done

2 changes: 1 addition & 1 deletion utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ROOT=${QTRPI_ROOT-/opt/qtrpi}
TARGET_DEVICE=${QTRPI_TARGET_DEVICE-'linux-rasp-pi2-g++'}
QT_VERSION=${QTRPI_QT_VERSION-'5.7.0'}
TARGET_HOST=$QTRPI_TARGET_HOST
VERSION='1.0.0'
VERSION='1.1.0'

case $TARGET_DEVICE in
'linux-rasp-pi-g++') DEVICE_NAME='rpi1' ;;
Expand Down
15 changes: 11 additions & 4 deletions utils/compile-qt-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ function build_module() {
function fix_qmake() {
QMAKE_FILE=mkspecs/devices/$TARGET_DEVICE/qmake.conf

if [[ $DEVICE_NAME == 'rpi2' ]]; then
# Add missing INCLUDEPATH in qmake conf
grep -q 'INCLUDEPATH' $QMAKE_FILE || cat>>$QMAKE_FILE << EOL
# Add missing INCLUDEPATH in qmake conf
grep -q 'INCLUDEPATH' $QMAKE_FILE || cat>>$QMAKE_FILE << EOL
INCLUDEPATH += \$\$[QT_SYSROOT]/opt/vc/include
INCLUDEPATH += \$\$[QT_SYSROOT]/opt/vc/include/interface/vcos
INCLUDEPATH += \$\$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads
INCLUDEPATH += \$\$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux
EOL
elif [[ $DEVICE_NAME == 'rpi3' ]]; then

if [[ $DEVICE_NAME == 'rpi3' ]]; then
sed -i 's/\$\$QMAKE_CFLAGS -std=c++1z/\$\$QMAKE_CFLAGS -std=c++11/g' $QMAKE_FILE
fi
}
Expand All @@ -54,10 +54,17 @@ function build_qtbase() {

fix_qmake

# GNU gold linker has issues with ARMv8
NO_USE_GOLD_LINKER=''
if [[ $DEVICE_NAME == 'rpi3' ]]; then
NO_USE_GOLD_LINKER='-no-use-gold-linker'
fi

./configure -release -opengl es2 -device $TARGET_DEVICE \
-device-option CROSS_COMPILE=$CROSS_COMPILE \
-sysroot $SYSROOT \
-opensource -confirm-license -make libs \
$NO_USE_GOLD_LINKER \
-prefix /usr/local/qt5pi \
-extprefix $OUTPUT_DIR \
-hostprefix $OUTPUT_HOST_DIR
Expand Down
2 changes: 1 addition & 1 deletion utils/generate-compressed-qtrpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ BASE_DIR=dist/qtrpi/$DEVICE_NAME
mkdir -p $BASE_DIR

message "Compressing qtrpi for $DEVICE_NAME ..."
zip -r -q $ROOT/$BASE_DIR/qtrpi-${DEVICE_NAME}_qt-${QT_VERSION}.zip raspi/qt5 raspi/qt5pi
zip --symlinks -r -q $ROOT/$BASE_DIR/qtrpi-${DEVICE_NAME}_qt-${QT_VERSION}.zip raspi/qt5 raspi/qt5pi
2 changes: 1 addition & 1 deletion utils/generate-compressed-sysroot-minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ FILENAME=$(basename "$IMG")
BASENAME=${FILENAME%%.*}

message 'Compressing sysroot-minimal...'
zip -r -q $ROOT/$BASE_DIR/qtrpi-sysroot-minimal-$BASENAME.zip raspbian/sysroot-minimal
zip --symlinks -r -q $ROOT/$BASE_DIR/qtrpi-sysroot-minimal-$BASENAME.zip raspbian/sysroot-minimal
2 changes: 1 addition & 1 deletion utils/prepare-sysroot-full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sudo sed -i '/deb-src/s/^#//g' sysroot-full/etc/apt/sources.list
sudo chroot sysroot-full /bin/bash -c 'apt-get update'
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y apt-transport-https'
sudo chroot sysroot-full /bin/bash -c 'apt-get build-dep -y qt4-x11 qtbase-opensource-src'
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0'
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 libraspberrypi-dev'

sudo umount sysroot-full/sys
sudo umount sysroot-full/dev
Expand Down
38 changes: 38 additions & 0 deletions utils/synchronize-qt-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,44 @@ cd_root
MODULES_DIR='modules'
TAG_NAME=$QT_VERSION

function usage() {
cat <<EOF
Usage: $0 [options]
-h| --help Display help text.
-c| --clean-all Delete all repositories and output data.
EOF
}


while [[ $# -gt 0 ]]; do
KEY="$1"
case $KEY in
-h|--help)
DISPLAY_HELP=true
;;
-c|--clean-all)
CLEAN_ALL=true
;;

*)
;;
esac
shift
done

if [[ $DISPLAY_HELP ]]; then
usage
exit 0
fi

if [[ $CLEAN_ALL ]]; then
message 'Clean all repositories and output...'
rm -rf $MODULES_DIR
rm -rf raspi/qt5 raspi/qt5pi
fi


if [ ! -d $MODULES_DIR ] ; then
message "Create $MODULES_DIR directory..."
mkdir $MODULES_DIR
Expand Down

0 comments on commit d429947

Please sign in to comment.