Chasing the raspberry pi dragon: OpenGL ES2 accelerated Qt PI
The raspberry pi initiative is very compelling and (forgive me for the hype) just got even more compelling now that we have Qt 5 running with full acceleration on the target. A tagline of "An ARM Linux box for $25. Take a byte!" sums it up rather nicely and should get many a geeks pulse racing. The Mer community have been good about getting Qt up and running on the Raspberry PI and we appreciate their drive and rapid work. We will now proceed to document how to build Qt in order to have full OpenGL ES 2 (tested) and OpenVG support (untested)
I have tested Qt 4.8 QWS with the simplegl driver, Qt 4.8 QPA (lighthouse) trunk with the EGLFS driver and Qt 5 trunk with the EGLFS driver. We are looking great on all fronts. (Videos to follow, but the performance is great at 1360x768) The required changes were a couple lines of Broadcom specific initialization code which is added to the simplegl connect method and the QEglFSScreen constructor respectively for QWS/QPA.
We clearly can't distribute the libraries/headers the above mkspecs reference. (Qt Embedded/QPA are both largely self contained and only require external headers/libs for EGL/GLES2/OpenVG support)
I am using the Code Sourcery 2010q1 compiler.
I am using a sd-card (read snapshot) with all the required libraries (and the EGL/GLES2/VG headers required to compile Qt)
I was happy to see how easy it was to get Qt 5 cross compiled and running on the device. I restricted my build efforts to qtbase and qtdeclarative, but this built rapidly and without fault.
Caveat!: Before proceeding, my instructions are home brewed, pragmatic and get the job done. If you have better/functional instructions on getting the Qt 5 repo to a buildable state, then please don't walk off a cliff with me.
Checking out Qt 5:
git clone git://gitorious.org/qt/qt5.git
The implications of this are covered in the README
Proceeding with the build
Having symlinked in the appropriate mkspec from the git repo above and abstracting away my personal path arrangements, my configure line follows:
/opt/dev/src/qt5/qtbase/configure -prefix /opt/dev/qt-qpa-5-rasp-pi -release -no-phonon -no-qt3support -no-webkit -make libs -armfpa -arch armv6 -xplatform linux-rasp-pi-g++ -opengl es2 -confirm-license
Once this was built and you have your trusty qt 5 relevant qmake, creating a qtdeclarative directory within your shadow built qt, and running:
Gets you Qt Quick 2 (Scenegraph) enriched and merrily on your road to riches.
What remains to be done:
1) The device has OpenMax support which we could use for Audio/Video/Image decoding. It would be nice to see whether we can utilize this in Qt's image loading plugin mechanism.
2) Get qtwebkit compiled, deployed and running on the target (Python related hijinxs stemming from the build-webkit script postponed inclusion in the done list above)
3) Turtles the whole way down (There is no shortage of board specific customization we could potentially indulge in)
I look forward to the deluge of videos showing the capabilities of accelerated Qt (4 or 5) on this fine hardware. We will be demoing this device in the demo pavilion at this year's Qt Developer Day event in Munich and San Francisco and I will personally be on hand to answer any posting/cross compilation questions you may happen to have.
Subscribe to our newsletter
Try Qt 6.3 Now!
Download the latest release here: www.qt.io/download.
Qt 6 was created to be the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu