tslib移植

本文介绍如何在Ubuntu 11.04上使用arm-linux-gcc 4.1.2交叉编译器编译tslib-1.4,并解决编译过程中遇到的rpl_malloc未定义引用错误。通过配置指定的参数成功完成编译。
tslib版本:
tslib-1.4
交叉编译器版本:
arm-linux-gcc 4.1.2
操作系统平台:
Linux -- ubuntu11.04

一 :安装编译所需程序
 #apt-get install autoconf
 #apt-get install automake
 #apt-get install libtool
二 :配置编译
 #tar xzvf tslib-1.4.tar.gz
 #cd tslib
 #./autogen.sh
 #./configure --prefix=/home/pro/tslib  CC=arm-linux-gcc --host=arm-linux --target=arm-linux
 #make
 出现以下错误:
 ts_test.o: In function `main':
 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] 错误 1
 make[2]:正在离开目录 `/home/smb/tslib/tests'
 make[1]: *** [all-recursive] 错误 1
 执行:
 #echo "ac_cv_func_malloc_0_nonnull=yes" > mytslib.cache
 #./configure --prefix=/home/pro/tslib CC=arm-linux-gcc --host=arm-linux --target=arm-linux 
  -cache-file=mytslib.cache
 #make
三 :安装
 #make install
 
     安装完成后,把tslib目录下的所有内容拷贝到根文件系统的/usr/local/tslib目录下,修改tslib/etc/ts.conf文件,将第二行module_raw input的注释去掉。
     将tslib/bin/ts_calibrate拷贝到/usr/bin下,这个就是触摸屏校正程序,运行时,屏幕上会依次出现5个点,点击后会在/etc/目录下生成pointercal文件,qtopia就会根据这个文件进行校正。

备注:./configure --prefix=/home/pro/tslib CC=arm-linux-gcc --host=arm-linux --target=arm-linux ac_cv_func_malloc_0_nonnull=yes 也能解决
 s_test.o: In function `main':
 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'
错误
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值