9263上移植qt4.7.3

基本全部抄写了别人的移植过程,红色为我认为要注意的:

1.安装tslib,支持触摸屏。将压缩文件解压缩到/opt目录

tar xvzfkergoth-tslib-1.0-98-ge17263e.tar.gz -C /opt

进入/opt/kergoth-tslib-e17263e目录

cd /opt/kergoth-tslib-e17263e

配置tslib环境

make clean

./autogen-clean.sh

指定交叉编译器进行编译,但是切记在tslib安装完成之后,要将当前Terminal关闭,重新打开Terminal其他工具的安装,否则会报错”tslib functionality test failed, /bin/gmake: cannot executebinary file”

exportCC=/opt/arm-2007q1/bin/arm-none-linux-gnueabi-gcc

exportCXX=/opt/arm-2007q1/bin/arm-none-linux-gnueabi-g++

./autogen.sh

将tslib安装在/usr/local/tslib目录

./configure--prefix=/usr/local/tslib --host=arm-none-linux-gnueabiac_cv_func_malloc_0_nonnull=yes

编译tslib

make

安装tslib

make install

此处编译的tslib最终要移植到开发板上,必须是这个,其他都会引起运行时错误

接着安装arm版本

将压缩文件解压到/opt目录下

tar xvzfqt-everywhere-opensource-src-4.7.3.tar.gz -C/opt

进入/opt目录

cd /opt

将解压缩的文件夹重命名为arm

mvqt-everywhere-opensource-src-4.7.3 arm

进入arm目录

cd arm

修改./mkspecs/qws/linux-arm-gnueabi-g++目录中的qmake.conf

# modifications to g++.conf

QMAKE_CC                =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-gcc -lts

QMAKE_CXX               =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-g++ -lts

QMAKE_LINK              =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-g++ -lts

QMAKE_LINK_SHLIB        =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-g++ -lts

 

# modifications to linux.conf

QMAKE_AR                =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-ar cqs

QMAKE_OBJCOPY           =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-objcopy

QMAKE_STRIP             =/opt/arm-2007q1/bin/arm-none-linux-gnueabi-strip

开始配置Qt的环境,安装arm版本./configure的参数比较多,可以根据自己的需要进行选择,通过./configure–help查看自己需要添加的参数

echo yes | ./configure-opensource -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -no-qt3support-prefix /usr/local/Trolltech/QtEmbedded-4.7.3-arm-fast -no-webkit -qt-sql-sqlite -little-endian -no-libtiff -no-libmng-qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -optimized-qmake -no-nis-no-separate-debug-info -no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb-no-mouse-qvfb -no-mouse-linuxtp -qt-mouse-pc -qt-mouse-tslib -I /usr/local/tslib/include-L /usr/local/tslib/lib

接下来开始编译,注意./configure完成后系统会提示你用”make”还是”gmake”编译

make/gmake

安装Qt 4,这里Qt4的安装路径是/usr/local/Trolltech/QtEmbedded-4.7.3-arm

make install/gmake install

配置时出现错误:

project.o: Relocations in generic ELF (EM: 3)
project.o: could not read symbols: File in wrong format

是因为编译器不一致,重新配置会成功。此错误出现在make时,可执行make clean -w清除不匹配部分

不能直接将编译后的库拷贝到windows下

用nfs将编译好的库(qt下的lib和tslib下所以文件)拷贝到开发板上,注意qt下库的路径,必须与宿主机一致,否则事例程序都通不过。(tslib可任意位置但必须与配置一致)

修改/etc/init.d/rcS文件:

exportQTDIR=/usr/local/Trolltech/QtEmbedded-4.7.3-arm

exportQWS_MOUSE_PROTO="Tslib:/dev/input/event1"

export T_ROOT=/usr/tslib

exportLD_LIBRARY_PATH=$T_ROOT/lib:$QTDIR/lib

exportTSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

exportTSLIB_TSDEVICE=/dev/input/event1

exportTSLIB_CALIBFILE=/etc/pointercal

exportTSLIB_CONFFILE=$T_ROOT/etc/ts.conf

exportTSLIB_PLUGINDIR=$T_ROOT/lib/ts

如果遇到可执行tslib的配置程序,但执行qt下的程序触摸无反应,最大的可能是配置文件有问题,请仔细检查


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值