This example uses a XENARC 706TSA monitor http://www.xenarc.com/product/706tsa.html
To use a USB touchscreen on i.MX51 EVK, disable all touchscreen drivers on menuconfig and build the kernel:
Device Drivers ---> Input device support ---> [ ] Touchscreens --->
Download xserver-xorg-input-evtouch (0.8.8-ubuntu3 version) from http://launchpadlibrarian.net/24760784/xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb.
X crash is found if using latest 0.8.8-ubuntu6.1 version. For the details. See https://bugs.launchpad.net/ubuntu/+source/xf86-inputevtouch/+bug/511491
On MX51 EVK board, run “sudo dpkg –i xserver-xorg-input-evtouch_0.8.8-0ubuntu3_armel.deb” to install debian package.
Add fdi file by "sudo vi ./usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi":
<?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2"> <device> <match key="info.product" contains="eGalax"> <match key="info.capabilities" contains="input"> <merge key="input.x11_driver" type="string">evtouch</merge> <merge key="input.x11_options.minx" type="string">130</merge> <merge key="input.x11_options.miny" type="string">197</merge> <merge key="input.x11_options.maxx" type="string">3945</merge> <merge key="input.x11_options.maxy" type="string">3894</merge> <merge key="input.x11_options.Rotate" type="string">CCW</merge> <merge key="input.x11_options.Swapy" type="string">true</merge> <merge key="input.x11_options.taptimer" type="string">30</merge> <merge key="input.x11_options.longtouchtimer" type="string">750</merge> <merge key="input.x11_options.longtouched_action" type="string">click</merge> <merge key="input.x11_options.longtouched_button" type="string">3</merge> <merge key="input.x11_options.oneandhalftap_button" type="string">2</merge> <merge key="input.x11_options.movelimit" type="string">10</merge> <merge key="input.x11_options.touched_drag" type="string">1</merge> <merge key="input.x11_options.maybetapped_action" type="string">click</merge> <merge key="input.x11_options.maybetapped_button" type="string">1</merge> </match> </match> </device> </deviceinfo>
Save above configuration.
Calibration in made by clicking on System -> Administration -> Calibrate Touchscreen
Follow the on screen instructions and reboot the system.
Xinput_calibrator is another option to calibrate touchscreen. It can be downloaded at: http://www.freedesktop.org/wiki/Software/xinput_calibrator
On i.MX5x Ubuntu, unpack the source code:
tar -xzvf xinput_calibrator-0.7.5.tar.gz
Install xorg-dev, it's required to build xinput_calibrator
sudo apt-get install xorg-dev
Configure, build and install xinput_calibrator
./configure ./make ./make install
Execute xinput_calibrator. A four-point calibration screen will be shown. Follow the instructions on screen and after complete xinput_calibrator will return the calibration parameters.
Replace the given calibration parameters on file /usr/share/hal/fdi/policy/20thirdparty/50-eGalax.fdi and reboot the system.