開發(fā)平臺:ubuntu 7.04 目標平臺:S3c2410 開發(fā)工具:arm 交叉工具鏈版本3.4.5 qt4版本:qt-embedded-linux-opensource-src-4.4.3.tar.gz(可到trolltech的ftp下載) 源碼版本:linux-2.6.8 一. cd make menuconfig 在界面中找到Graphics support 進入查看Support for framebuffer devices 和 S3C2410 LCD framebuffer support兩個選項是否被選中,選中代表內(nèi)核已支持。否則選中兩個選項,然后保存退出, make zImage 將新生成的內(nèi)核鏡像燒寫到開發(fā)板上。 二. ./configsh (configsh腳本內(nèi)容如下: #!/bin/sh ./configure -prefix /home/linux/qt4_port/qt/build\ ) make && make install 這個時候在指定的安裝目錄會出現(xiàn)如下目錄:bin include lib mkspecs plugins translations 三. mount –t nfs –o nolock 192.168.1.100:/source/rootfs 然后將上一步生成的lib庫文件考到掛載的根文件系統(tǒng)的/home/qt/build/lib目錄下 cp /home/linux/qt4_port/qt/build/lib/libQt* 四. cp /home/linux/qt4_port/qt/build/lib/fonts/wenquanyi_160_75.qpf \ /source/rootfs/home/qt/build/fonts 五. 用qt編一個helloworld 程序進行測試。使用qmake、make對程序進行編譯。 注意:一定要用qtembed安裝目錄下bin/下面的qmake /home/linux/qt4_port/qt/build/bin/qmake /home/linux/qt4_port/qt/build/bin/qmake make 六.將上一步生成的可執(zhí)行文件helloworld考到掛載的根文件系統(tǒng)下 在開發(fā)板上設置環(huán)境變量 export QTDIR=/var/mnt /home/qt/build export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export PATH=$QTDIR/bin:$PATH export QT_QWS_FONTDIR=/var/mnt /home/qt/build/fonts 最后運行helloworld程序 ./helloworld 就可以看到界面了。 |
|
來自: 看見就非常 > 《OS操作系統(tǒng)》