分类: LINUX
2011-04-15 17:32:55
#!/bin/sh
#download qte/embedded 4.5.2 open source form
#cross compile qt/embedded 4.5.2
#change your work paht,/usr/src/arm-linux-2.6/user/qt/qt-embedded-linux-opensource-src-4.5.2
#./config-fic8182.sh ,will configure qt-embedded-4.5.2 to fic8182 config.
#make;make install; to install ,config-fic8182.sh line '--prefix=/usr/src/arm-linux-2.6/target/rootfs-cpio/usr/qt'
#is the qt-embedded install path
#1 on host,to make qte application
#linux host qmake qt set
#add two lines to your linux host $HOME/.bashrc
#export QMAKESPEC="/usr/src/arm-linux-2.6/target/rootfs-cpio/usr/qt/mkspecs/qws/linux-arm-g++"
#export PATH="/usr/src/arm-linux-2.6/target/rootfs-cpio/usr/qt/bin":$PATH
#qmake your.pro
#make
#copy your qt application to /usr/src/arm-linux-2.6/target/rootfs-cpio/usr/qt
#2 on arm linux
#mount nfs for qt form linux host first
#mount -t nfs 192.168.6.181:/usr/src/arm-linux-2.6/target/rootfs-cpio/usr/qt /mnt/nfs
#3 on arm linux to run qt application
#set qt envs
export LD_LIBRARY_PATH=/mnt/nfs/lib:$LD_LIBRARY_PATH
export QWS_DISPLAY='LinuxFB:/dev/fb1'
export QT_PLUGIN_PATH='/mnt/nfs/plugins'
#to run your application
#cd /mnt/nfs/qt/
#./application
#add ssq 2010-08-23
export LD_LIBRARY_PATH=/usr/qt/lib:$LD_LIBRARY_PATH
export QWS_DISPLAY=LinuxFB:/dev/fb1
export QT_PLUGIN_PATH=/usr/qt/plugins
export QT_QWS_FONTDIR=/usr/qt/lib/fonts
mount -t nfs 192.168.1.172:/work/nfs /mnt/nfs
qt configue.sh
#!/bin/sh
unset QMAKESPEC
unset QTDIR
./configure -embedded arm \
-qt-libpng \
-qt-libjpeg \
-qt-libtiff \
-qt-libmng \
-qt-gif \
-qt-zlib \
-fast \
-webkit \
-nomake examples \
-nomake demos \
--prefix=/work/nfs/qt
注 要更改编译器qt-embedded-linux-opensource-src-4.5.2\mkspecs\qws\linux-arm-g++\qmake.conf