移植Qtopia4到S3C2440

来源:互联网 发布:国内外电视直播软件apk 编辑:程序博客网 时间:2024/04/30 18:47

 

准备工作:有arm-linux-gcc arm-linux-g++ ,并且环境变量的问题已经解决。就是可以直接在命令行使用这两个命令了。

据说4.3.3起来之后触屏是反向的。
4.2.1qmountlinxutp_qws.hqmouselinuxtp_qws.cpp替代4.3.3
./configure –embedded arm –prefix /tmp/qtopia –xplatform qws/arm-linux-g++ -silent –release –qt-mouse-linuxtp
PC机上编译QtopiaCore4.3.3
Make
Make install
然后mount上去之后
添加环境变量setenv

export set QTOPIA=/tmp/qtopia
#export set QWS_KEYBOARD="USB:/dev/input/event1"
export set QWS_MOUSE_PROTO="linuxtp:/dev/h3600_tsraw"
export QWS_DISPLAY="LinuxFb:mmWidth35:mmHeight45:0"
export set LD_LIBRARY_PATH=$QTOPIA/lib:$LD_LIBRARY_PATH
export set PATH=$QTOPIA/bin: $PATH

 
 
然后

[root@(none) calculator]# ./calculator -qws
Could not read calibration: "/etc/pointercal"
Cannot open /dev/h3600_tsraw (No such file or directory)

  
1.使用原来的系统启动,将pointercal保存下来
2.查看h3600_tsraw为软链接h3600_tsraw -> /dev/touchscreen/0raw
       而在touchscreen目录下只有0     /dev/ts -> /dev/touchscreen/0
可能对于不同的屏幕不一样吧,YL的板子是这个,所以这样试了一下,OK!
export set QWS_MOUSE_PROTO="linuxtp:/dev/ts"
 
测试qtopia的应用程序。在example目录下有一些编译好的程序,比如
Calculater, 进入目录 ./calculater –qws
OK
但是qtopiaCore只是提供了一个库。
 
接下来,移植qtopia-opensource-4.2.1
这是参考了一个别人的configure命令,后来发现其实多了sql,我本不想加上的。后来也懒得重新花上一个小时来编译了。

./configure -silent -release -image /tmp/qte -prefix /tmp/qte -xplatform linux-arm-g++ -arch arm -no-qvfb -displaysize 240x320 -no-modem -quicklaunch -no-bluetooth -no-drm -no-infrared -extra-qt-config "-qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg" -extra-qtopiacore-config "-release -xplatform qws/linux-arm-g++ -embedded arm -opengl -qconfig qpe -qt-sql-sqlite -depths 4,8,16,32 -qt-mouse-linuxtp -no-mouse-pc -no-mouse-bus -no-mouse-yopy -no-mouse-vr41xx -no-mouse-tslib -no-mouse-qvfb" 2
到最后报错

ERROR: You must provide custom files in the following locations:
   /usr/local/src/qtopia-opensource-4.2.1/src/libraries/qtopiabase/custom-linux-arm-g++.h
   /usr/local/src/qtopia-opensource-4.2.1/src/libraries/qtopiabase/custom-linux-arm-g++.cpp
 
修改源码包

cd src/libraries/qtopiabase
# cp custom-linux-cassiopeia-g++.h custom-linux-arm-g++.h
# cp custom-linux-cassiopeia-g++.cpp custom-linux-arm-g++.cpp

 
重新执行上面的configure
执行完毕出现以下提示,OK
Qtopia has been configured. You can build Qtopia by running make.
 
After building, you MUST run make install, which will setup a runnable image in
/tmp/qte. You can override this by running make install IMAGE=/other/location.
 
As configured, Qtopia MUST be run from /tmp/qte. If this is not where you
intend to run Qtopia from you should set the location by running configure
-prefix /opt/Qtopia.
执行make
等待一个小时……
OK
Make install
安装到/tmp/qte
设置为这样的目录是为了和板子上挂载上去之后兼容路径,否则路径会有些麻烦。
写上一个启动qtopia4.2的脚本,相关的环境变量设置好了之后启动之
 

#!/bin/sh
export set QTOPIA=/tmp/qte
#export set QWS_KEYBOARD="USB:/dev/input/event1"
export set QWS_MOUSE_PROTO="linuxtp:/dev/ts"
export QWS_DISPLAY="LinuxFb:mmWidth30:mmHeight40:0"
export set LD_LIBRARY_PATH=$QTOPIA/lib
export set PATH=$QTOPIA/bin:$PATH
$QTOPIA/bin/qpe &

  
执行这个脚本,等上几秒钟,出现令人兴奋的界面
然而
终端提示     [root@(none) qte]# libpng error: Read Error
板子内存不足,界面提示 “out of storage space”
不过没有问题,可以正常使用了!
 
 
原创粉丝点击