Getting Qt 4.3.2 running on the Chumby
First, we need the GNU toolchain to cross-compile things for the Chumby. Download and install it from:
Now, we need to decide where to install our files to; i.e., our prefix. Since I'm having some trouble with my NFS share, I'll use my USB stick. (Located at /mnt/usb). Feel free to replace this with your prefix wherever you see me mention this location. Next, we need to download and install tslib for the touchscreen.
I used version 1.0 from: http://tslib.berlios.de/
Make sure you have autoconf, libtool, and the other usual suspects installed. Then from the extracted files directory run:
./configure --prefix=/mnt/usb --host=arm-linux
If you get some errors about rpl_malloc, simply comment out that evil line in config.h and try make again.
Next up is Qt.
Unpack it, and run:
./configure -embedded arm -pch -prefix /mnt/usb -qt-kbd-usb -qt-mouse-tslib \
-L/mnt/usb/lib/ -I/mnt/usb/include/ -nomake examples -nomake demos
Note:You can leave out the -qt-kbd-usb if you want. I kept it in since I like being able to type on the Chumby with my USB keyboard ;). Also, thanks to orangerobot from the Chumby forum for pointing out the mangled -L line.
So far we don't have any Qt programs to play with. Let's compile a small Qt widget/app called PictureFlow (http://code.google.com/p/pictureflow/) by Ariya Hidayat.
I have modified the sources slightly (added basic mouse support, some images, resizing), and packaged it here:
Uncompress it, and in that very directory:
Copy the resulting binary and images to a place on your prefix:
cp pictureflow *jpg /mnt/usb/test/
Now, we need to create a file with some environment variables that you can use when you're in your Chumby shell.
Create a file in your prefix (/mnt/usb for me) called chumby.env with the following contents:
Finally it's Chumby time!
Enable SSH on the Chumby as per:
SSH in and cd in to your directory of installed files.
For me, this meant:
Plugging in my USB stick.
Lets start off by killing the current Chumby GUI:
Now, we need to source that file with environment variables:
Then, we need to configure the touch screen for tslib.
Make sure that your etc/ts.conf file has the input module un-commented.
My /mnt/usb/etc/ts.conf looks like:
module pthres pmin=1
module variance delta=30
module dejitter delta=100
Finally, we need to calibrate the touchscreen:
Make sure that you touch the five different crosshair locations. If you accidently tap twice at the same spot, re-run ts_calibrate untill you get it right :)
To test and make sure that tslib is working correctly, feel free to play with:
You should be able to drag the crosshair around.
And last but not least - it's time to try out our Qt app:
If all is well, you should see something that looks like this:
Hopefully you didn't encounter any problems. These steps worked for me, but I may have just been lucky ;). More likely though is that I forgot to mention something. Please feel free to ask questions on this Chumby forum thread:
Allthough I realize that this was quite cumbersome, the good new is that you basically only need to do this once. Thereafter you just need to write your Qt app (Google for tutorials ;)), qmake, make, and copy the executable to your Chumby! :)