本文转载自:https://blog.csdn.net/zijie_xiao/article/details/50740950

tslib移植笔记(1)
2016-04-25

tslib背景【摘自百度】:

在采用触摸屏的移动终端中,触摸屏性能的调试是个重要问题之一,因为电磁噪声的缘故,触摸屏容易存在点击不准确、有抖动等问题。
Tslib是一个开源的程序,能够为触摸屏驱动获得的采样提供诸如滤波、去抖、校准等功能,通常作为触摸屏驱动的适配层,为上层的应用提供了一个统一的接口。

系统环境:

Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:    trusty

交叉编译工具链:

适用于mini2440开发板的arm-linux-gcc-4.4.3-20100728.tar.gz

源码地址:

https://github.com/kergoth/tslib

下载源码方法:

1.通过git直接下载源码: git clone https://github.com/kergoth/tslib

2.网页下载源码,文件名为 tslib-master.zip,解压源码:unzip tslib-master.zip

编译源码:

1.下载依赖库及工具

sudo apt-get install autoconf

sudo apt-get install automake

sudo apt-get install libtool

2.生成configure

执行 ./autogen.sh

遇到错误1:

➜  ~/test/tslib-master: ./autogen.sh
configure.ac:24: 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:25: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:26: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.ac:27: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1

原因:是因为没有安装上面的libtool

执行 sudo apt-get install libtool 即可。

安装后重新执行信息如下:

➜  ~/test/tslib-master: ./autogen.sh                
libtoolize: putting auxiliary files in `.'.
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:18: installing './compile'
configure.ac:27: installing './config.guess'
configure.ac:27: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
plugins/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
plugins/Makefile.am: installing './depcomp'
tests/Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

3.生成Makefile

预先配置好环境变量,交叉工具链arm-linux-gcc路径

./configure
--host=arm-linux --prefix=安装路径

网上那个有教程有两种配置方式,但这里暂时没设置也能够编译通过:

1. ./configure --prefix=安装路径 --host=arm-linux
ac_cv_func_malloc_0_nonnull=yes

2. echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache

./configure --host=arm-linux -cache-file=arm-linux.cache --prefix=安装路径

4.编译源码

make && make install

最后在输出目录下生成 bin  etc  include  lib 四个子目录。

bin目录下面为可执行程序 ts_calibrate  ts_harvest  ts_print  ts_print_raw  ts_test
etc目录下面只有一个文件 ts.conf

include目录下面有头文件 tslib.h

lib目录下有 libts-1.0.so.0  libts-1.0.so.0.0.0  libts.la  libts.so  pkgconfig  ts

---------------------

本文来自 Xiao_ZJ 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/zijie_xiao/article/details/50740950?utm_source=copy

tslib移植笔记(1)【转】的更多相关文章

  1. Tslib移植与分析【转】

    转自:http://blog.csdn.net/water_cow/article/details/7215308 目标平台:LOONGSON-1B开发板(mips32指令集)编译平台:x86PC-- ...

  2. tslib移植中环境变量编辑

    (1)将/usr/local/tslib下的所有文件复制到移植系统文件中/usr/local(2)编辑移植系统中/etc/profile添加触摸屏支持内容:在/etc/profile文件中设置tsli ...

  3. STemWin5.22移植笔记【转】

    来自:http://www.openedv.com/posts/list/27697.htm STemWin5.22移植笔记 网上关于emwin的资料很少,我在移植的时候查了很多资料,对我一个感觉是好 ...

  4. tslib移植arm及使用

    测试平台 宿主机平台:Ubuntu 12.04.4 LTS 目标机:Easy-ARM IMX283 目标机内核:Linux 2.6.35.3 tslib 1.4 下载  https://gitlab. ...

  5. 最新QT4.8+kernel_3.2.5+uboot_2010.06+tslib移植成功-问题小结

    2012-02-19 21:34:13 都是从源码下载然后自己修改,使用与TQ2440,之前uboot其实已经完成了.但是yaffs2没带起来.现在回头看来是很简单的了.bootargs参数中我设置成 ...

  6. 【转载】tslib移植_freescale imx6

    本文来自网络:http://blog.csdn.net/xishuang_gongzi/article/details/49422879 环境:host:Ubuntu12.04target:frees ...

  7. JZ2440 u-boot-2016.11、linux-4.17和busybox-1.28.4移植笔记

    2018年5月份开始在JZ2440上陆续移植了u-boot-2016.11.u-boot-spl-2016.11.linux-4.17和busybox-1.28.4,其中linux-4.17和busy ...

  8. FreeRTOS学习及移植笔记之二:在IAR和STM32F103VET上移植FreeRTOS

    上一次,我们简单的测试了FreeRTOS的基于IAR EWARM v6.4和STM32F103VET6平台的Demo,对其有了一个基本认识.接下来我们开始自己移植FreeRTOS的过程. 1.创建一个 ...

  9. FreeRTOS学习及移植笔记之一:开始FreeRTOS之旅

    1.必要的准备工作 工欲善其事,必先利其器,在开始学习和移植之前,相应的准备工作必不可少.所以在开始我们写要准备如下: 测试环境:我准备在STM32F103平台上移植和测试FreeRTOS系统 准备F ...

随机推荐

  1. getopts shell command -options parameters

    说明:原文网址http://blog.chinaunix.net/uid-26807463-id-3151601.html 获取UNIX类型的选项: unix有一个优点就是标准UNIX命令在执行时都具 ...

  2. LightOj 1118 - Incredible Molecules(两圆的交集面积)

    题目链接:http://lightoj.com/volume_showproblem.php?problem=1118 给你两个圆的半径和圆心,求交集的面积: 就是简单数学题,但是要注意acos得到的 ...

  3. 爱上 SQLAlchemy 的 10 个理由(转)

    原文:http://python.jobbole.com/82453/ 本文由 伯乐在线 - Namco 翻译,唐尤华 校稿.未经许可,禁止转载!英文出处:Paul Johnston.欢迎加入翻译组. ...

  4. LeetCode 第 338 题 (Counting Bits)

    Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...

  5. 可以搜索到DedeCms后台文章列表文档id吗?或者快速定位id编辑文章

    我们在建站时有的时候发现之前的文章有错误了,要进行修改,但又不知道文章名,只知道大概的文章id,那么可以搜索到DedeCms后台文章列表文档id吗?或者快速定位文章id方便修改? 第一种方法:复制下面 ...

  6. [py]函数中yield多次返回,延迟计算特性-杨辉三角

    搞清什么是杨辉三角 每行是一个数组, 第一行: [1] 第二行: [1, 1] 第三行: [1, 2, 2, 1] ... 画的好看点就是,不过没啥卵用 1 / \ 1 1 / \ / \ 1 2 1 ...

  7. Lintcode: Kth Prime Number (Original Name: Ugly Number)

    Ugly number is a number that only have factors 3, 5 and 7. Design an algorithm to find the kth numbe ...

  8. 下载YouTube视频的方法

    这个网站就可以: http://www.clipconverter.cc/ 更多的网站及介绍参考知乎:http://www.zhihu.com/question/19964181

  9. UVM中的regmodel建模(一)

    UVM中的regmodel继承自VMM的RAL(Register Abstract Layer),现在可以先将寄存器模型进行XML建模,再通过Synopsys 家的工具ralgen来直接生成regmo ...

  10. 利用<object>和<embed>实现视频播放

    直接使用<object>或<embed>都可以实现视频播放,那么两者的区别是什么? 1.是为了兼容不同浏览器,IE只支持对Object的解析:火狐,谷歌,Safari只支持对E ...