Please, may I have another slice of Raspberry Pi...
About three weeks ago, Nokia arranged for ICS to gain access to the Raspberry Pi board so that we could help with an exploratory open source effort to get Qt working on this platform. That is how I got my chance to hack some code for this amazing board. The idea was to get a bleeding edge version of Qt 5 to run and to experience first hand hardware accelerated QSceneGraph based QML. And indeed bleeding edge it is - but also blazing fast. Now, first things first:
We have all by now heard of Raspberry Pi, the newest entry into the world of dessert named geek toys. Actually we are talking real hardware here, cheap, feature-rich and really compact hardware. Given that we are looking at a hardware accelerated eglfs driver it is an ideal platform to test out Qt 5 and see how fast it can be on relatively low end hardware.
Raspberry Pi's ARM6(V11) chip can easily be tamed with CodeSourcery's ARM tool-chain. Donald Carr had already explored this before and we simply followed him around until he elaborated on his instructions. (See http://labs.qt.nokia.com/2011/10/03/chasing-the-raspberry-pi-dragon-opengl-es2-accelerated-qt-pi/). It sure helps if he is standing next to you (that man never sits down). Cross compiling Qt has not changed much in recent years and the process is still valid for Qt 5 - no big surprises there in the end.
The bigger surprise came with the realization that there was no keyboard input when we ran our first chunk of QML code in QSGViev (this one's about to be renamed btw.).
Well - modular architecture right? There should be some code in qtbase/src/plugins/generic/linuxplugin but all we could find was a mouse driver. So we spun back the big time wheel (aka gitorious) and went back to good ole QWS where we found something that resembled what we needed. The code in QWS's qkbd_qws.[cpp,h] was refactored, a few mysteries were fixed and the resulting shiny new keyboard driver was moved into its new home.
But wait there is more:
The old driver has the device nodes hardwired (/dev/input/event2) - go figure - sometimes you would be getting your keyboard events from your mouse or whatever device might just be assigned to this node. That's not really how we want to start our relationship with the new Qt 5 development process and so we implemented proper device detection via libudev.
The magical moment came when we were finally able to type the words: Hello World into a TextEdit and saw the fruits of our labor appear - ah the possibilities.
I will followup shortly with another entry where I describe how you can also get this keyboard code and try it out for yourself.
Meanwhile, if you are interested, one of my colleagues (Roland Krause) should be talking about this work at the Qt Contributor day. Or alternatively, stop by the ICS booth at DevDays Munich and take a look at what has been accomplished.