tslib 1.4 移植编译总结

下载tslib 1.4 源码编译.

在linux下面解压,创建make.sh 脚本 

export PATH=/hom/bbb/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin:$PATH
export CROSS_COMPILE=arm-linux-gnueabihf-
make clean

执行  ./autogen.sh  如报错下面信息,需要安装autoconf, automake,libtool 工具
./autogen.sh: 4: ./autogen.sh: autoreconf: not found
解决方法:
  apt-get install autoconf
  apt-get install automake
  apt-get install libtool

echo  "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=/home/yangkun/yh/tslib/01test
make

报错
ts_test.c:(.text+0x208): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0x598): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
如出现上面rpl_malloc 报错
屏蔽掉 config.h.in  里面的 #undef malloc

再次 make && make install
在目标目录下面会生成 文件 bin  etc  include  lib

把文件拷贝到板子的/USR/LOCAL 目录下面

tslib 文件配置
1,/etc/ts.conf  文件 module_raw input 注释去掉
2,/bin/ts_calibrate 文件拷贝到usr/bin 可直接执行,
3,tslib配置文件 etc/profile.d/tslib.sh  修改
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export TSLIB_TSDEVICE=/dev/input/event0   /*触摸屏设备文件名*/
export TSLIB_CONFFILE=/usr/local/etc/ts.conf /*tslib配置文件*/
export TSLIB_PLUGINDIR=/usr/local/lib/ts /*tslib需要加载模块所在目录*/
export TSLIB_CALIBFILE=/etc/pointercal  /*触摸屏校准信息保存文件*/
export TSLIB_CONSOLEDEVICE=none   /*设备台设备文件名none*/
export TSLIB_FBDEVICE=/dev/fb0      /*framebuffer 设备文件名*/

至此 tslib 配置完全.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值