不浮躁
分类: 嵌入式
2014-12-07 23:11:15
安装tslib1.4
1. 下载tslib1.4,解压到/home下
2. sudo apt-get install autoconf automake libtool
sudo apt-get install g++
sudo apt-get -y install x-dev libx11-dev xlibs-static-dev x11proto-xext-dev libxext-devlibqt3-mt-dev
sudo apt-get install libxtst-dev,否则编译 qvfb出错。
2. 进入解压的目录运行 执行./autogen.sh
3. 执行./configure --prefix=/opt/tslib/ --host=arm-linux ac_cv_func_malloc_0_nonnull=yes ,经过一段时间的编译
4. 执行make
若make出错,可能由于修改了/root/.bashrc未注销,此时输入arm-linux-gcc –v 若找不到命令则重新执行2.1步骤
5. 执行make install
6. 修改/opt/tslib/etc/ts.conf,把第二行的#号去掉(这样做的主要目的是为了在移植到板子上的时候,可以制定输入模块)
把# module_raw collie 前面的“#”号去掉,然后把该行移至行首,最后我的配置文件如下:
1. module_rawcollie
2. modulepthrespmin=1
3. modulevariancedelta=30
4. moduledejitterdelta=100
5. modulelinear
6. 在/etc/profile中加入
export PATH=/opt/tslib:$PATH(/opt/tslib为上面--prefix=/opt/tslib/所设的tslib1.4的安装目录)
3.编译qt4.7.4-arm
1. 将qt-everywhere-opensource-src-4.7.4.tar.gz压缩包放在/opt下,解压,重命名:
2. 在工作目录/opt/FriendlyARM/mini2440中执行:
3. #cd /opt/FriendlyARM/mini2440
#tar xvzf qt-everywhere-opensource-src-4.7.4.tar.gz
#cd /opt
#tar zxvf qt-everywhere-opensource-src-4.7.4.tar.gz
#mv qt-everywhere-opensource-src-4.7.4 qt-4.7.4-arm
#cd qt-4.7.4-arm
2. 开始进行配置选项
./configure -embedded arm -release -opensource -fast -no-accessibility -no-scripttools -no-mmx -no-multimedia -no-svg -no-3dnow -no-sse -no-sse2 -silent -qt-libpng -qt-libjpeg -no-libmng -no-libtiff -no-multimedia -make libs -nomake tools -nomake examples-nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 16,18 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-glib -qt-mouse-tslib -I /opt/tslib/include -L /opt/tslib/lib -confirm-license"$@"
./configure -embedded arm -release -opensource -fast -no-accessibility -no-scripttools -no-mmx -no-svg -no-3dnow -no-sse -no-sse2 -silent -qt-libpng -qt-libjpeg -no-libmng -no-libtiff -make libs -nomake tools -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 16,18 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-vnc-qt-mouse-linuxup -qvfb -qt-gfx-linuxfb -qt-gfx-multiscreen -qt-gfx-qvfb -qt-kbd-linuxinput -qt-mouse-tslib -I /opt/tslib/include -L /opt/tslib/lib -confirm-license"$@"
configure qte for embedded x86
./configure -prefix /home/devin/test/qte-4.6.3 -release -no-separate-debug-info -shared -no-fast -largefile -exceptions -accessibility -stl -qt-sql-sqlite -xmlpatterns -multimedia -audio-backend -no-phonon -phonon-backend -svg -webkit -javascript-jit -script -scripttools -no-declarative -qt-zlib -qt-gif -no-libtiff -qt-libpng -no-libmng -qt-libjpeg -openssl -nis -no-cups -iconv -pch -qt-gfx-linuxfb -qt-gfx-multiscreen -qt-gfx-qvfb -no-gfx-transformed -no-glib -dbus -qvfb -qt-mouse-qvfb -plugin-mouse-tslib-nomake tools -nomake examples-nomake docs -nomake demo -opensource -confirm-license -qt-mouse-linuxinput -embedded x86 -xplatform qws/linux-x86-g++ (-arch x86 -no-armfpa -depths 2,8,16,32)
此步可能提示不成功,The tslib functionality test failed!.
解决1:我的做法是重新安装了tslib就解决了。
解决2:
编译QT4.7
sudo ./configure -opensource -embedded arm -xplatform qws/linux-arm-g++ -no-webkit -qt-libtiff -qt-libmng -qt-mouse-tslib -qt-mouse-pc -no-mouse-linuxtp -no-neon -I /usr/local/tslib/include -L /usr/local/tslib/lib
出现这个错误
Creating qmake. Please wait...
make: 没有什么可以做的为 `first'。
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/ian/lib/qt-everywhere-opensource-src-4.7.0/mkspecs/qws/linux-arm-g++.
tslib我也已经编译安装了,实在是无解
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
QMAKE_LIBDIR=/usr/local/tslib/lib
QMAKE_INCDIR=/usr/local/tslib/include
# modifications to g++.conf
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lts
# modifications to linux.conf
QMAKE_AR = arm-linux-ar cqs
QMAKE_OBJCOPY = arm-linux-objcopy
QMAKE_STRIP = arm-linux-strip
load(qt_config)
也添加了,
请问谁知道还遗漏了什么?
onelook | 1 |
搞了3天,狂吐3斤鲜血,终于搞定了。太坑了。 打开configure后看脚本 for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS if [ $? != "0" ]; then echo "The tslib functionality test failed!" echo " You might need to modify the include and library search paths by editing" echo " QMAKE_INCDIR and QMAKE_LIBDIR in" echo " ${XQMAKESPEC}." exit 1 不光是着不到库会报这个错,着不到编译器,一样报这个错。 所以说 # # qmake configuration for building with arm-linux-g++ # QMAKE_INCDIR +=/usr/local/include/ QMAKE_LIBDIR +=/usr/local/lib/ QMAKE_LIBDIR +=/usr/local/lib/ts include(../../common/g++.conf) include(../../common/linux.conf) include(../../common/qws.conf) # modifications to g++.conf QMAKE_CC = /dev-lib/toolschain/4.5.1/bin/arm-linux-gcc -lts QMAKE_CXX = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts QMAKE_LINK = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts QMAKE_LINK_SHLIB = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts # modifications to linux.conf QMAKE_AR = arm-linux-ar cqs QMAKE_OBJCOPY = arm-linux-objcopy QMAKE_STRIP = arm-linux-strip load(qt_config) 红色字是后来加上去的,再configure 就ok了 在编译tslib的时候要注意,千万别编译成了x86的,不然通不过test 一样又是报这个错。 尼玛,写清楚点会死啊 |