zoukankan      html  css  js  c++  java
  • 触摸屏之linux3.4.2安装tslib

    1. 写好触摸屏驱动后,安装tslib

    1.1 tar xzf tslib-1.4.tar.gz

    1.2 cd tslib

    1.3 修改编译器版本号或者内核版本号,使它们一致。不然会出错,显示selected device is not a touchscreen I understand

          在内核中 ——    include/linux/input.h:37:#define EV_VERSION             0x010001

          在gcc-4.3.2 —— arm-none-linux-gnueabi/libc/usr/include/linux/input.h:32:#define EV_VERSION       0x010000

    1.4 ./autogen.sh

    1.5 mkdir tmp

    1.6 echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache //设置参数

    1.7 ./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=$(pwd)/tmp   //配置到tmp目录下

    1.8 make

    1.9 make install

    1.10 cd tmp 可以看到bin ,etc,include,lib4个目录

    1.11 cd ../

    1.12 cp tmp <挂接的根文件目录>/ts_dir -rfd

            比如我的 cp tmp ~/work/nfs_root/fs_mini_mdev_new/ts_dir  -rfd

    1.13 在开发板环境下,cd ts_dir   可以看到4个目录

    1.14 cp * /  -rfd    把这4个目录拷贝到开发板的根目录下

    1.15 vi /etc/inittab   //检查是否会启动tty1: tty1::askfirst:-/bin/sh , 若有,前面加#, 避免tty1控制我们的LCD屏,然后重启

    1.16 vi /etc/ts.conf  

           # module_raw input
    改为:
         module_raw input

           注意不要留空格

    1.17 写一个shell脚本tslib.sh,执行sh tslib.sh

    #!/bin/sh
    export TSLIB_TSDEVICE=/dev/event0
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/lib/ts
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb0

    1.18 ts_calibrate               //运行校验,屏幕会出现5次小黑点让用户触摸,然后生成/etc/pointercal文件,并存5个小黑点值

    1.19 ts_test                      //运行测试,可以随意画图测试

          

         

  • 相关阅读:
    luogu2394 yyy loves Chemistry I
    luogu2393 yyy loves Maths II
    2018年01月刷题学习日记
    luogu2590 [ZJOI2008]树的统计
    HDU 2087 剪花布条
    HDU 1686 Oulippo
    HDU 1711 Number Sequence(KMP模板)
    HDU 3336 Count the String(KMP+DP)
    UVa 1614 奇怪的股市
    UVa 12174 Shuffle(滑动窗口)
  • 原文地址:https://www.cnblogs.com/zhu-g5may/p/9318902.html
Copyright © 2011-2022 走看看