zoukankan      html  css  js  c++  java
  • tslib編译和安装

     

    系统:Ubuntu 10.4

     编译工具:arm-linux-gcc 4.5.1 (ctng-1.8.1-FA)

     编译目标:tslib     

     (1)安装 arm-linux-gcc 4.5.1,(这个不讲了)

     (2)将kergoth-tslib-1.0-106-gf6c499a.tar.gz解压到任一目录(下载来自https://github.com/kergoth/tslib)

     (3)进入kergoth-tslib-f6c499a目录kergoth-tslib-f6c499a

     (4)安装库支持:

    sudo apt-get install autoconf automake libtool

    (5)export PREFIX=/opt/tslib                  设置目标位置

    (6)./autogen.sh                                     用于生成configure脚本

    (7)echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache          产生一个cache文件arm-linux.cache,欺骗configure

    (8)CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/opt/tslib/ --cache-file=arm-linux.cache

    (9)make

    (10)make install

      编译成功后在目标位置产生/bin、/etc、/include、/lib 4个文件夹
    (11)修改/opt/tslib/etc/ts.conf 文件,删除其中内容,改为

               module_raw input

               module pthres pmin=1
               module variance delta=30
               module dejitter delta=100
               module linear

    第一行是tslib从linux的输入设备读取数据时需要用到的模块,这里指定的模块为input,具体需要用到哪个模块,需要参考其他数据。
    第二行的pthres为Tslib提供的触摸屏灵敏度门槛插件。
    第三行的variance为Tslib提供的触摸屏滤波算法插件。
    第四行的dejitter为Tslib 提供的触摸屏去噪算法插件。
    第五行linear为Tslib提供的触摸屏坐标变换插件。

    (12)将/opt下的tslib文件夹拷贝到arm文件系统的/opt下

    (13)设置环境变量脚本tslib.sh

               #!/bin/sh
              export TSLIB_ROOT=/opt/tslib
              export TSLIB_TSDEVICE=/dev/input/event0
              export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal
              export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
              export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
              export TSLIB_CONSOLEDEVICE=/dev/tty
              export TSLIB_FBDEVICE=/dev/fb0                       //根据你的实际情况设置

    (14)启动arm板,命令行下执行脚本

              source tslib.sh

    (15)校准触摸屏

               cd /opt/tslib/bin

               ./ts_calibrate

              会出现校准画面,完成后生成pointercal 文件

     (16)链接

              ln -s /opt/tslib/etc/pointercal /etc/pointercal

     至此,tslib1.4移植完成

  • 相关阅读:
    SDUT3926 kmp
    SDUT 3930 线段树
    HDU 3277 最大流+二分
    HDU 3081 最大流+二分
    HDU 3605 最大流+状态压缩
    HDU 3572 最大流
    HDU 4576 DP
    POJ 2289 最大流
    POJ 1698 最大流
    poj 3498 最大流
  • 原文地址:https://www.cnblogs.com/xueyang/p/2470015.html
Copyright © 2011-2022 走看看