当前位置:首页 >> 信息与通信 >>

qt-extended4.4.3编译


移植 qtopia4 手机版(qt-extended4.4.3)到 mini2440 的详细过程。。。。。 。。。。 成功移植 qtopia4.4.3 手机版到 mini2440 上 首先说明:qtopia4 是不能在源码目录中编译安装的,可以用 configure—help 查看。X86 版 和 ARM 版 能 不 能 使 用 同 一 个 源 码 包 ( 不 用 解 压 源 码

包 qt-extended-opensource-src-4.4.3.tar.gz 分别更名命*-src-x86 和*-src-arm,只使用一 个*-src 即可?)这个没试过,应该是可以的,你们可以试试。我使用的分别解压到不同目 录分别更名命*-src 和*-src-arm (1)准备源码: qt-extended-opensource-src-4.4.3.tar.gz tslib-1.4.1.tar.bz2 (2)开发环境: Fedora9—linux-2.6.25 arm-linux-gcc-4.3.2.tgz (3) 先安装 x86 的 qtopia 手机版运行看看效果先: 1.)解压源码 qt-extended-opensource-src-4.4.3.tar.gz 到 qtopia4 目录中 2)创建目录 build 和 target [root@abilly qtopia4]# ls build target qt-extended-4.4.3-src 3)设置环境变量 [root@abilly qtopia4]# export QPEDIR=/home/abilly/qtopia4/build [root@abilly qtopia4]# export QTOPIA_DEPOT_PATH =/home/abilly/qtopia4/qt-extended-4.4.3-src [root@abilly qtopia4]# echo $QPEDIR /home/abilly/qtopia4/build [root@abilly qtopia4]# echo $QTOPIA_DEPOT_PATH /home/abilly/qtopia4/qt-extended-4.4.3-src 4)配置与编译,安装与运行 配置前可以到 qt-extended-4.4.3 下运行/configure –help 看看选项说明 [root@abilly qt-extended-4.4.3]# ./configure --help 。。。。 。。。 然后配置如下:进入 build 目录 [root@abilly build]# ../qt-extended-4.4.3-src/configure -build-qt -image /home/abilly/qtopia4/target -prefix /home/abilly/qtopia4/target ……(约 2 个半小时后) Qt Extended has been configured. You can build Qt Extended by running bin/qbuild. If you run bin/qbuild image, this will setup a runnable image in /home/abilly/qtopia4/target. As configured, Qt Extended MUST be run from /home/abilly/qtopia4/target. If this is not where you intend to run Qt Extended from you should set the location by running configure -prefix /opt/Qtopia. You have new mail in /var/spool/mail/root

配置成功 编译: [root@abilly build]# bin/qbuild ……(约 5 个小时后) Qt Extended has been built. You must now install Qt Extended by running 'bin/qbuild image'. This will put the files required to run Qt Extended into the image: /home/abilly/qtopia4/target Before you can use the SDK you must finalize it by running 'bin/qbuild sdk'. This will put the required files into the SDK: /home/abilly/qtopia4/build/sdk 安装: [root@abilly build]# bin/qbuild image 。。。(约 30 分钟后) 。。 Qt Extended has been installed. The files required to run Qt Extended are in the image: /home/abilly/qtopia4/target Please note that Qt Extended cannot be moved. It must be run from the image. 编译开发包,怎么使用这个开发自己的应用程序有待研究。。 。 [root@abilly build]# bin/qbuild sdk (10 多分钟即可) Finalizing the SDK /home/abilly/qtopia4/qt-extended-4.4.3-src/src/build/bin/sdkcache /home/abilly/qtopia4/build/sdk WARNING: Your perl has a bug with output and UTF-8 WARNING: sdkcache will attempt to work around the bug by changing your LANG variable from zh_CN.UTF-8 to zh_CN. The SDK has been finalized. It can now be deployed to another computer. Note that you should run configure before building again. 运行: [root@abilly build]# bin/runqtopia 在运行:结果如图:? (4)编译安装 qtopia4 到 mini2440

1.)解压源码 qt-extended-opensource-src-4.4.3.tar.gz 到 qtopia4_arm 目录中 2)创建目录 build_arm 和 target-arm [root@abilly qtopia4_arm]# ls Build_arm target-arm qt-extended-4.4.3-src-arm 3)设置环境变量 [root@abilly qtopia4_arm]# export QPEDIR=/home/abilly/qtopia4_arm/build_arm [root@abilly qtopia4_arm]# export QTOPIA_DEPOT_PATH =/home/abilly/qtopia4_arm/qt-extended-4.4.3-src-arm [root@abilly qtopia4_arm]# echo $QPEDIR /home/abilly/qtopia4_arm/build_arm [root@abilly qtopia4_arm]# echo $QTOPIA_DEPOT_PATH /home/abilly/qtopia4_arm/qt-extended-4.4.3-src-arm 4)编译安装 tslib 5)配置与编译,安装 配置: 进入 build_arm 目录: [root@abilly build-arm]#../qt-extended-4.4.3-src-arm/configure -verbose -release -image /home/abilly/qtopia4_arm/target-arm -prefix /home/abilly/qtopia4_arm/target-arm -no-pkg-config??-no-dbus -xplatform linux-arm-g++ -arch arm -displaysizes 240x320 -build-qt -qtopia-sqlite -v4l2 -remove-module modem??-remove-module Bluetooth -remove-module drm -remove-module infrared -extra-qt-embedded-config "-xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -shared -little-endian -webkit -qt-kbd-usb -qt-libpng -qt-libjpeg -qt-gif -depths 4,8,16,32 -qt-mouse-tslib -I/home/abilly/mytslib/include -L/home/abilly/mytslib/lib" 。。。。 个半小时后) 。。。(2 Qt Extended has been configured. You can build Qt Extended by running bin/qbuild. If you run bin/qbuild image, this will setup a runnable image in /home/abilly/qtopia4_arm/target-arm. As configured, Qt Extended MUST be run from /home/abilly/qtopia4_arm/target-arm. If this is not where you intend to run Qt Extended from you should set the location by running configure -prefix /opt/Qtopia.

编译: [root@abilly build-arm]# bin/qbuild (5 个小时后: ) 。。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。。。。。。 Qt Extended has been built.

You must now install Qt Extended by running 'bin/qbuild image'. This will put the files required to run Qt Extended into the image: /home/abilly/qtopia4_arm/target-arm Before you can use the SDK you must finalize it by running 'bin/qbuild sdk'. This will put the required files into the SDK: /home/abilly/qtopia4_arm/build-arm/sdk

安装: [root@abilly build-arm]# bin/qbuild image Removing /home/abilly/qtopia4_arm/target-arm (半个小时后) 。。。。。。。。。。。 。。。。。。。。。。。 Qt Extended has been installed. The files required to run Qt Extended are in the image: /home/abilly/qtopia4_arm/target-arm Please note that Qt Extended cannot be moved. It must be run from the image. [root@abilly build-arm]# [root@abilly build-arm]# bin/qbuild sdk Finalizing the SDK /home/abilly/qtopia4_arm/qt-extended-4.4.3-src-arm/src/build/bin/sdkcache /home/abilly/qtopia4_arm/build-arm/sdk WARNING: Your perl has a bug with output and UTF-8 WARNING: sdkcache will attempt to work around the bug by changing your LANG variable from zh_CN.UTF-8 to zh_CN. The SDK has been finalized. It can now be deployed to another computer. Note that you should run configure before building again. 6)移植到 mini2440 下,NFS 挂载 在 root_qtopia 文件系统的 home 目录下录建立: /home/abilly/qtopia4_arm (这是因为在配置的时候使用了-prefix /home/abilly/qtopia4_arm/target-arm 目录必须 一致) 拷贝主机的/home/abilly/qtopia4_arm/target-arm 到 开发板的 root_qtopia 下的/home/abilly/qtopia4_arm

设置 qtopia4 运行的环境变量,脚本/bin/qtopia4 内容如下: #!/bin/sh export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=/usr/local/etc/ts.conf export TSLIB_PLUGINDIR=/usr/local/lib/ts export TSLIB_CALIBFILE=/etc/pointercal export QPEDIR=/home/abilly/qtopia4_arm/target-arm export PATH=$QPEDIR/bin:$PATH export LD_LIBRARY_PATH=$QPEDIR/lib:/usr/local/lib:$LD_LIBRARY_PATH export QWS_SIZE=240x320 export HOME=/home/abilly/qtopia4_arm export export export export export export QWS_DISPLAY="LinuxFB:/dev/fb0" QWS_DISPLAY="LinuxFB:mmWidth130:mmHeight100:0" QWS_KEYBOARD=TTY:/dev/tty1 QWS_MOUSE_PROTO="TSLIB:/dev/input/event0" QT_PLUGIN_PATH=$QPEDIR/plugins/ QT_QWS_FONTDIR=$QPEDIR/lib/fonts/

修改 rcS 运行 qtopia4 的 qpe #/bin/qtopia & #echo " " > /dev/tty1 #echo "Starting Qtopia, please waiting..." > /dev/tty1 source /bin/qtopia4 if [ -f /etc/pointercal ]; then $QPEDIR/bin/qpe -qws & else /usr/loca/bin/ts_calibrate $QPEDIR/bin/qpe -qws & FiNfs 文件系统的挂载略。 启动开发板,结果如图: 对于字体大小,图标大小,应用程序的编译与添加有待研究。

Qt-extended-4.4.3 移植 环境:VMware+Fedora14 嵌入式平台:TMS320DM365(arm926ejs) 交叉编译工具链:arm_v5t_le-gcc 源码包:qt-extended-opensource-src-4.4.3.tar.gz tslib-1.4.tar.gz 一、 搭建 TI 的编译环境 省略。 二、 移植 tslib-1.4 至 DM365 Tslib 的移植过程在文档《QT4 在 DM365 平台的移植笔记》上面做了详细介绍,这儿就不在 重复了。 三、 编译及运行 pc 版本的 Qt-extended-4.4.3 1、创建工作目录: #cd /usr/local/Trolltech #mkdir Qt-extended #cd Qt-extended #mkdir build-pc #mkdir build-arm 2 、 准 备 源 码 : 将 qt-extended-opensource-src-4.4.3.tar.gz 解 压 至 /usr/local/Trolltech/Qt-extended 目录下。 3、编译: #cd /usr/local/Trolltech/Qt-extended/build-pc #export LC_CTYPE=”en_US” #export LANG=”en_US” #export LANGUAGE=”en_US” 修 改 /usr/local/Trolltech/Qt-extended/qt-extended-4.4.3/src/libraries/qtopia 下 的 qphoneprofile.cpp 中: QPhoneProfile::Schedule::Schedule &QPhoneProfile::Schedule::operator=(const Schedule &other) 为: QPhoneProfile::Schedule &QPhoneProfile::Schedule::operator=(const Schedule &other) # echo yes | ../qt-extended-4.4.3/configure -ui-type home -release -clean -sound-system alsa -build-qt -no-sxe -no-ssl -no-v4l2 -no-vpn -no-phonon -no-libamr -mediaengines cruxus -remove-mediaengine gstreamer,helix -pictureflow -remove-module bluetooth,drm -no-dbus -no-dbusipc -add-displaysize 480x272 -extra-qt-embedded-config "-qt-freetype -no-webkit -no-dbus -qt-gfx-transformed -qt-gfx-linuxfb" -extra-qt-config "-no-webkit" #bin/qbuild #bin/qbuild image #bin/qbuild sdk 4、运行 PC 版的 Qt-extended: Qt-extended-4.4.3 自带了运行脚本,所以: #cd /usr/local/Trolltech/Qt-extended/build-pc #bin/runqtopia

四、 编译及运行 arm 版 Qt-extended-4.4.3 1、编译: #cd /usr/local/Trolltech/Qt-extended/build-arm #export LC_CTYPE=”en_US” #export LANG=”en_US” #export LANGUAGE=”en_US” # echo yes | ../qt-extended-4.4.3/configure -ui-type home – xplatform linux-arm-g++ -arch arm – prefix /usr/local/Trolltech/qtopia4 -release -clean -sound-system oss -build-qt -no-sxe -no-ssl -no-v4l2 -no-vpn -no-phonon -no-libamr -mediaengines cruxus -remove-mediaengine gstreamer,helix -pictureflow -remove-module bluetooth,drm -no-dbus -no-dbusipc -add-displaysize 480x272 -extra-qt-embedded-config "-embedded arm –xplatform qws/linux-arm-g++ -no-cups –nomake examples –nomake demos –qt-libjpeg –qt-libmng –qt-libpng -no-dbus –depths 16,32 –no-gfx-qvfb –no-gfx-vnc –no-gfx-multiscreen –qt-kbd-tty – no-kbd-usb – no-kbd-s15000 – no-kbd-yopy – no-kbd-vr41xx – no-kbd-qvfb – no-webkit – no-openssl – no-phonon – no-phonon-backend – no-nas-sound – no-exceptions -svg -qt-gfx-transformed -qt-gfx-linuxfb" -extra-qt-config "-no-webkit" #bin/qbuild #bin/qbuild image 出 现 Qt Extended has been installed. 则 编 译 安 装 成 功 。 编 译 生 成 的 文 件 在 /usr/local/Trolltech/build-arm/image 目录下。 2 、 在 嵌 入 式 平 台 ( DM365 ) 上 部 署 qt-extended : 将 /usr/local/Trolltech/Qt-extended/build-arm/image/下所有文件复制到你的嵌入式文件 系统的/usr/local/Trolltech/qtopia4 目录下。修改 etc/profile 文件: export QPEDIR=/usr/local/Trolltech/qtopia4 #For tslib export TSDIR=/usr/local/Trolltech/tslib export LD_LIBRARY_PATH=$TSDIR/lib:$QPEDIR/lib:$LD_LIBRARY_PATH export TSLIB_ROOT=$TSDIR/lib export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_PLUGINDIR=$TSDIR/lib/ts export TSLIB_CONSOLEDEVICE=none export TSLIB_CONFFILE=$TSDIR/etc/ts.conf export POINTERCAL_FILE=/etc/pointercal export TSLIB_CALIBFILE=/etc/pointercal #For Qtopia export PATH=$QPEADIR/bin:$PATH export QT_PLUGIN_PATH=$QPEDIR/plugins:$QPEDIR/qt_plugins/ export QT_QWS_FONTDIR=$QPEDIR/lib/fonts/ #export QWS_FONTDIR=$QTDIR/lib/fonts export QWS_MOUSE_PROTO="TSLIB:/dev/input/event0" export QWS_DISPLAY="LinuxFB:/dev/fb0"

export QWS_SIZE=480x272 启动设备然后,执行: #cd /usr/local/Trolltech/qtopia4/bin/qpe & 就可以看到你自己的 Qt-extended 运行效果了。

l

【目标板】ICETEK-OMAPL138-KB 【安装源】 (1) qt-extended-opensource-src-4.4.3.tar.gz http://sourceforge.net/projects/qpe/files/QPE/qtopia/qt-extended-opensource-src -4.4.3.tar.gz (2) tslib1.4.tar.gz (3) arm-none-linux-gnueabi-4.3.3 采用北京瑞泰创新自带的 arm-none-linux-gnueabi【安装步骤】 1、 qt-extended-opensource-src-4.4.3.tar.gz 解压为 2 份, 将 分别用于编译成 x86 和 arm 版 [relatimedsp@~]$ tar zxvf qt-extended-opensource-src-4.4.3.tar.gz [relatimedsp@~]$ ls qt-extended-4.4.3 [relatimedsp@~]$ cp –r qt-extended-4.4.3 qt-extended-4.4.3-x86-src [relatimedsp@~]$mv –f qt-extended-4.4.3 qt-extended-4.4.3-arm-src 2、编译 Qtopia4_x86 版 (1) 建立相关目录 [relatimedsp@~]$mkdir qtopia4_x86 [relatimedsp@~]$cd qtopia4_x86 [relatimedsp@ qtopia4_x86]$mkdir build [relatimedsp@ qtopia4_x86]$mkdir target (2) 将 qt-extended-4.4.3-x86-src 移至目录 qtopia4_x86 (3) 设置安装环境变量 export QPEDIR=/home/realtimedsp/qtopia4_x86/build export QTOPIA_DEPOT_PATH =/home/realtimedsp/qtopia4_x86/qt-extended -4.4.3-x86-src 利用类似 echo $QPEDIR 可查看环境变量是否设置成功。 (4) [relatimedsp@ qtopia4_x86]$cd build [relatimedsp@build]$ ../ qt-extended-4.4.3-x86-src /configure -build-qt -image /home /realtimedsp/qtopia4_x86/target -prefix /home/realtimedsp/qtopia4_x86/target …… Qt Extended has been configured. You can build Qt Extended by running bin/qbuild. If you run bin/qbuild image, this will setup a runnable image in /home/realtimedsp/qtopia4_x86/target. As configured, Qt Extended MUST be run from /home/realtimedsp/qtopia4_x86 /target. If this is not where you intend to run Qt Extended from you should set the location by running configure -prefix /opt/qtopia. You have new mail in /var/spool/mail/root [relatimedsp@build]$ bin/qbuild ……

Qt Extended has been built. You must now install Qt Extended by running 'bin/qbuild image'. This will put the files required to run Qt Extended into the image: /home/realtimedsp/qtopia4_x86/target Before you can use the SDK you must finalize it by running 'bin/qbuild sdk'. This will put the required files into the SDK: /home/realtimedsp/qtopia4_x86/build/sdk [relatimedsp@build]$ bin/qbuild image Removing /home/realtimedsp/qtopia4_x86/target …… Qt Extended has been installed. The files required to run Qt Extended are in the image: /home/realtimedsp/qtopia4_x86/target Please note that Qt Extended cannot be moved. It must be run from the image. [relatimedsp@build]$ bin/qbuild sdk Finalizing the SDK /home/realtimedsp/qtopia4_x86/qt-extended-4.4.3-x86-src/src/build/bin/sdkcache /home/realtimedsp/qtopia4_x86/build/sdk WARNING: Your perl has a bug with output and UTF-8 WARNING: sdkcache will attempt to work around the bug by changing your LANG variable from zh_CN.UTF-8 to zh_CN. The SDK has been finalized. It can now be deployed to another computer. (5) 运行 Qtopia4_x86 [relatimedsp@build]$ bin/runqtopia 运行结果如图 1 所示: 图 1 qtopia-x86 运行结果 3、编译 Qtopia4.4.3-arm 版 (1) 安装交叉编译工具 交叉编译工具使用自带的 arm-none-linux-gnueabi-gcc。 #gedit /root/.bashrc 编 辑 /root/.bashrc 文 件 , 在 最 后 一 行 加 入 交 叉 编 译 工 具 链 的 路 径 : export PATH=/usr/local/arm/4.3.3/bin:$PATH 使用 source /root/.bashrc 加载一下, 利用 arm-none-linux-gnueabi-gcc –v 查看是否安 装成功 (2) 安装触摸屏库 下载 tslib1.4.tar.gz,解压后: #autogen.sh $ echo " ac_cv_func_malloc_0_nonnull=yes " >arm-linux.cache $ ./configure --prefix=/home/realtimedsp/workdir/filesys/opt/tslib --host=arm-linux --target=arm-linux CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ --with-gnu-ld --cache-file=arm-linux.cache $make $sudo make install

注:filesys 为开发板文件系统目录 (3) 建立安装目录 [relatimedsp@~]$mkdir qtopia4_arm [relatimedsp@~]$cd qtopia4_arm [relatimedsp@ qtopia4_arm]$mkdir build_arm [relatimedsp@ qtopia4_arm]$mkdir target_arm [relatimedsp@ qtopia4_arm]$pwd /home/realtimedsp/qtopia4_arm 注:移植到开发板的路径必须与安装路径相同,否则在开发板上运行,会提示如下错误: root@da8xx-omapl1-evm: # ./qpe -qws ********************************************************** * ERROR: Expecting this binary to be located in * /home/realtimedsp/qtopia4_arm/target_arm/bin/qpe * but it is being run from * /opt/qtopia4_arm/target_arm/bin/qpe * * This generally indicates that you have specified the wrong * value for -prefix when configuring Qtopia. Based on the * location of this binary, you should be using a prefix of * ********************************************************** Unable to initialize task subsystem. Please check '/home/realtimedsp/qtopia4_arm/ target_arm/ /etc/Tasks.cfg' exists and its content is valid. Aborted (4) 将 qt-extended-4.4.3-arm-src 移至目录 qtopia4_arm,并做如下修改 $cd /home/realtimedsp/qtopia4_arm/qt-extended-4.4.3-src/qtopiacore/qt/mkspecs/qws/l inux-arm-g++ [relatimedsp@ linux-arm-g++]$gedit qmake.conf 利用查找/替换将 arm-linux-替换为 arm-none-linux-gnueabi(5) 设置时区信息 [relatimedsp@ qt-extended-4.4.3-arm-src] vi src/libraries/qtopia/qtimezone.cpp 将其中的/usr/share/zoneinfo 改为/home/realtimedsp/qtopia4_arm/zoneinfo 此文件夹 ( 自行设置),保存退出。 将 qt-extended-4.4.3-arm-src/etc/zoneinfo 拷贝开发板文件系统中/home /realtimedsp/workdir/filesys/home/realtimedsp/qtopia4_arm/zoneinfo (6) 导出安装环境变量 export QPEDIR=/home/realtimedsp/qtopia4_arm/build_arm export QTOPIA_DEPOT_PATH =/home/realtimedsp/qtopia4_arm /qt-extended-4.4.3-arm-src 利用类似 echo $QPEDIR 可查看环境变量是否设置成功 (7) [relatimedsp@ qtopia4_arm]$cd build_arm [relatimedsp@build_arm]$../qt-extended-4.4.3-arm-src/configure -verbose -release

-image /home/realtimedsp/qtopia4_arm/target_arm -prefix /home/realtimedsp/qtopia4_arm/target_arm -no-pkg-config -no-dbus -xplatform linux-arm-g++ -arch arm -displaysizes 480x800 -build-qt -qtopia-sqlite -v4l2 -remove-module modem -remove-module bluetooth -remove-module drm -remove-module infrared -extra-qt-embedded-config "-xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -shared -little-endian -webkit -qt-kbd-usb -qt-libpng -qt-libjpeg -qt-gif -depths 4,8,16,32 -qt-mouse-tslib -I/home/realtimedsp/workdir/filesys/opt/tslib/include -L/home/realtimedsp/workdir/filesys/opt/tslib/lib" …… Qt Extended has been configured. You can build Qt Extended by running bin/qbuild. If you run bin/qbuild image, this will setup a runnable image in /home/realtimedsp/qtopia4_arm/target_arm. As configured, Qt Extended MUST be run from/home/realtimedsp/qtopia4_arm /target_arm. If this is not where you intend to run Qt Extended from you should set the location by running configure -prefix /opt/qtopia. You have new mail in /var/spool/mail/root [relatimedsp@build_arm]$ bin/qbuild …… Qt Extended has been built. ? You must now install Qt Extended by running 'bin/qbuild image'. This will put the files required to run Qt Extended into the image: /home/realtimedsp/qtopia4_arm/target_arm Before you can use the SDK you must finalize it by running 'bin/qbuild sdk'. This will put the required files into the SDK: /home/realtimedsp/qtopia4_arm/build_arm/sdk [relatimedsp@build_arm]$ bin/qbuild image Removing /home/realtimedsp/qtopia4_arm/target_arm …… Qt Extended has been installed. The files required to run Qt Extended are in the image: /home/realtimedsp/qtopia4_arm/target_arm Please note that Qt Extended cannot be moved. It must be run from the image. 4、Qtopia4.4.3 nfs 移植挂载 (1) 文件系统 nfs 挂载 详细请参考《ICETEK-OMAPL138-KB-EZ 使用手册》nfs 部分 (2) 将/home/realtimedsp/qtopia4_arm/target_arm 复制到文件系统对应目录/home/ realtimedsp/workdir/filesys/home/realtimedsp/qtopia4_arm/target_arm,进入开发板

文件系统查看 root@da8xx-omapl1-evm: qtopia4_arm #ls target_arm zoneinfo (3) 编写环境变量脚本 root@da8xx-omapl1-evm:~#vi loadModules.sh #!/bin/sh export TSLIB_ROOT=/opt/tslib if [ -e /etc/ts-input.conf ] ; then . /etc/ts-input.conf fi true ${TSLIB_TSDEVICE:=/dev/input/event0} TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf export TSLIB_TSDEVICE export TSLIB_CONFFILE export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts export TSLIB_CONSOLEDEVICE=/dev/tty export TSLIB_FBDEVICE=/dev/fb0 # QT Extendded 4.4.3 Setting export QPEDIR=/home/realtimedsp/qtopia4_arm/target_arm export QWS_SIZE=480x800 export QWS_MOUSE_PROTO='TSLIB:/dev/input/event0' export QWS_DISPLAY='LinuxFB:/dev/fb0' export QWS_DISPLAY="Transformed:LinuxFb:mmWidth91:mmHeight53" export QT_PLUGIN_PATH=$QPEDIR/plugins/ export QT_QWS_FONTDIR=$QPEDIR/lib/fonts export LANG="en_US" export PATH=$QPEDIR/bin:$PATH export LD_LIBRARY_PATH=$QPEDIR/lib:/lib:/usr/lib:/usr/local/lib:/opt/tslib/lib:$LD_LIB RARY_PATH export HOME=/home/realtimedsp/qtopia4_arm if [ ! -e $HOME ]; then mkdir -p $HOME; fi if [ ! -e $HOME/Settings/Trolltech/qpe.conf ]; then mkdir -p $HOME/Settings/Trolltech/ cp $QPEDIR/etc/default/Trolltech/qpe.conf $HOME/Settings/Trolltech/qpe.conf -f fi export QTOPIA_PHONE_DUMMY=1

#exec $QPEDIR/bin/qpe 1>/dev/null 2>/dev/null (4) 触摸屏设置及校准 修改/home/realtimedsp/workdir/filesys/opt/tslib/etc 中 ts.conf 文件:将# module_ raw input 改为 module_raw input 注:在触摸屏校准前,务必运行 source loadModules.sh,否则会报错: ts_calibrate: error while loading shared libraries: libts-0.0.so.0: cannot open shared object file: No such file or directory 挂载文件系统后,进入/opt/tslib/bin 目录,运行 ts_calibrate root@da8xx-omapl1-evm:~# source loadModules.sh root@da8xx-omapl1-evm:~# cd /opt/tslib/bin root@da8xx-omapl1-evm:bin#./ts_ calibrate 此时触摸屏会进入校准界面,用触摸笔进行 5 点校准,校准成功后,在/opt/tslib/etc 目 录下会生成 pointercal 文件,做如下链接: root@da8xx-omapl1-evm:~#ln –s /opt/tslib/etc/pointercal /etc/pointercal (5) 运行程序 root@da8xx-omapl1-evm:qtopia4_arm#cd target_arm/bin root@da8xx-omapl1-evm:bin#ln – /home/realtimedsp/qtopia4_arm/target_arm/bin/qpe /usr/bin root@da8xx-omapl1-evm:bin#cd ~ root@da8xx-omapl1-evm:~#source loadModules.sh root@da8xx-omapl1-evm:~#qpe -qws language message - en_US loading /home/tandesir/qtopia4_arm/target_arm/i18n/en_US/qt.qm loading /home/tandesir/qtopia4_arm/target_arm/i18n/en_US/qpe.qm loading /home/tandesir/qtopia4_arm/target_arm/i18n/en_US/libqtopia.qm loading /home/tandesir/qtopia4_arm/target_arm/i18n/en_US/systemtime.qm Rejecting modal dialog: QWaitWidget access to audio mixer failed 转载请标明出处,欢迎转载,请勿用于商业目的!

s

下载 qt-extended-opensource-src-4.4.3.tar.gz 并解压到/home/work/desktop 下 并在该目录下创建目录 build #cd /home/work/desktop #tar -zxvf qt-extended-opensource-src-4.4.3.tar.gz #mkdir build #cd build 设置环境变量: #export QPEDIR=/home/work/desktop/bulid #export QTOPIA_DEPOT_PATH=/home/work/desktop/qt-extended-4.4.3 修改源码包: 裁减 Qtopia core 的库 # vi qtopiacore/qconfig-qpe.h 首先注释掉关于鼠标光标的宏定义,让程序运行时,触摸屏中央有光标出现: // Qtopia Core /* #ifndef QT_NO_QWS_CURSOR # define QT_NO_QWS_CURSOR #endif */ /* #ifndef QT_NO_QWS_MOUSE # define QT_NO_QWS_MOUSE #endif #ifndef QT_NO_QWS_MOUSE_AUTO # define QT_NO_QWS_MOUSE_AUTO #endif */ 其它宏定义根据需要进行注释。 保存后将 qconfig-qpe.h 拷贝到 global 目录。 # cp qtopiacore/qconfig-qpe.h qtopiacore/qt/src/corelib/global/qconfig-qpe.h 注释掉其他文件里的 QT_NO_QWS_CURSOR 的定义 # vi qtopiacore/qt/src/corelib/global/qfeatures.h 注释掉如下内容: /* #if !defined(QT_NO_QWS_CURSOR) && (defined(QT_NO_CURSOR)) #define QT_NO_QWS_CURSOR #endif */ 保存退出。 # vi qtopiacore/qt/src/corelib/global/qglobal.h 注释掉以下内容: //# define QT_NO_QWS_CURSOR 保存退出。

修改时区信息 # vi src/libraries/qtopia/qtimezone.cpp 将其中的/usr/share/zoneinfo 改为/home/work/desktop/zoneinfo,保存退出。 ************************ 本机编译 qt-extended **************************** #cd desktop 解压 qt-extended-opensource-src-4.4.3.tar.gz 源码 #mkdir build #../configure -qbuild-qt -image /home/work/desktop/target -prefix /home/work/desktop/target #bin/build #bin/build image //安装到了 target 目录下 编译安装完运行 #bin/runqtopia ************************* 经典编译 **************************************** #$QTOPIA_DEPOT_PATH/configure -release -image /home/work/desktop/target -prefix /home/work/desktop/target -xplatform linux-arm-g++ -arch arm -displaysizes 640x480 -build-qt -extra-qt-embedded-config "-xplatform qws/linux-arm-g++ -embedded arm -qconfig qpe -shared -little-endian -webkit -qt-kbd-usb -qt-libpng -qt-libjpeg -qt-gif -depths 4,8,16,32 -qt-mouse-tslib -I/home/work/mytslib/include -L/home/work/mytslib/lib" 2>../qtopiaconfigureERR.txt -remove-module modem -remove-module bluetooth -remove-module drm -remove-module infrared 添加上这几个参数试试 -verbose 添加出错信息 对定位错误有点用 #bin/qbuild 2>../makeQt-extendedERR.txt #bin/qbuild image 配置选项: -xplatform linux-arm-g++ -arch arm //目标平台为 arm-linux,体系结构为 arm。 -extra-qt-embedded-config //为 qt-extended 配置选项。 (-extra-qtopiacore-config // 为 Qtopia core 配置选项。 ) -xplatform qws/linux-arm-g++ -embedded arm // 目 标 平 台 编 译 配 置 文 件 使 用 qtopiacore/qt/mkspecs/qws/linux-arm-g++目录下的配置文件,嵌入式平台为 arm。 -qconfig qpe //使用配置文件 qconfig-qpe.h,若使用 qconfig-large.h 配置文件,则使 用-qconfig large 选项 -qt-mouse-tslib -I/home/work/mytslib/include -L/home/work/mytslib/lib 支持 tslib,并在后面添加上刚才编译的 tslib 的头文件和库。 2>../qtopiaconfigureERR.txt// 最 后 将 配 置 过 程 中 的 错 误 输 出 到 qtopiaconfigureERR.txt 中 ******************* device 编译 ******************************** #cd desktop 解压 qt-extended-opensource-src-4.4.3.tar.gz 源码 #mkdir build

配置修改 qt-extended-4.4.3/devices 的目录; 按照 n810 的配置创建自己所需要的环境目录,主要修改的地方、文件: 1、修改 mkspecs/qws/linux-nokia-g++/qmake.conf 文件 a、用自己的交叉编译工具替换 arm-linux-* b、将自己编译的 tslib 的目录指定到 QMAKE_LIVBS 和 QMAKE_INCLUDES 参数中 2、修改 configure.common configure.common 文件 Read for both desktop and device builds (before the other file). 按照自己的需要来裁剪参数模块 3、修改 configure: configure 配置的是 qtopia-core 的参数(Read for device builds.) a、-xplatform linux-nokia-g++ b 、 在 该 文 档 的 最 后 添 加 自 己 所 需 要 的 参 数 , 如 -extra-qt-embedded-config "-webkit -qt-kbd-usb -qt-libpng -qt-libjpeg -qt-gif" 4、修改 configure-qvfb configure-qvfb 文件 read for desktop build 按照自己的需要裁剪 5、修改 environment This script (if it exists) is sourced before re-running configure and before Makefile calls Makefile.target * a、修改主要的参数;TOOLCHAIN=* 指定自己的交叉编译工具 b、PKG_CONFIG_PREFIX 和 PKG_CONFIG_PATH 做适当的调整 ********************* #cd build #../configure -device n810 2>../configureERR.txt #bin/qbuild #bin/qbuild image


相关文章:
qt-extended4.4.3编译
(4)编译安装 qtopia4 到 mini2440 1.)解压源码 qt-extended-opensource-src-4.4.3.tar.gz 到 qtopia4_arm 目录中 2)创建目录 build_arm 和 target-arm [...
qt-extended 4.4.3终于移植成功了
qt-extended 4.4.3终于移植成功了_IT/计算机_专业资料。qt-extended 4.4.3移植...! 3、关于 tslib 在编译这之前,最好是先移植编译 tslib,并且使用相同交叉编译...
qt-extended 4.4.3implantation
2 移植 Qt Extended 4.4.3 到 mini2440 开发板 2.1 环境介绍 操作系统:fedora 9 gcc 版本 :gcc 4.3.0 交叉编译器版本:arm-linux-gcc 4.4.3 (友善之臂...
VS2012 RC 编译Qt 4.8.2完整过程
Qt5.2.1静态编译过程详解... 9页 2下载券 qt-extended4.4.3编译 17页 免费...建立环境变量 QMAKESPEC win32-msvc2010 // 注意 QTDIR S:\QT\4.8.2 // ...
QTE4.4.3编译文档
QTE4.4.3编译文档_IT/计算机_专业资料。详细介绍了Qt Extended 4.4.3运行环境和编译环境的搭建(1)准备源码: qt-extended-opensource-src-4.4.3.tar.gz tslib-1....
Qtopia4.4.3桌面应用开发步骤
6、在 qt-extended-4.4.3编译应用程序,进入到 /witch/buiddir/src/application/HelloQt4 目录下执 行 /witch/buiddir/bin/qbuild image 命令,编译完之后,...
Qt5.5.1编译说明
3.编译,键入 nmake. nmake [注意]If you later need to reconfigure and rebuild Qt from the same location, ensure th at all traces of the previous ...
Ubuntu下嵌入式Qt开发环境配置全攻略
6. 编译 x86-qtopia-4.4.3 解压 x86-qt-extended-4.4.3 压缩包,进入解压目录,首先执 行命令: tar xzf qt-extended-opensource-src-4.4.3.tar.gz 将源码...
Qt学习(六) VS2013编译Qt5.3.1的静态库
Qt学习(六) VS2013编译Qt5.3.1的静态库_计算机软件及应用_IT/计算机_专业...qt-extended4.4.3编译 17页 免费 win7下Qt5.4.0静态编译 22页 免费 Qt...
基于Linux嵌入式开发板的Qt的移植与应用
基于Linux嵌入式开发板的Qt的移植与应用_工学_高等教育_教育专区。本设计采用...11 2.4 配置,编译,安装 Qt-Extended-4.4.3 ...12 2.4.1 配置 Qt-Extended...
更多相关标签:
移植qt extended4.4.3 | 交叉编译器4.4.3下载 | 树莓派3 qt5交叉编译 | linux下编译qt4.5.3 | qt 3 编译 | qt5.3编译优化 | qt 2.3.7 嵌入式编译 | 树莓派3交叉编译qt |