Overview
So, how did I create these binaries....well I thought it would be fun to see how long it would take the Beaglebone to compile Qt. Here is a brief description of my setup.I powered the Beaglebone with a 5v power supply and booted a Debian rootfs using TFTP and NFS (a future post will explain how to configure this) so I could utilize the large HD of my Linux host. After compiling and installing Qt, the total root filesystem usage is around 3 Gb. The actual compile took about 21 hours, which includes compiling all examples and plugins.
Configuration
I created a simple shell script to modify the Qt source, with the Beaglebone configuration, and run the Qt configuration script:#!/bin/sh# Create beaglebone hard float configuration filecd qt-everywhere-opensource-src-5.2.1/qtbase/mkspecs/devices/cp -r linux-beagleboard-g++ linux-beaglebone-g++sed 's/softfp/hard/' <linux-beagleboard-g++/qmake.conf >linux-beaglebone-g++/qmake.conf# Run configuration
cd ../../.././configure -v -opensource -confirm-license -prefix /usr/local/qt-5.2 -no-largefile -no-accessibility -qt-zlib -no-gif -qt-libpng -qt-libjpeg -no-nis -no-cups -device linux-beaglebone-g++
This produced the following summary:
Configure summaryBuild type: linux-g++ (arm, CPU features:)Platform notes:- Also available for Linux: linux-kcc linux-icc linux-cxxqmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_CFLAGS_DBUS = -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include QT_LIBS_DBUS = -ldbus-1 QT_CFLAGS_GLIB = -pthread -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_GLIB = -pthread -lgthread-2.0 -lrt -lglib-2.0 QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include QT_LIBS_PULSEAUDIO = -lpulse-mainloop-glib -lpulse -lglib-2.0 DEFINES += QT_NO_LIBUDEV QMAKE_CFLAGS_XCB = QMAKE_LIBS_XCB = -lxcb QMAKE_CFLAGS_DIRECTFB = -D_REENTRANT -I/usr/include/directfb QMAKE_LIBS_DIRECTFB = -ldirectfb -lfusion -ldirect -lpthread sql-drivers = sql-plugins = sqlite qmake switches .........Build options:Configuration .......... alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent dbus directfb evdev eventfd full-config getaddrinfo getifaddrs glib iconv inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap neon no-gif no-harfbuzz opengl openssl pcre png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports reduce_relocations release rpath shared small-config system-freetype xcb xcb-qt xkbcommon-qt xlib zlibBuild parts ............ libs tools examplesMode ................... releaseUsing C++11 ............ yesUsing PCH .............. yesTarget compiler supports:iWMMXt/Neon .......... no/yesQt modules and options:Qt D-Bus ............... yes (loading dbus-1 at runtime)Qt Concurrent .......... yesQt GUI ................. yesQt Widgets ............. yesJavaScriptCore JIT ..... yes (To be decided by JavaScriptCore)QML debugging .......... yesUse system proxies ..... noSupport enabled for:Accessibility .......... noALSA ................... yesCUPS ................... noFontConfig ............. noFreeType ............... systemIconv .................. yesICU .................... noImage formats:GIF .................. noJPEG ................. yes (plugin, using bundled copy)PNG .................. yes (in QtGui, using bundled copy)Glib ................... yesGTK theme .............. noLarge File ............. nomtdev .................. noNetworking:getaddrinfo .......... yesgetifaddrs ........... yesIPv6 ifname .......... yesOpenSSL .............. yes (loading libraries at run-time)NIS .................... noOpenGL ................. desktopOpenVG ................. noPCRE ................... yes (bundled copy)pkg-config ............. yesPulseAudio ............. yesQPA backends:DirectFB ............. yesEGLFS ................ noKMS .................. noLinuxFB .............. yesXCB .................. yes (bundled copy)MIT-SHM ............ yesXcb-Xlib ........... noXcursor ............ yes (loaded at runtime)Xfixes ............. yes (loaded at runtime)Xi ................. yes (loaded at runtime)Xi2 ................ noXinerama ........... yes (loaded at runtime)Xrandr ............. yes (loaded at runtime)Xrender ............ noXKB ................ yesXShape ............. yesXSync .............. yesXVideo ............. yesSession management ..... yesSQL drivers:DB2 .................. noInterBase ............ noMySQL ................ noOCI .................. noODBC ................. noPostgreSQL ........... noSQLite 2 ............. noSQLite ............... yes (plugin, using bundled copy)TDS .................. noudev ................... noxkbcommon .............. yes (bundled copy)zlib ................... yes (bundled copy)NOTE: libxkbcommon 0.2.0 (or higher) not found on the system, will usethe bundled version from 3rd party directory.NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.Configure with '-qreal float' to create a build that is binary compatible with 5.1.
If you've tried cross compiling Qt, from my other posts, you will notice a lot more modules are enabled in this build.
I've tested a few examples and they all work, but I have not tested everything (haven't been able to test touch screen stuff yet). The examples default to using X11, if you want to use the linuxfb, add '-platform linuxfb' to the command line options. For example:
> analogclock -platform linuxfb
Here are two versions of binaries, one that includes examples (78 Mb) and one that does not (36 Mb).
MD5SUM:
9395fc70f576e58b68df7d732a002abb qt-5.2-no-examples.tgz
f698f038166c4b2f65cec40056e23db2 qt-5.2.tgz
If you want to try your hand at compiling applications on the Beaglebone, these packages have a native qmake included. Don't forget to add /usr/local/qt-5.2/bin to your path.
Have fun!