Transplant Qt to the Development Board
- Copy the “tslib” installation files in “/usr/local/tslib” to directory “myd-am335x_rootfs /usr/local/ tslib”, which is used to compile the file system.
$ cp –ra /usr/local/tslib <WORKDIR>/myd-am335x_rootfs/usr/local/
- Copy qt-4.8.5 installation files in directory “/opt/qt-4.7.1” to “myd-am335x_rootfs /opt”:
$ cp –r /opt/qt-4.8.5 <WORKDIR>/myd-am335x_rootfs/opt/
- Enter directory “/etc/init.d”, edit the script “qt.sh” as follows:
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/tslib/lib:/opt/qt-4.8.5/lib
export QT_QWS_FONTDIR=/opt/qt-4.8.5/lib/fonts
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/tslib/bin
if grep "hdmi" /proc/cmdline > /dev/null ; then
export QWS_MOUSE_PROTO="Tslib:/dev/input/event1 MouseMan:/dev/input/mice"
else
export QWS_MOUSE_PROTO="Tslib:/dev/input/event1"
fi
export QWS_DISPLAY=:1
Export QWS_DISPLAY=:1Modify the “rc” file under directory “/etc/init.d/”of develop ment, add the following contents at the end of the document:
if [ -e /etc/init.d/qt.sh ];then
/etc/init.d/qt.sh
fi
- Recompile the file system, then a “ubi.img” file containing the Qt libraries and “tslib” will be generated