Tslib-1.4的移植

PC系统: ubuntu14.04
嵌入式系统内核: linux3.0.35
嵌入式交叉编译工具:arm-linux-gcc-4.5.1(之前的文章有安装包)
tslib-1.4下载链接:http://download.csdn.net/detail/MKNDG/3291565
tslib-1.4的安装路径:/tool/tslib-1.4

  • 下载并解压tslib-1.4 ,进去其目录
  • 编写配置脚本Tslibconfig.sh:
    vi Tslibconfig.sh,内容如下:
 #!/bin/sh
 echo “ac_cv_func_malloc_0_nonnull=yes”>arm-linux.cache
CC=/usr/local/arm/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-gcc ./configure –host=arm-none-linux-gnueabi –prefix=/work/Qt/Qt_Install/tslib1.4 –cache-file=arm-none-linux-gnueabi.cache
make && make install
  • 修改文件权限chmod 777 Tslibconfig.sh
  • 修改原目录下的 文件autogen.sh的权限
    chmod 777 autogen.sh
  • 先执行autogen.sh再执行Tslibconfig.sh
  • 如果出现以下报错信息:
    ts_test.o: In function main':
    ts_test.c:(.text+0x3b4): undefined reference to
    rpl_malloc’
    fbutils.o: In function open_framebuffer':
    fbutils.c:(.text+0x2f8): undefined reference to
    rpl_malloc’
    collect2: ld returned 1 exit status
    解决方法:
    执行# ./configure –host=mipsel-linux –prefix=/TSLIB后,在config.h中将“#define malloc rpl_mallo”注释掉,编译通过。
  • 设置环境变量
    vi /etc/profile
    在文件尾添加以下内容:
export  TSLIB_TSDEVICE=/dev/input/event0
export  TSLIB_CALIBFILE=tool/tslib-1.4/etc/pointercal
export  TSLIB_CONFFILE=tool/tslib-1.4/etc/ts.conf
export  TSLIB_PLUGINDIR=/tool/tslib-1.4/lib/ts
export  TSLIB_CONSOLEDEVICE=none
export  TSLIB_FBDEVICE=/dev/fb0
  • 修改ts.conf : vi /tool/tslib-1.4/etc/ts.conf
    去掉第二行前面的#号和空格
    更新下soucre /etc/profile

  • 下面只要制作成根文件系统烧入arm板就行,并再 cd进去目录tslib的bin目录下,执行./ts_calibrate 校准
    在执行./ts_test测试划线

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值