Archive for January 29th, 2009

Deploying QT Embedded 4.4.3 on the board

From a few blogs ago I successfully compiled QT/E 4.4.3. It installed in my virtual machine at /usr/local/Trolltech/QtEmbedded-4.4.3-arm/.
On the board use the following commands:

$ mkdir -p /usr/local/Trolltech
$ chown -R eclipse:eclipse /usr/local/Trolltech

In Xbuntu:

$ cd /usr/local/Trolltech
$ scp -r QtEmbedded-4.4.3-arm/ eclipse@

“″ is required on the board. I obtained this from the precompiled binaries of QT3 on Place this file in /usr/local/lib

On the board:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/linux-arm/lib/:/usr/local/lib:/usr/local/Trolltech/QtEmbedded-4.4.3-arm/lib/
$ export QWS_MOUSE_PROTO = Tslib

It is best to put these in /root/.bashrc so they get automatically entered for each user session.

Since QT/E writes to frame buffer it will mess the output of IceWM. I done a sudo apt-get remove icewm and removed x11 similarly. You can do it temporary by doing a ps -A and checking the process id of IceWM and doing a kill <psnumber>
To run the program, it requires a server program but if it is the server itself you use the -qws option. For example:
$ cd /usr/local/Trolltech/QtEmbedded-4.4.3-arm/examples/widgets/analogclock
$ ./analogclock -qws

Now the problem with the output is the colours are all messed up. It seems no green and red can be displayed. This took days and days to sort and this is all explain in my next blog.

Installing TSLib and Calibrating it

From previous blogs, I successfully cross-compiled TSLib. It installed it in /usr/local/linux-arm. So on my board I created a similar path. Since I am doing a secure copy up, I need to give /usr/local/linux-arm a new owner (eclipse).

$ mkdir /usr/local/linux-arm
$ chown -R eclipse:eclipse /usr/local/linux-arm

In VMWare:
$ cd /usr/local
$ scp -r linux-arm/ eclipse@

Now TSLib requires environment variables set up. Edit /root/.bashrc and add these lines:

export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/linux-arm/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/linux-arm/lib/ts

Do a switch user to load these
$ su

Now open /usr/local/linux-arm/etc/ts.conf file and delete all lines and add this:

module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear

(Make sure that there are no empty lines above or below)

Now to calibrate the device navgiate to the bin directory and run the program. It will display on screen points to tip. Once it is calibrated it will create a file /etc/pointercal. Don’t touch this file. If it fails to create it, ensure neccessary permissions on /etc to allow it. DO NOT CREATE a blank file before hand or you will get a segmentation fault.

$ cd /usr/local/linux-arm/bin
$ ./ts_calibrate

And that is all to installing and configuring TSLib.