1、首次移植tslib,在QT中使用和触摸屏有关的库,
(1)解压tslib-1.4.tar.gz http://www.linuxidc.com/Linux/2011-05/36451.htm
(2)运行./autogen.sh
(3)执行一下命令 :
echo \"ac_cv_func_malloc_0_nonnull=yes\" >$ARCH-linux.cache
./configure --host=arm-none-linux-gnueabi --prefix=/home/tslib --cache-file=$ARCH-linux.cache
编译器的名称和安装的位置可根据自己的情况而定。(最好将编译命令链接为varm-linux-* , 这样在后面更加方便,我是这样做的)
(4)最好执行,make, make install
(5)设置目标板文件系统环境变量
export TSLIB_ROOT=/home/tslib
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export LD_LIBRARY_PATH=/home/tslib/lib:$LD_LIBRARY_PATH
export QWS_SIZE=320x240
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/home/tslib/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFILE=/home/tslib/etc/ts.conf
export POINTERCAL_FILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/touchscreen-1wire
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=\"LinuxFb:mmWidth100:mmHeight130:0\"
export TSLIB_TSEVENTTYYPE=H3600
export PATH=$PATH:/home/tslib/bin
2、qt/embedded移植
(1)解压文件qt-everywhere-opensource-src-4.7.0.tar.gz
(2)执行
./configure -embedded arm -prefix /home/qt-arm-4.7.0 -release -shared -fast -pch -no-qt3support -no-sql-sqlite -no-libtiff -no-libmng -no-libjpeg -qt-zlib -no-libpng -no-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-phonon -no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-svg -no-phonon-backend -no-3dnow -no-largefile -no-gif -no-mmx -no-xrender -no-xmlpatterns -no-xkb -no-sm -no-xinerama -no-xshape -no-webkit -no-separate-debug-info -xplatform qws/linux-arm-g++ -depths 16 -no-qvfb -no-gtkstyle -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb -little-endian -qt-mouse-tslib -I/home/tslib/include -L/home/tslib/lib