Cross compiling Qt for particular devices/BSPs can be frustrating when operating from first principles and we are trying to improve the existing configure/qmake build infrastructure in Qt 5, as well as the associated documentation, in order to ease this burden. We are approaching the problem from 2 angles:
- General cross compilation support
- Direct target support
The general cross compilation support is being improved by:
- Reworking the pkg-config logic
- Introducing the -device flag to configure
- Introducing the -sysroot flag to configure
The supported targets are documented here:
and as you can see in the Raspberry Pi documentation, we have reduced compilation for this target down to:
./configure -prefix <your prefix> -release -device linux-rasp-pi-g++ -make libs -device-option CROSS_COMPILE=<your toolchain path>/bin/arm-none-linux-gnueabi- -sysroot <your sysroot path>
The resulting build has full (single process) OpenGL ES 2 support and keyboard support for the Raspberry Pi.
There is no need to patch any files as all the relevant changes have been upstreamed into Qt 5 where they can be adequately reviewed and QAed like any other Qt contribution. Needless to say this drastically increases the quality of the code finding its way on to these devices and should drastically improve the user experience when dealing with this kind of hardware for prototyping/productization/recreation. Sunlight is the best disinfectant, and we delight in consuming this dog food.
We heartily invite any (all!) chipset vendors/chipset customers/BSP vendors or interested parties to upstream relevant mkspecs and the associated code changes to Qt, in order to extend the breadth of Qt 5’s out-of-the-box device support. The move to Open Governance has made extending this support increasingly achievable, feasible and convenient and we are very excited about both Qt 5 as a whole and the current rate of development towards embedded (read constrained) Linux platforms.