主题 : qt-embedded-free-3.3.8在s3c2410开发板上的移植问题? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 23048
精华: 0
发帖: 25
金钱: 125 两
威望: 25 点
贡献值: 0 点
综合积分: 50 分
注册时间: 2010-06-11
最后登录: 2011-03-16
楼主  发表于: 2010-09-01 10:20

 qt-embedded-free-3.3.8在s3c2410开发板上的移植问题?

最近在2410开发板上移植qt-embedded-3.3.8,交叉编译步骤如下:
arm-linux-cross-2.95.3.tar.bz2在/usr/local/arm/2.95.3已装好,并且环境变量也配置好!
第一步.
tar jxvf qt-x11-free-3.3.8.tar.bz2
mv qt-x11-free-3.3.8 qtx11
cd qtx11
export QTDIR=$PWD
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
. /configure  
make
make -C tools/qvfb
mv tools/qvfb/qvfb bin

第二步
tar jxvf qt-embedded-free-3.3.8.tar.bz2
mv qt-embedded-free-3.3.8 qtarm
注意:把第一步qtx11/bin下交叉编译生成的moc、uic和qvfb拷贝到qtarm/bin下。

第三步  
环境变量的设置
export QTDIR=/home/renyc/Trolltech/qtarm
export QTEDIR=$QTDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export PATH=$PATH:/usr/local/2.95.3/bin
. /configure -embedded arm xplatform qws/linux-arm-g++ -debug –qt-gif –qt-zlib -no-cups -thread –stl -qt-sql-sqlite -ipv6 -depths 16,24,32 -qt-mouse-usb -qt-kbd-key –qt-kbd-usb –qt-gfx-qvfb -qvfb –qt-libpng –qconfig qpe
配置顺利通过,然后
Make
Make install
编译顺利通过,下面是移植到开发板,一下都是在开发板上操作:
在开发板opt下:
cd opt
mkdir qt
新建一个目录,/qt/lib。进入此目录 cd /qt/lib
b. 通过NFS,把生成的库文件 libqte-mt.so.3.3.8 拷贝到/qt/lib 下
c. 建立链接
ln -s libqte-mt.so.3.3.8 libqte-mt.so
ln -s libqte-mt.so.3.3.8 libqte-mt.so.3
ln -s libqte-mt.so.3.3.8 libqte-mt.so.3.3
d. 建立环境变量
vi ~/.bashrc
在后面加上
export QTDIR=/opt/qt
export QTEDIR=$QTDIR
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export PATH=$PATH:/qt/bin
export LANG=zh_CN
使环境变量生效(重启或者source命令)
e. 通过NFS,从目录qt-embedded-free-3.3.8/examples下面考几个示例程序到 /qt目录下
比如aclock,
执行 #./aclock -qws
但提示:Error:./aclock: error while loading shared libraries: cannot load shared object file: No such file or directory."也没有提示加载哪个库失败,不清楚是哪个库没加载,我把2.95.3/arm-linux/lib下的库都拷到开发板的/lib下还是出现同样的提示,我的板子原来装的是qt-embedded-2.3.7+qtopia-1.7.0,原来的程序都可以正常运行,请那位打个帮帮忙,给指点一下,谢谢!
还有个问题就是qt-embedded-3.3.8的程序可以独立在开发板上运行吗?还是必须借助于qtopia运行?谢谢
[ 此帖被kasim在2010-09-01 15:13重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-09-01 12:38
但提示:Error:./aclock: error while loading shared libraries: cannot load shared object file: No such file or directory."也没有提示加载哪个库失败,不清楚是哪个库没加载,我把2.95.3/arm-linux/lib下的库都拷到开发板的/lib下还是出现同样的提示,我的板子原来装的是qt-embedded-2.3.7+qtopia-1.7.0,原来的程序都可以正常运行,请那位打个帮帮忙,给指点一下,谢谢!

你可以在PC上用“arm-linux-readelf -d /path/to/aclock |grep NEEDED"来查看aclock运行所依赖的共享库。

还有个问题就是qt-embedded-3.3.8的程序可以独立在开发板上运行吗?还是必须借助于qtopia运行?谢谢

可以,除非aclock用到了qtopia的东西。事实上,qtopia和一般的qte应用程序一样,都是依赖于qte的应用程序。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2010-09-01 15:13
恭喜,贴几张图出来看看吧:)
论坛上关于QT应用程序的讨论还太少了,希望你能多分享一些经验。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-09-01 15:53
cannot  open keyboard

我想这句话的意思是qt embeded无法处理指定给它的keyboard设备。一般来说,qt embedded支持TTY(console)和USB以及其他一些特定类型的keyboard。详细信息参考http://doc.trolltech.com/4.1/qtopiacore-charinput.html

如果我没理解错的话,友善之臂提供的2.6.32.2内核里的keyboard驱动是不支持的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2010-09-01 17:42
一种是:  
         ./configure  -qt-kbd-usb

我不确定这个参数的意义,你可以看./configure --help的说明

另一种是:
    export QWS_KEYBOARD=usb:/dev/usb设备
是这样的吗?
如果是这样,那QWS_KEYBOEARD在程序运行的时候配置吗?

是的,QWS_KEYBOARD用来在run time指定keyboard的类型。

但是我在编译qt-embedded的时候是这样加键盘驱动的: -qt-kbd-usb -qt-kbd-key
这两句话的意思是支持usb驱动的吧,不知道为什么会出现 cannot  open keyboard的情况?

也许你需要在代码里跟踪一下打印"cannot  open keyboard"这个错误信息的地方,看看是什么造成的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-09-02 10:19

 回 9楼(自语的骆驼) 的帖子

可以加在文件系统启动加载的脚本里(/etc/init.d/rcS?)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."