分类: LINUX
2011-05-10 11:22:02
环境: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至DM365Tslib的移植过程在文档《QT4在DM365平台的移植笔记》上面做了详细介绍,这儿就不在重复了。
三、 编译及运行pc版本的Qt-extended-4.4.31、创建工作目录:
#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.31、编译:
#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运行效果了。