2013年8月8日 星期四

compile qt source code (2) - qt embedded version for x86/linux

20121003 edit

env: ubuntu 10.04 64bit

x86/linux qt embedded 4.8.3 version
我要使用 Shadow building 這樣會比較方便。
顯示 embedded 的編譯選項
../qt-everywhere-opensource-src-4.8.3/configure -embedded --help|less

編譯選項
ref: http://www.qtforum.org/article/36628/compiling-qt-on-i386-to-x86-64.html

這是我用的編譯選項
descent@linux:qt-4.8.3-embedded-x86$
../qt-everywhere-opensource-src-4.8.3/configure -embedded x86 -no-qt3support -xplatform qws/linux-x86_64-g++  -no-largefile -exceptions -no-qt3support         -openssl -no-cups -depths 8,16,18,32 -qt-kbd-tty -qt-kbd-qvfb -qt-kbd-linuxinput -qt-mouse-linuxinput -qt-mouse-qvfb -qt-mouse-pc -opensource -plugin-gfx-directfb  -plugin-gfx-linuxfb -plugin-gfx-qvfb -plugin-gfx-transformed -plugin-gfx-vnc
make
sudo make install

會安裝到 /usr/local/Trolltech/QtEmbedded-4.8.3/

測試:
我使用 qvfb 來做測試, 先執行 qvfb (從你的 linux 安裝套件可以得到或是自己編譯 qt for X 的版本, 從 /qt-4.8.3-x86/tools/qvfb/ 編出來)

/usr/local/Trolltech/QtEmbedded-4.8.3/examples/widgets/analogclock/analogclock  -qws
descent@weiya-linux:qt-4.8.3-embedded-x86$ examples/widgets/sliders/sliders -qws -display QVFb:0



don't compile examples and demo:
http://www.qtcentre.org/threads/25441-how-can-i-don-t-compile-qt-demos-and-examples

http://stackoverflow.com/questions/11832120/qt-embedded-exchanged-colors-bits-red-and-blue

QWS_DISPLAY=LinuxFb:/dev/fb0:depth=16 ./app -qws

20130328 edit

env: debian 32bit
之前的努力結合起來:

參數編譯:
../qt-everywhere-opensource-src-4.8.3/configure -embedded x86 -no-qt3support -xplatform qws/linux-x86-g++  -no-largefile -exceptions -no-qt3support         -openssl -no-cups -depths 8,16,18,32 -qt-kbd-tty -qt-kbd-qvfb -qt-kbd-linuxinput -qt-mouse-linuxinput -qt-mouse-qvfb -qt-mouse-pc -opensource -plugin-gfx-linuxfb -plugin-gfx-qvfb -plugin-gfx-transformed

在我的 eeepc 901 上測試 linux fb 時, 需要移除 i915 module (我直接刪除 i915*.ko), 並且安裝 v86d, 再 modprobe uvesafb, 然後使用 fbset 設定顏色素, 要不然執行都會得到 segment fault。i915 gpu module 除了補強 x driver 外, 似乎還有著 framebuffer 的功能。

fbset -xres 640 -yres 480 -vxres 640 -vyres 480 -depth 8

也可以單純改顏色 16bit。
fbset -depth 16

左邊是 16 bit color, 右邊是 8bit color。

執行指令:
QWS_DISPLAY=LinuxFb:/dev/fb0:depth=16 ./analogclock -qws



旋轉的部份沒有測試成功, 就算加上 -plugin-gfx-transformed, 一直 segment fault。

旋轉部份:
-qt-gfx-transformed 編譯參數

QWSDisplay::setTransformation (1); 加入 qt 程式碼


descent@linux:qt-4.8.3-embedded-x86$
make
sudo make install

設定旋轉的環境變數:
QWS_DISPLAY=LinuxFb:/dev/fb0:depth=16 ./analogclock -qws -display transformed:Rot90

ref:
qt embedded 相關參數

沒有留言:

張貼留言

使用 google 的 reCAPTCHA 驗證碼, 總算可以輕鬆留言了。

我實在受不了 spam 了, 又不想讓大家的眼睛花掉, 只好放棄匿名留言。這是沒辦法中的辦法了。留言的朋友需要有 google 帳號。