交叉编译场景分析(arm-linux)(二)--编译tslib
来源:互联网 发布:java中replace的用法 编辑:程序博客网 时间:2024/05/16 11:09
导读:
交叉编译场景分析(arm-linux)(二)--编译tslib
转载时请注明出处:http://blog.csdn.net/absurd
1. 基本信息:
软件名称 tslib
功能简述 tslib 是一个触摸屏的库,它提供诸如滤波、去抖、校准之类的功能,为不同的触摸屏提供了一个统一的接口。
下载地址 export CVSROOT=:pserver:cvs@pubcvs.arm.linux.org.uk:/mnt/src/cvsroot
cvs login
cvs co tslib
软件版本 2006-3-28 cvs 版本
依赖关系 默认
前置条件 源文件位置: $(WORK_DIR)/tslib
2. 过程分析
因为是cvs版本,所以先要生成configure脚本,tslib提供了一个autogen.sh文件,自然是用autogen.sh去产生了。运行:
[root@linux tslib]# ./autogen.sh
出现了如下错误:
: bad interpreter: No such file or directory
打开autogen.sh文件,发现了没有任何错误,猜想可能是一些不可见的非法字符引起的,用二进制方式打开该文件,发现它是dos格式的。需要转换成unix格式的。
索性用dos2unix把整个目录都转一遍。另外发现没有NEWS README AUTHORS 三个文件,为了避免出错,产生三个空文件:
[root@linux tslib]# touch NEWS README AUTHORS。
重新运行:
[root@linux tslib]# ./autogen.sh
一切OK!
现在来做真正的配置:
[root@linux tslib]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
配置成功,但make时,出现下列错误:
ts_test.o(.text+0x218): In function `main':
: undefined reference to `rpl_malloc'
在当前目录查找了rpl_malloc,发现configure里有#define malloc rpl_malloc一行。分析configure 脚本相关的代码,原来是ac_cv_func_malloc_0_nonnull引起的,OK我们不让它检查了,产生一个cache文件arm-linux.cache,欺骗configure:
[root@linux tslib]# echo "ac_cv_func_malloc_0_nonnull=yes" >$ ARCH -linux.cache
[root@linux tslib]# ./configure --prefix=$(ROOTFS_DIR)/usr --host=$ ARCH -linux --cache-file=$ ARCH -linux.cache
配置成功后,重新编译一下,OK!
3. 构建处方
l tslib.mk
TSLIB_DIR="tslib"
all: clean config build
config:
@cd $(TSLIB_DIR) &&find * -exec dos2unix {} /; &&/
touch NEWS README AUTHORS &&/
./autogen.sh &&/
echo "ac_cv_func_malloc_0_nonnull=yes" >$$ARCH-linux.cache &&/
./configure --prefix=$$ROOTFS_DIR/usr --host=$$ARCH-linux --cache-file=$$ARCH-linux.cache &&/
echo "config done"
build:
@cd $(TSLIB_DIR) &&/
make &&make install &&/
echo "build done"
clean:
@cd $(TSLIB_DIR) &&/
if [ -e Makefile ]; then make distclean; fi &&/
echo "clean done"
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=646446
本文转自
http://blog.csdn.net/absurd/archive/2006/03/31/646446.aspx
交叉编译场景分析(arm-linux)(二)--编译tslib
转载时请注明出处:http://blog.csdn.net/absurd
1. 基本信息:
软件名称 tslib
功能简述 tslib 是一个触摸屏的库,它提供诸如滤波、去抖、校准之类的功能,为不同的触摸屏提供了一个统一的接口。
下载地址 export CVSROOT=:pserver:cvs@pubcvs.arm.linux.org.uk:/mnt/src/cvsroot
cvs login
cvs co tslib
软件版本 2006-3-28 cvs 版本
依赖关系 默认
前置条件 源文件位置: $(WORK_DIR)/tslib
2. 过程分析
因为是cvs版本,所以先要生成configure脚本,tslib提供了一个autogen.sh文件,自然是用autogen.sh去产生了。运行:
[root@linux tslib]# ./autogen.sh
出现了如下错误:
: bad interpreter: No such file or directory
打开autogen.sh文件,发现了没有任何错误,猜想可能是一些不可见的非法字符引起的,用二进制方式打开该文件,发现它是dos格式的。需要转换成unix格式的。
索性用dos2unix把整个目录都转一遍。另外发现没有NEWS README AUTHORS 三个文件,为了避免出错,产生三个空文件:
[root@linux tslib]# touch NEWS README AUTHORS。
重新运行:
[root@linux tslib]# ./autogen.sh
一切OK!
现在来做真正的配置:
[root@linux tslib]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
配置成功,但make时,出现下列错误:
ts_test.o(.text+0x218): In function `main':
: undefined reference to `rpl_malloc'
在当前目录查找了rpl_malloc,发现configure里有#define malloc rpl_malloc一行。分析configure 脚本相关的代码,原来是ac_cv_func_malloc_0_nonnull引起的,OK我们不让它检查了,产生一个cache文件arm-linux.cache,欺骗configure:
[root@linux tslib]# echo "ac_cv_func_malloc_0_nonnull=yes" >$ ARCH -linux.cache
[root@linux tslib]# ./configure --prefix=$(ROOTFS_DIR)/usr --host=$ ARCH -linux --cache-file=$ ARCH -linux.cache
配置成功后,重新编译一下,OK!
3. 构建处方
l tslib.mk
TSLIB_DIR="tslib"
all: clean config build
config:
@cd $(TSLIB_DIR) &&find * -exec dos2unix {} /; &&/
touch NEWS README AUTHORS &&/
./autogen.sh &&/
echo "ac_cv_func_malloc_0_nonnull=yes" >$$ARCH-linux.cache &&/
./configure --prefix=$$ROOTFS_DIR/usr --host=$$ARCH-linux --cache-file=$$ARCH-linux.cache &&/
echo "config done"
build:
@cd $(TSLIB_DIR) &&/
make &&make install &&/
echo "build done"
clean:
@cd $(TSLIB_DIR) &&/
if [ -e Makefile ]; then make distclean; fi &&/
echo "clean done"
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=646446
本文转自
http://blog.csdn.net/absurd/archive/2006/03/31/646446.aspx
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(Arm-Linux)
- 交叉编译场景分析(arm-linux)
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(六)--编译TinyX
- 新手上路
- 切·格瓦拉魅力长存的传奇战士
- 2 String是最基本的数据类型吗?
- 3 int 和 Integer 有什么区别
- 交叉编译场景分析(arm-linux)(一)--基本知识
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 火影忍者377话在线观看更正版
- Sailing-Rod Stewart
- 放火墙的基本配置
- If it is not love… 如果这都不算爱
- Get-WmiObject 帮助信息
- [金融证券] 什么是"博傻"?
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 21世纪杯英文演讲赛特等奖:机会在前方(新增演讲视频推荐)