Mini2440移植qt-extended4.4.3


因为项目需求,前段时间在Mini2440上移植了qt-extended4.4.3,现将移植过程简单的说下,希望对做相关的工作的朋友有帮助。

一、开发环境

  上位机:Fedora9.0

   交叉编译器版本:arm-linux-gcc4.4.3(友善之臂提供,在此说明下:arm-linux-gcc4.4.3或arm-linux-gcc4.4.2是支持arm9的,建议在arm9上移植不要使用友善之臂提供的arm-linux-gcc4.5(支持的是arm11的));

   网络文件系统目录:/opt/root_nfs/root_qtopia(大家根据自己的情况而定)

  开发板LCD版本:w35

  开发板bootloader:u-boot(嵌入式家园提供)

  开发板内核:uImage(嵌入式家园提供)

  根文件系统:root_qtopia(嵌入式家园提供)

 声明:bootloader、内核和根文件系统大家也可以直接使用友善之臂提供的。


二、交叉编译tslib1.4

  编译和运行qt-extended-4.4.3(Qtopia4),需要tslib库,该库是触摸屏校准时需要的库文件,如对触摸屏的数据进行过滤、去抖动等,QT的库会调用tslib的库文件。

 在此提示大家,安装Fedora时,最好是完全安装,不要缺省安装,因为编译tslib等时需要第三方库的支持。

1、解压tslib1.4.tar.gz

2、进入tslib目录:

[root@localhost /]# cd tslib/

3、设置环境变量、制定交叉编译器

#export PATH=/opt/toolchain/4.4.3/bin:$PATH
#export TOOLCHAIN=/opt/toolchain/4.4.3
#export TB_CC_PREFIX=arm-linux-
#export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-linux

4、运行tslib目录下的脚本

#./autogen.sh

#echo "ac_cv_func_malloc_0_nonnull=yes">arm-linux.cache

5、配置

#./configure--host=arm-linux
--cache-file=arm-linux.cache
--enable-inputapi=no
PLUGIN_DIR=/usr/local/arm/tslib/plugins
-prefix=/usr/local/arm/tslib/build
-host=arm-linux
--cache-file=arm-linux.cache2>&1 | tee conf_log

这一行:-prefix=/usr/local/arm/tslib/build表示tslib安装的目录

最后一行将配置信息写入conf_log文件,方便大家检查错误

6、编译

#make2>&1|teemake_log
#makeinstall

7、成功后在/usr/local/arm/tslib出现build目录,进入相关的etc目录找到ts.conf滨修改,删除module_rawinput’前面的#号和空格,

并将build目录改为tslib(命令:[root@localhost tslib]# mv build tslib),所以现在tslib在pc机下目录为:/usr/local/arm/tslib/tslib,然后把tslib目录拷贝至网络文件系统中:/opt/root_nfs/root_qtopia/usr/local中


三、交叉编译qt-extended4.4.3

1、新建目录arm

[root@localhost /]# mkdir arm

2、拷贝qt-extended-opensource-src-4.4.3.tar.gz至arm目录

3、进入arm目录

[root@localhost /]# cd arm

为了实现一键编译,在此我编写一个脚本:build,内容如下:

#!/bin/bash

rm qt-extended-4.4.3 -fr
tar xvzf qt-extended-opensource-src-4.4.3.tar.gz

rm -fr builddir
mkdir builddir

#linux-arm-g++  
export PATH=/opt/toolchain/4.4.3/bin:$PATH
export TOOLCHAIN=/opt/toolchain/4.4.3
export TB_CC_PREFIX=arm-linux-
#export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-linux
export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-none-linux-gnueabi


QTOPIA_PREFIX_DIR=/opt/Qtopia4.4.3
export QTOPIA_DEPOT_PATH=$PWD/qt-extended-4.4.3
export QPEDIR=$PWD/builddir
export LC_CTYPE="en_US"
export LANG="en_US"
export LANGUAGE="en_US"

cd $QPEDIR
echo yes | $QTOPIA_DEPOT_PATH/configure \
             -ui-type mobile \
             -xplatform linux-arm-g++ \
             -arch arm \
             -release \
             -clean \
             -prefix ${QTOPIA_PREFIX_DIR} \
             -sound-system oss \
             -build-qt \
             -no-sxe \
             -no-ssl \

             -no-v4l2 \                                                                                           
             -no-vpn \                                                                                            
             -no-phonon \                                                                                         
             -no-libamr \                                                                                         
             -dynamic-rotation \                                                                                  
             -mediaengines cruxus \                                                                               
             -remove-mediaengine gstreamer,helix \                                                                
             -pictureflow \                                                                                       
             -remove-module bluetooth,drm \                                                                       
             -no-dbus \                                                                                           
             -no-dbusipc \                                                                                        
             -add-displaysize 240x320 \                                                                           
             -extra-qt-embedded-config "-embedded arm -xplatform qws/linux-arm-g++ -no-cups -nomake examples -nomake demos -qt-zlib
-qt-libjpeg -qt-libmng -qt-libpng -no-dbus -depths 16,32 -qt-gfx-linuxfb -qt-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multis
creen -qt-kbd-tty -no-kbd-usb -no-kbd-sl5000 -no-kbd-yopy -no-kbd-vr41xx -no-kbd-qvfb -qt-mouse-tslib -I/usr/local/arm/tslib/tslib/i
nclude  -L/usr/local/arm/tslib/tslib/lib -no-webkit -no-openssl -no-phonon -no-phonon-backend -no-nas-sound -no-exceptions -svg" \
              -extra-qt-config "-no-webkit" \                                                                     
             2>&1 | tee ../qtopiaconfig.log                                                                       
                                                                                                                                                                                                             
bin/qbuild 2>&1 | tee ../qtopia4.4.3makelog                                                                       
bin/qbuild image                                                    

  • 1
  • 2
  • 3
  • 下一页

相关内容