close


執行 autogen.sh (需要安裝 automake libtool)


./autogen.sh
configure.ac:25: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:26: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:27: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.ac:28: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf2.50: /usr/bin/autoconf failed with exit status: 1
root@ubuntu:/nfs/pc9223/filesystem/rootfilesystem/rootfs/home/kdiag/kdiag8006/code/tslib/tslib-1.0# apt-get inhref="apt://m4,autoconf,automake,libtool" stall m4 autoconf automake libtool
E: 無效的操作 inhref=apt://m4,autoconf,automake



apt-get install libtool


de/tslib/tslib-1.0# ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in `m4/internal'.
libtoolize: copying file `m4/internal/libtool.m4'
libtoolize: copying file `m4/internal/ltoptions.m4'
libtoolize: copying file `m4/internal/ltsugar.m4'
libtoolize: copying file `m4/internal/ltversion.m4'
libtoolize: copying file `m4/internal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
configure.ac:7: installing `./missing'
plugins/Makefile.am: installing `./depcomp'



會產生 configure 檔案


./configure --prefix=/nfs/pc9223/filesystem/rootfilesystem/rootfs/home/kdiag/kdiag8006/ap/tslib CC=arm-linux-gcc --host=arm-linux ac_cv_func_malloc_0_nonnull=yes



設定完後就可以編譯了


make
make install


會將產生出來的檔案放在 --prefix 指定的資料夾內



設定 tslib 環境變數:
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib


設定 ts.conf:
把 module_raw 設定成 input
module_raw input


接下來只要執行 bin 底下的 ts_calibrate 就會出現校正畫面
校正完畢後會產生 pointercal


執行 ts_test 會有測試畫面



若執行時出現
segmentation fault


則請注意 ts.conf 文件去掉第一行的註釋的時候是否忘記刪除空格...........


 


**附註**
1. 記得 TSLIB_TSDEVICE 要設定成 /dev/event0 不要設定成 /dev/mouse0
2. 環境變數要對應放在 filesystem 的位置


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 立你斯 的頭像
    立你斯

    立你斯學習記錄

    立你斯 發表在 痞客邦 留言(0) 人氣()