基本上移植的方法沒什么不同
除了
alway inline
不需作修改
改以直接在configure的時候定義
ALWAYS_INLINE
-D ALWAYS_INLINE=inline
我把需要的檔案整理在SourceForge的
Andes QT Port Project
中
http://sourceforge.net/downloads/andesqt/
SourceForge比較大方沒有單一檔案大小100MB的限制:-) 比起Google Code
- ag101_image_with_unalign_access是有開啟 unalign access 的Kernel但我沒有實際測試過,手邊只有 Leopard
- bashrc.nds32le-linux-V0這個是我的source設定檔
- linux-2.6-bsp20.tgz這個為穩定版本的 Andestech BSP 若需要 重新編譯Kernel 請用此版本
- nds32le-linux-glibc-V0-Qt45.tgz這個為穩定版本的 Andestech Toolchain
- xc5_image_with_unalign_access是有開啟 unalign access 的Kernel我有實際測試過
你下載后依照以下步驟
1.請修改為你
環境變數
的相關參數
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. 進入目錄
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參數
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.輸入(請注意最后面有增加
-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.復制至SD卡或使用
NFS
1
|
udhcpc
|
2
|
mount
-t nfs 192.168.1.99:/home/liu/nds32/ /tmp/ -o proto=tcp -o nolock
|
13. 設定變數
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. 執行測試程式
1
|
cd
/usr/
local
/Trolltech/QtEmbedded-4.6.3-generic/examples/layouts/borderlayout
|
2
|
./borderlayout -qws
|
3
|
#如果沒有unaligned access 以下程式會Core dump
|
4
|
cd
/usr/
local
/Trolltech/QtEmbedded-4.6.3-generic/examples/widgets/sliders
|
5
|
./sliders -qws
|
16.執行 webkit 測試程式
1
|
cd
/usr/
local
/Trolltech/QtEmbedded-4.5.1-generic/examples/webkit/formextractor
|
2
|
./formExtractor -qws
|
以下為我的 測試成果
好熟悉的圖案
Web Browser
請愛用穩定版的 Toolchain 并配合正確的 BSP 版本
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
