您的位置:首页 > 编程语言 > Qt开发

基于JZ2440的QT4移植

2016-04-14 10:10 746 查看
开发环境:

Linux操作系统:Ubuntu9.10

开发板:JZ2440

QT/E版本:qt4.6.3

交叉编译工具:arm-linux-gcc-3.4.5-glibc-2.3.6

1、移植用于触摸屏校正的tslib1.4

#tar xzvf tslib-1.4.tar.gz

#./autogen.sh

#./configure--prefix=/usr/local/tslib/ --host=arm-linux ac_cv_func_malloc_0_nonnull=yes

#make

#make install

将安装目录下的tslib文件夹复制到目标板根文件系统的/opt下

2、QT/E4.6.3移植

将qt-everywhere-opensource-src-4.6.3.tar.gz复制到自己的文件夹下,解压缩:#tar zxvf qt-everywhere-opensource-src-4.6.3.tar.gz,进入解压缩后的文件夹下。修改文件夹下src/3rdparty/freetype/include/freetype/config/ftconfig.h,将第330行修改为:"orr %0, %0,%2, lsl
#16\n\t" /* %0 |= %2 << 16 */。

#./configure-prefix /usr/local/qte-arm -debug-and-release -qt-zlib -qt-libtiff -qt-libpng-qt-libmng -qt-libjpeg -make libs -nomake examples -nomake demos -nomake docs-no-cups -iconv -xplatform qws/linux-arm-g++ -embedded arm -little-endian-qt-freetype -depths
8,16,24,32 -qt-gfx-linuxfb -no-gfx-transformed-no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-dbus -qt-sql-sqlite-qt-kbd-qvfb -qt-kbd-tty -qt-mouse-tslib -no-glib -I/usr/local/tslib/include-L/usr/local/tslib/lib -D__ARM_ARCH_5TEJ__

#make

#make install

该库文件便是将要移植到目标板上的QT库。

3、将/usr/local/qte-arm拷贝到开发板/opt目录下

我的方法是先

#mount -t nfs -o nolock,rsize=1024,wsize=1024 192.168.1.129:/work /mnt/

cp -rf /mnt /opt



为支持触摸屏,开机自动设置环境变量,在2440的 /bin/qpe.sh中追加:


ExportLD_LIBRARY_PATH=/opt/qt-arm/lib:$QTDIR/lib:$LD_LIBRARY_PATH


export TSLIB_ROOT=/opt/qt-arm/lib


export TSLIB_TSDEVICE=/dev/event0


export TSLIB_FBDEVICE=/dev/fb0


export TSLIB_PLUGINDIR=/opt/qt-arm/lib /ts


export TSLIB_CONSOLEDEVICE=none


exportTSLIB_CONFFILE=/opt/tslib/etc/ts.conf


exportPOINTERCAL_FILE=/opt/tslib/etc/pointercal


exportTSLIB_CALIBFILE=/opt/tslib/etc/pointercal


export QWS_MOUSE_PROTO=Tslib:/dev/event0


Export QT_QWS_FONTDIR=/opt/qt-arm/lib/fonts


取消/opt/tslib/etc/ts.conf中的第一个注释:


# module_raw input (去掉#,并且该行顶格)


重启开发板,至此完成移植。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: