qt 4.7 with tslib 를 설치해보자.1. tslib 설치
# git clone http://github.com/kergoth/tslib.git
# cd tslib
# ./autogen.sh
# ./configure --host=arm-s3c6410-linux-gnueabi --prefix=/usr/local/tslib --enable-static --enable-shared
# make
# make install
2. qt 설치 1) qt 소스 받기
# wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0-rc1.tar.gz
# tar xfz qt-everywhere-opensource-src-4.7.0-rc1.tar.gz
2) mkspecs/qws/linux-arm-g++/qmake.conf 파일을 열어서 다음과 같이 수정한다. (개발환경에 맞게 gcc, g++ 를 변경한다.)
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = arm-s3c6410-linux-gnueabi-gcc
QMAKE_CXX = arm-s3c6410-linux-gnueabi-g++
QMAKE_LINK = arm-s3c6410-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-s3c6410-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-s3c6410-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-s3c6410-linux-gnueabi-objcopy
QMAKE_STRIP = arm-s3c6410-linux-gnueabi-strip
QMAKE_INCDIR += /usr/local/tslib/include
QMAKE_LIBDIR += /usr/local/tslib/lib
load(qt_config)
3) configure
# ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/qt -qt-mouse-tslib -little-endian
# make && make install
3. target 보드 root filesystem target root filesystem directory : /nfsroot/RootFS 1) tslib 및 qt 복사
# cp -r /usr/local/qt /nfsroot/RootFS/usr/local
# cp -r /usr/local/tslib /nfsroot/RootFS/usr/local
2) tslib, qt share library 추가 /nfsroot/RootFS/etc/ld.so.conf 파일을 열어 다음을 추가한다.
/usr/local/tslib/lib
/usr/local/qt/lib
3) /nfsroot/RootFS/etc/profile 을 열어서 다음을 추가한다. (touch screen device 가 /dev/event0 인 경우. /proc/bus/input/devices 을 읽어 확인 가능함.)
export TSDIR=/usr/local/tslib
export LD_LIBRARY_PATH=$TSDIR/lib:$LD_LIBRARY_PATH
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CONFFILE=$TSDIR/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
4. qt test target 보드 부팅 후 다음과 같이 수행한다.
# ldconfig
# cd /usr/local/tslib/bin
# ./ts_calibrate
# ./ts_test
# cd /usr/local/qt/demos/
# ./affine/affine -qws
*. 아래와 같은 에러가 날때 "rm -rf /tmp/qt* "라고 실행하고 다시 실행해봐주세요.
Qt for Embedded Linux data directory has incorrect permissions: /tmp/qtembedded- 0
* 기타 qt 프로그램 실행 시 다음과 같은 애러 메시지 출력시 Kernel의 make menuconfig에서 General setup>System V IPC 체크 후 컴파일한다. QT Cannot create semaphore /tmp/qtembedded-0/Qtembedded-0 * 참고 싸이트http://billforums.station51.net/viewtopic.php?f=8&t=15http://forum.falinux.com/zbxe/?document_srl=451945&mid=graphic
1. tslib설치에서
./configure --host=arm-none-linux-gnueabi --prefix=/usr/local/tslib --enable-static --enable-shared
저는 위와 같이 조금 다르게 수정해서 컴파일 했습니다. mango64 인데 다르시네요..
/nfsroot/RootFS/etc/profile
- 위 파일에 아래와 같이 입력을 해주면 글자가 좀 커지는 것 같습니다.
QWS_DISPLAY="LinuxFb:mmWidth136:mmHeight96:0"
-> 즉, DISPLAY (LCD의 물리적크기)를 적어주는 것 같습니다.
수고하세요..
mkspecs/qws/linux-arm-g++/qmake.conf 파일을 열어서 다음과 같이 수정한다.
==> 아래와 같은 내용을 추가해줘야 할까요? tslib link할때 에러가 납니다..
(에러내용: libQtGui.so: undefined reference to `ts_read_raw')
QMAKE_LFLAGS += -Wl,-rpath-link=/path/to/tslib/lib
https://bugreports.qt.nokia.com//browse/QTBUG-7855?page=com.atlassian.jira.plugin.system.issuetabpanels%253Aall-tabpanel