Chinaunix首页 | 论坛 | 博客
  • 博客访问: 647780
  • 博文数量: 156
  • 博客积分: 4833
  • 博客等级: 上校
  • 技术积分: 1554
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-21 19:36
文章分类

全部博文(156)

文章存档

2016年(2)

2013年(1)

2012年(13)

2011年(30)

2010年(46)

2009年(29)

2008年(23)

2007年(12)

分类: LINUX

2009-03-05 19:59:49

基于mini2440:

gcc :/gcc-3.4.5-glibc-2.3.6/基于 crosstool arm-softfloat制作
uboot:采用原来版本修改march-type
kernel未作修改.
rootfs:重新制作,基于busybox-1.13.2
qtopia:4.3.3:qtopia-opensource-src-4.3.3.tar.gz
tslib:tslib-07072006.tar.bz2

qtopia配置
另建build目录:
配置:
../qtopia-opensource-4.3.3/configure -release -image /usr/local/qtopia -prefix /opt/local/qtopia -xplatform linux-arm-g++ -arch arm -no-qvfb  -no-modem -extra-qtopiacore-config "-release -xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -depths 4,8,16,32 "

//加校准(不好用)
//qt自我校准方向错误
../qtopia-opensource-4.3.3/configure -release -image /usr/local/qtopia -prefix /opt/local/qtopia -xplatform linux-arm-g++ -arch arm -no-qvfb  -no-modem -extra-qtopiacore-config "-qt-mouse-linuxtp -release -xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -depths 4,8,16,32 "

//加tslib校准(先编译tslib --tslib-07072006.tar.bz2)
//目标板也要安装tslib库!
//最终使用配置
../qtopia-opensource-4.3.3/configure -release -image /usr/local/qtopia -prefix /opt/local/qtopia -xplatform linux-arm-g++ -arch arm -no-qvfb  -no-modem -extra-qtopiacore-config "-qt-mouse-tslib -I/opt/tslib1.4-install/include -L/opt/tslib1.4-install/lib -qt-mouse-linuxtp -release -xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -depths 4,8,16,32 "


//install 到 /usr/local/qtopia
//目标板 安装到 /opt/local/qtopia

编译器 修改 qtopia-opensource-4.3.3/qtopiacore/qt/mkspecs/qws/linux-arm-g++/qmake.conf
添加校准
QMAKE_CXX        = arm-softfloat-linux-gnu-g++ -DQT_QWS_IPAQ

  1. -prefix -image -sdk三个路径理解


在配置qtopia-4.3.2时,理解configure -image /opt/qtopia/target -prefix /opt/qtopia/target -sdk /opt/qtopia/sdk/4.3.2/qq2440三个路径非常重要。查看源码doc/下的文档,-image指定了在交叉编译的主机上存放将来要nfs挂载或者烧到开发板上去所有文件的目录,-prefix指定了qtopia编译出来的qpe在运行目录,也就是要把-image目录下的所有东西挂载或者考到开发板上的-prefix目录才能正常运行,注意,这个-prefix已经硬编码到了程序中,不可以改变。另一个-SDK目录,指定了主机上用于开发qtopia应用所必须的工具链和库的一个基准路径,就是说,指定了这个目录,运行-SDK下的qmake或者qtopiamake,就不用自己设置系统的环境变量中包含其他的库了。如果只设置了-prefix目录,那么默认的-image也是,-SDK默认的是编译build的目录。此build目录不能为源码目录,应该在其他新建的目录中运行源码包中的configure配置脚本。




qtopia启动脚本

#!/bin/sh
export T_ROOT=/opt/tslib1.4-install
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/opt/tslib1.4-install/lib/ts
export LD_LIBRARY_PATH=/opt/tslib1.4-install/lib:$LD_LIBRARY_PATH
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONSOLEDEVICE=none
export QWS_SW_CURSOR
export set HOME=/root
export set QPEDIR=/opt/local/qtopia
export set QWS_KEYBOARD="TTY:/dev/tty1"
export QWS_MOUSE_PROTO="Tslib:/dev/input/event0"
export QWS_DISPLAY="LinuxFb:mmWidth35:mmHeight45:0"
export QWS_SIZE=240x320
exec $QPEDIR/bin/qpe

ts.conf:
module_raw input


tslib测试
ts_test验证坐标准确度。

参考效果:
http://blog.chinaunix.net/u1/39383/showphoto_146115.html
http://blog.chinaunix.net/u1/39383/showphoto_146114.html

参考
http://123linhe.blog.163.com/blog/static/214891520081027112113252/

待业中,打发时间......
阅读(1171) | 评论(0) | 转发(0) |
0

上一篇:cross compile gdb

下一篇:2440 qtopia zz

给主人留下些什么吧!~~