Go to file
Hendrik Schutter 7030372ac7 fixed configure cmd 2020-10-09 11:21:41 +02:00
demo/untitled fixed configure cmd 2020-10-09 11:21:41 +02:00
.gitignore initial commit 2020-10-08 19:54:32 +02:00
LICENSE Initial commit 2020-10-08 19:46:52 +02:00
README.md fixed configure cmd 2020-10-09 11:21:41 +02:00
install_host.sh fixed configure cmd 2020-10-09 11:21:41 +02:00
sysroot-relativelinks.py initial commit 2020-10-08 19:54:32 +02:00



Toolchain to build Qt Apps on a host system (like a X86 Desktop) and deploy it on a Raspberry Pi. Uses custom Qt and cross compiler.

This is a simplified and scripted version of: https://www.kampis-elektroecke.de/raspberry-pi/qt/ Read this if you using a different Raspberry as the Model B 2 or need X11 support.


Raspberry Pi with up-to-date GNU/Linux SSH Connection to host system


Setup Raspberry Pi

apt-get build-dep qt5-qmake
apt-get build-dep libqt5gui5
apt-get build-dep libqt5webengine-data
apt-get build-dep libqt5webkit5
apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 gdbserver

Default Qt installation path is: "/usr/local/RaspberryQt"

mkdir /usr/local/RaspberryQt
chown -R pi:pi /usr/local/RaspberryQt
ln -s /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 
ln -s /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 
ln -s /opt/vc/lib/libEGL.so /opt/vc/lib/libEGL.so.1 
ln -s /opt/vc/lib/libGLESv2.so /opt/vc/lib/libGLESv2.so.2

Setup host system

apt install libjasper-dev
apt-get install -y git cmake build-essential pkg-config libjpeg-dev libtiff5-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran wget unzip libz-dev zlib1g-dev gcc g++ git bison python gperf gdb-multiarch qt5-default texinfo make python3-dev

Create new SSH-Key for passwordless remote login

ssh-keygen -t rsa -C root@ -P "" -f ~/.ssh/rpi_root_id_rsa
cat ~/.ssh/rpi_root_id_rsa.pub | ssh root@ 'cat >> .ssh/authorized_keys && chmod 640 .ssh/authorized_keys'

create folders

mkdir build
mkdir sysroot sysroot/usr sysroot/opt

copy sysroot to host

rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@ sysroot
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@ sysroot/usr
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@ sysroot/usr
rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" root@ sysroot/opt

run script to resolve requirements and build Qt

bash install_host.sh

copy Qt to Raspberry Pi

rsync -avz -e "ssh -p22 -i ~/.ssh/rpi_root_id_rsa" sysroot/usr/local/RaspberryQt root@

Fix fonts (on Raspberry)

mkdir /usr/local/RaspberryQt/lib/fonts
cp /usr/share/fonts/truetype/dejavu/* /usr/local/RaspberryQt/lib/fonts


open demo/untitled/untitled.pro with Qt Creator on host

For setting up the Qt Creator for remote deployment, see: https://www.kampis-elektroecke.de/raspberry-pi/qt/