基本上移植的方法沒什么不同
除了 alway inline 不需作修改
改以直接在configure的時(shí)候定義 ALWAYS_INLINE
-D ALWAYS_INLINE=inline




我把需要的檔案整理在SourceForge的 Andes QT Port Project
http://sourceforge.net/downloads/andesqt/

SourceForge比較大方?jīng)]有單一檔案大小100MB的限制:-) 比起Google Code

  • ag101_image_with_unalign_access是有開啟 unalign access 的Kernel但我沒有實(shí)際測(cè)試過,手邊只有 Leopard
  • bashrc.nds32le-linux-V0這個(gè)是我的source設(shè)定檔
  • linux-2.6-bsp20.tgz這個(gè)為穩(wěn)定版本的 Andestech BSP 若需要 重新編譯Kernel 請(qǐng)用此版本
  • nds32le-linux-glibc-V0-Qt45.tgz這個(gè)為穩(wěn)定版本的 Andestech Toolchain
  • xc5_image_with_unalign_access是有開啟 unalign access 的Kernel我有實(shí)際測(cè)試過


你下載后依照以下步驟


1.請(qǐng)修改為你 環(huán)境變數(shù) 的相關(guān)參數(shù)

1 source bashrc.nds32le-linux-V0


2.下載 Qt Embedded 并解壓縮

1 wget http://get.qt.nokia.com/qt/ source /qt-everywhere-opensource-src-4.6.3. tar .gz
2 tar zxvf qt-everywhere-opensource-src-4.6.3. tar .gz


3. 進(jìn)入目錄

1 cd qt-everywhere-opensource-src-4.6.3


4.修改程式,使用" l inux-generic-g++ ".

1 vim mkspecs/qws/linux-generic-g++/qmake.conf

加入

01 include(../../common/g++.conf)
02 include(../../common/linux.conf)
03 include(../../common/qws.conf)
04
05 # modifications to g++.conf
06 QMAKE_CC = nds32le-linux-gcc -EL -G0 -Wa,-mno-small-data -lts
07 QMAKE_CXX = nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data -lts
08 QMAKE_LINK = nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data -lts
09 QMAKE_LINK_SHLIB = nds32le-linux-g++ -EL -G0 -Wa,-mno-small-data -lts
10
11 # modifications to linux.conf
12 QMAKE_AR = nds32le-linux-ar cqs
13 QMAKE_OBJCOPY = nds32le-linux-objcopy
14 QMAKE_STRIP = nds32le-linux-strip




5. 修改程式

1 vim /src/corelib/io/qfilesystemwatcher_inotify.cpp

增加 Andestech參數(shù)

1 //# error "This architecture is not supported. Please talk to qt-bugs@trolltech.com"
2 # define __NR_inotify_init 316
3 # define __NR_inotify_add_watch 317
4 # define __NR_inotify_rm_watch 318
5 # define __NR_inotify_init1 360

6. 不需修改always_inline
src/3rdparty/webkit/JavaScriptCore/wtf/AlwaysInline.h


7.輸入(請(qǐng)注意最后面有增加 -D ALWAYS_INLINE=inline )

1 ./configure -embedded generic -qt-zlib -qt-libpng -qt-gif -qt-libtiff -qt-libmng -qt-libjpeg -no-openssl -little-endian -webkit -svg -no-xmlpatterns -no-phonon -backend -no-accessibility -no-glib -no-freetype -no-dbus -no-pch -qt-mouse-tslib -I/home/liu/nds32/include -L/home/liu/nds32/lib - v -D ALWAYS_INLINE=inline


8. 輸入
o


9. 輸入
yes


10. 輸入

make




11. 輸入

sudo make install




12.復(fù)制至SD卡或使用 NFS

1 udhcpc
2 mount -t nfs 192.168.1.99:/home/liu/nds32/ /tmp/ -o proto=tcp -o nolock



13. 設(shè)定變數(shù)

01 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/tmp/lib
02 export TSLIB_TSDEVICE=/dev/input/event0
03 export TSLIB_CALIBFILE=/tmp/etc/pointercal
04 export TSLIB_CONFFILE=/tmp/etc/ts.conf
05 export TSLIB_PLUGINDIR=/tmp/lib/ts
06 export TSLIB_FBDEVICE=/dev/fb0
07
08 export QTDIR=/usr/ local /Trolltech/QtEmbedded-4.6.3-generic/
09 export QWS_KEYBOARD=None
10 export QWS_MOUSE_PROTO=tslib
11 export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

14. 增加目錄

1 mkdir -p /usr/ local /Trolltech/
2 mount -t nfs 192.168.1.99:/usr/ local /Trolltech/ /usr/ local /Trolltech/ -o proto=tcp -o nolock
3 ln -s /tmp/etc/pointercal /etc/pointercal
4
5 printf "/033[9;0]" > /dev/tty0

15. 執(zhí)行測(cè)試程式

1 cd /usr/ local /Trolltech/QtEmbedded-4.6.3-generic/examples/layouts/borderlayout
2 ./borderlayout -qws
3 #如果沒有unaligned access 以下程式會(huì)Core dump
4 cd /usr/ local /Trolltech/QtEmbedded-4.6.3-generic/examples/widgets/sliders
5 ./sliders -qws

16.執(zhí)行 webkit 測(cè)試程式

1 cd /usr/ local /Trolltech/QtEmbedded-4.5.1-generic/examples/webkit/formextractor
2 ./formExtractor -qws

以下為我的 測(cè)試成果

好熟悉的圖案

Webkit

Web Browser

請(qǐng)愛用穩(wěn)定版的 Toolchain 并配合正確的 BSP 版本