2009年6月8日星期一

Linux - Compiling Qt Embedded under Ubuntu 8.1

installing qt-embedded
linux version : ubuntu 8.01-x86-64
qt-embedded version : qt-embedded-linux-opensource-src-4.5.1.tar.gz
qt-x11 version : qt-x11-opensource-src-4.5.1.tar.gz (we need this package to get qvfb)

copy the source file to 2 identical directories with different names:
- qt-embedded-x86 (for x86 arch, qvfb could only run on embedded x86 arch)
- qt-embbeded-arm (for arm arch, gnu arm toolchain to be install in advance)

-- export TOOLPATH=/tools/qt-embedded
1) qt-embedded-x86 :
in order to make qvfb usable, the plugin options added as below
-- ./configure -prefix $TOOLPATH/x86 -plugin-gfx-qvfb -qt-kbd-qvfb -qt-mouse-qvfb
-- ./make
-- ./make install

alterntive way to make qvfb usable:
-- cd ./src/plugins/gfxdrivers/qvfb/
-- create qmake path: export PATH=$PATH:$TOOLPATH/x86/bin
-- sudo make install


2) qt-embedded-arm :
Need to install gnu ARM toolchain prior to install this package.
-- ./configure -prefix $TOOLPATH/arm -xplatform qws/linux-arm-g++ -embeded arm -little-endian


3) qt-x11 :
Compile qt-x11 to get qvfb
Before compile, we need libXtst.so package
-- sudo apt-get install libxtst-dev
-- check : ls /usr/lib64/ | grep Xtst

--------
-- ./configure -qvfb
-- ./make
if want to install qt-x11
-- ./make install

-- cd ./tools/qvfb
-- ./make
-- cd ../../bin
-- cp ./qvfb $TOOLPATH/x86/bin

4) test
-- cd /tools/qt-embedded-x86/demos/books
-- qvfb &
-- ./books -qws

5) Build your own qt project
-- 1st build the qt project under X11, compile and qmake under X11 (using the X11 version of qmake)
-- run under xterm to test the program
-- recompile the the project under X11 by using /tools/qt-embedded/x86/bin/qmake
-- ./qvfb&
-- ./apps -qws

6) Build arm binary (NOT try yet, will come back after trying the flow)

没有评论: