Cross compiling Qt was actually very easy. I used the same machine described in the mini2440 kernel post. If you have a vanilla install of Fedora 11 it's more than likely you'll get some errors due to missing packages so check the list i posted if you can't figure out which ones you need. This is what i did:
- Download the Qt source from Trolltech
- Untar the archive somewhere, i simply used the desktop
- Edit the file mkspecs/qws/linux-arm-g++/qmake.conf according to your toolchain. I have attached mine here as an example. I used the toolchain from OpenEmbedded.
- Now run the following commands within the Qt directory:
- .\ */configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian*
- *gmake -j 2* (or however many CPUs you have)
- sudo gmake install
The resulting ~74MB will be located in /usr/local/Qt. At first i ran the library from an SD card using a system wide link but later i used NFS.
I ran the library using BusError's mini2440 kernel and an Angstrom base image I cross compiled using OpenEmbedded apriori. In my next post i'll describe how to compile Angstrom Linux for this purpose which also provides the toolchain i used here. Finally when i get access to my mini2440 i'll explain how to use the examples and setup the touch screen which was a little fiddly.
Big thanks to Cor for his post on building Qt which i've relied on heavily here.