基于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目录下
我的方法是先
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 (去掉#,并且该行顶格)
重启开发板,至此完成移植。
相关文章推荐
- Qt进程QProcess相关
- QT 多线程程序设计
- QTAddMin安装失败
- qt常用数据类型转换
- Qt 消息基础相关_03
- Qt中关于中文字符编码问题
- MSYS2 环境搭建(在Qt Creator可以设置环境变量来进行引用这些库)
- Run Qt5.6 on VS2015 & “无法迁移项目文件” & "Cannot instantiate QtProjectEngine object"错误的解决方法
- Qt之文件操作
- QT读取access是数据库表名中文乱码
- 用qt编写打印功能
- 判断是否为16进制字符串
- 【qt小贴士】Qt窗口置顶相关
- Windows下PyQt4的安装
- Qt5 VS2013中文乱码解决
- QT QTableWidget 用法总结
- MacOSX系统下安装PyQt5.5.1
- qt 多线程 信号槽
- Qt之设置窗口背景
- QT使用小技巧