加入收藏 | 设为首页 | 会员中心 | 我要投稿 南通站长网 (https://www.0513zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

Qtopia4.2.5移植及按键驱动的调试概括

发布时间:2021-11-25 21:37:13 所属栏目:教程 来源:互联网
导读:(1)编译 qtopia Tar zxvf qtopia-opensource-src-4.2.5-snapshot-20070915 Mv qtopia-opensource-src-4.2.5-snapshot-20070915 qtopia-opensource-src-4.2.5 Cd qtopia-opensource-src-4.2.5( 因为我的编译器不是 arm-none-linux-gnueabi 的,所以我在编译
(1)编译 qtopia
 
Tar zxvf qtopia-opensource-src-4.2.5-snapshot-20070915
 
Mv qtopia-opensource-src-4.2.5-snapshot-20070915 qtopia-opensource-src-4.2.5
 
Cd qtopia-opensource-src-4.2.5( 因为我的编译器不是 arm-none-linux-gnueabi 的,所以我在编译的时候要修改编译器 )
 
修改编译器在这些文件中,我是自己 find 出来的,可能不完全正确,但是我编译运行时没有问题的,如果需要自己修改编译器可以自己查找一下
 
find ./ -name "*" | xargs grep 'arm-linux-', 然后分析哪些文件需要修改,一般是 qtopia,qtopiacore, 和一些 tools 。我需要修改的文件是
 
./qtopia-opensource-src-4.2.5/devices/greenphone/mkspecs/qws/linux-greenphone-g++/qmake.conf         ( qtopia 的配置文件)
 
./qtopia-opensource-src-4.2.5/devices/greenphone/rootfs/wpa_supplicant/config
 
./qtopia-opensource-src-4.2.5/devices/greenphone/rootfs/ilib/cross-compile.patch
 
./qtopia-opensource-src-4.2.5/src/3rdparty/libraries/helix/trolltech/src/build/umakecf/linux-2.2-libc6-armv5te-cross-gcc3.3-iwmmxt-vfp.cf
 
./qtopia-opensource-src-4.2.5/src/3rdparty/libraries/helix/trolltech/src/build/umakecf/linux-2.2-libc6-arm9-cross-gcc4.cf
 
./qtopia-opensource-src-4.2.5-snapshot-20070908/src/3rdparty/libraries/helix/trolltech/src/build/umakecf/linux-2.2-libc6-xscale-cross-gcc32.cf
 
./qtopia-opensource-src-4.2.5-snapshot-20070908/qtopiacore/qt/mkspecs/qws/linux-arm-g++/qmake.conf       ( qtopiacore 的配置)
 
将里面的 arm-linux- 全部换成我自己编译器 arm-none-linux-gnueabi-
 
qtopia4 不能直接在目录中进行 config ,我们需要新建一个目录来进行 config
 
mkdir ../build
 
cd ../build
 
../qtopia-opensource-src-4.2.5/configure -debug -image /opt/qtopia4 -prefix /opt/qtopia4 -xplatform linux-arm-g++ -arch arm -no-qvfb -displaysize 640x480 -no-modem -quicklaunch -no-bluetooth -no-drm -no-infrared -extra-qtopiacore-config "-qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg" -extra-qtopiacore-config "-debug -xplatform qws/linux-arm-g++ -embedded arm -opengl -qconfig qpe -qt-sql-sqlite -depths 4,8,16,32 -qt-kbd-vr41xx -qt-mouse-linuxtp -no-mouse-pc -no-mouse-bus -no-mouse-yopy -no-mouse-tslib -no-mouse-qvfb"
 
配置选项可以根据自己的需要进行裁剪
 
出现问题:
 
(1) The system byte order could not be detected!
Turn on verbose messaging (-v) to see the final report.You can use the -little-endian or -big-endian switch to
 
解决办法:这个是配置大段或者小端模式,自己在配置选项中加上后还是一样的效果,所以干脆在配置文件中添加
 
                        Vi vi qtopiacore/qt/configure
 
CFG_ENDIAN=Q_LITTLE_ENDIAN (默认是 auto 。也可以改为 Q_BIG_ENDIAN( 大端模式 ) )
 
(2) 出现 linux-cunstom-arm-g++.h file not found 的错误,这个错误在编译 qtopia2.2 的时候也出现过
 
解决办法: cp src/libraries/qtopiabase/custom-linux-cassiopeia-g++.cpp src/libraries/qtopiabase/custom-linux-arm-g++.cpp
 
                   cp src/libraries/qtopiabase/custom-linux-cassiopeia-g++.h src/libraries/qtopiabase/custom-linux-arm-g++.h
 
                   配置 Qtopia ok
 
                   编译: make && make install
 
                   编译的时候出现一个错误, asm/page.h not found , 其实在 qtopia4.2.5 中没有用到这个头文件,我们只需要注释掉就可以了
 
                   继续 make && make install 完成,编译完后再 /opt/Qtopia 生成了我们的目标文件
 
        
 
         修改按键功能(仅供参考):
 
                   经常我们的按键是自己设计的 GPIO 按键,因此是没有办法直接工作的,我们需要修改 qtopia 按键操作源码。
 
                   Qtopia4 按键操作源码在 qtopiacore/qt/src/gui/embedded/ 提供,提供各种鼠标按键操作。
 
                   我在配置的时候设置按键为 -qt-kbd-vr41xx ,因此对 qkbdvr41xx_qws.cpp 进行修改,主要是参照键盘测试程序进行修改
 
                   一般需要修改的地方是设备打开,读取哪些操作,直接上代码:

(编辑:南通站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读