환경은 아래와 같습니다.
OS: Ubuntu 14.04 LTS (32bit)
Cross compiler: arm-linux-gnueabi
1. tslib 설치
git clone
https://github.com/kobolabs/tslib * 버그 fix 버전.
cd tslib
chmod 755 autogen-clean.sh
chmod 755 autogen.sh
./autogen-clean.sh
./autogen.sh
./configure --build=i386-linux --host=arm-linux -prefix=/rootech/lib/tslib CC=/usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-gcc CXX=/usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-g++ \
--enable-shared --disable-h3600 --disable-corgi --disable-collie --enable-input --disable-arctic2 --disable-ucb1x00 --disable-mk712
make
sudo make install
sudo rm /rootech/lib/tslib/etc/ts.conf
sudo vi /rootech/lib/tslib/etc/ts.conf
{
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
} // 이 부분은 configure 한 설정에 맞게 필요한 모듈의 주석을 지워주시면 됩니다.
cd /rootech/lib/tslib/lib
sudo ln -s libts-1.0.so.0.0.0 libts-0.0.so.0
2. Qt5.3.1 소스 다운로드 후 압축해제
* 다운은 아래 주소에서 가능
http://download.qt-project.org/archive/qt/5.3/5.3.1/single/sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev
sudo apt-get install libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
3. qmake.conf 파일 수정
cd qt-everywhere-opensource-src-5.3.1
vim ./qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
...
- modifications to g++.conf
QMAKE_CC = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-gcc
QMAKE_CXX = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-g++
QMAKE_LINK = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-g++
QMAKE_LINK_SHLIB = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-g++
- modifications to linux.conf
QMAKE_AR = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-ar cqs
QMAKE_OBJCOPY = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-objcopy
QMAKE_NM = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-nm -P
QMAKE_STRIP = /usr/local/arm/4.3.1-eabi-armv6/usr/bin/arm-linux-strip
QMAKE_LFLAGS += -Wl,-rpath-link=/rootech/lib/tslib/lib
...
4. configure 옵션
cd ~/qt-everywhere-opensource-src-5.3.1/qtbase/
./configure -v \
-arch arm \
-xplatform linux-arm-gnueabi-g++ \
-device-option CROSS_COMPILE=arm-linux-gnueabi \
-prefix /rootech/qt/5.3.1 \
-opensource \
-confirm-license \
-I/rootech/lib/tslib/include -L/rootech/lib/tslib/lib -tslib \
-no-c++11 -no-wayland -force-pkg-config -no-largefile -no-accessibility
make
sudo make install
5. 타겟보드 환경변수 설정
*****************************************************
TSLIB_CONFFILE: ts.conf 의 경로
TSLIB_CALIBFILE: touch calibration파일이 저장 될 경로
QT_QPA_PLATFORM: -platform 옵션
QT_QPA_GENERIC_PLUGINS: -plugin 옵션
*****************************************************
{
export TSDIR=/rootech/lib/tslib
export TSLIB=/rootech/lib/tslib/lib
export TSLIB_ConFFILE=$TSDIR/etc/ts.conf
export TSLIB_CALIBFILE=$TSDIR/etc/pointercal
export TSLIB_PLUGINDIR=$TSDIR/lib/ts
export TSLIB_TSDEVICE=/dev/input/event1
export PATH=$TSDIR/bin:$PATH
export LD_LIBRARY_PATH=$TSLIB:$LD_LIBRARY_PATH
export QWS_DISPLAY=Linuxfb:mmsize=200x120
export QT_QPA_PLATFORM=$QWS_DISPLAY
export QWS_MOUSE_PROTO=Tslib:$TSLIB_TSDEVICE
export QT_QPA_GENERIC_PLUGINS=$QWS_MOUSE_PROTO
export QTDIR=/rootech/qt/5.3.1
export QTLIB=$QTDIR/lib
export QTINC=$QTDIR/include
export PATH=$QTDIR/bin:$PATH
export QMAKESPEC=$QTDIR/mkspecs/linux-arm-gnueabi-g++
export LD_LIBRARY_PATH=$QTLIB:$LD_LIBRARY_PATH
}
6. 참고 자료 link
http://qt-project.org/wiki/Building-Qt-5-from-Githttp://qt-project.org/doc/qt-5/linux-requirements.htmlhttp://gpupowered.org/node/8