git clone https://github.com/matt-blodgett/qtrpi.git
cd ./qtrpi
Of particular importance is setting the --target-host
variable as it is empty by default.
./qtrpi.sh config --local-path "/opt/qtrpi"
./qtrpi.sh config --target-host "pi@192.168.0.15"
This will prevent numerous repeated password prompts when running the build process.
The setup is made simple with the --set-ssh-auth
option:
Simply follow the prompts and you should be able to ssh
to the device unprompted.
./qtrpi.sh device --set-ssh-auth
./qtrpi.sh build --install
The build process has a few distinct steps:
- Creates a local repository where the RaspberryPi build toolchain and built Qt modules will be located
- Installs dependencies on the target device.
- Creates a sysroot and uses
rsync
to keep it up to date with new modules and dependencies. - Builds QtBase using the cross compiling toolchain from https://github.com/raspberrypi/tools.git
- Updates and configures the device with the new libs and fixes known issues with the process.
If building QtBase fails try the following steps:
- Install any missing dependencies on the device
- Make sure
rpi-update
has been run on the device - Tweak the
./configure
variables used - Retry the build with
./qtrpi.sh build --rebuild
Source Reference: wiki.qt.io/RasperryPi2EGLFS
Once qtbase is successfully built, use the following steps to configure QtCreator to build and deploy automatically to the device.
- Go to
Options -> Devices
and add:Generic Linux Device: Enter IP address, user & password for the device
- Go to
Options -> Compilers
and add:'GCC', compiler path: ../raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
- Go to
Options -> Debuggers
and add:../raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gdb
- Go to
Options -> Qt Versions
and add:~/raspi/qt5/bin/qmake`
- Go to
Options -> Build & Run -> Kits
and add:Generic Linux Device Device: the one just created Sysroot: ../raspi/sysroot Compiler: the one just created Debugger: the one just created Qt version: the one seen under Qt Versions Qt mkspec: leave empty