珠海鼎芯科技imx6开发板 tslib1.4的移植

编译环境:Ubuntu 12.04 TLS

交叉编译器:fsl-linaro-toolchain

 

tslib1.4编译

解压tslib-1.4.tar.gz

 

安装依赖库:sudo apt-get install autoconf automake libtool

 

#./autogen.sh

在执行./autogen.sh

Vim configTslib14.sh

#!/bin/sh

make distclean

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 configTslib14.sh && sudo ./configTslib14.sh

 

编译过程中可能出现错误:

Make:

1、C++ no found

则下载库:sudo apt-get install build-essential

 

 /usr/include/bits/fcntl2.h:51:

 error: call to ‘__open_missing_mode’ declared with attribute

 error: open with O_CREAT in second argument needs 3 arguments

 

/tests/ts_calibrate.c 中

/* 源文件
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
     cal_fd = open (calfile, O_CREAT | O_RDWR);
 } else {
   cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);
 }*/

 

 

 需要更改成如下形式
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
    cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);
} else {
    cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);
}保存后重新编译即可

 

或者查看交叉工具链是否加到环境变量中

Make install :

在交叉工具链已经加到环境变量出现arm-none-linux-gnueabi-gcc no found

对照 configTslib14.sh中地址是否与环境变量的交叉工具链的地址一致。

 

触摸屏校准:

启动imx6开发板后,在根文件系统中运行/tslib1.4文件下的/bin/tslib_calibrate

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值