Ubuntu下交叉编译tslib-1.4记录

字体大小: 中小 标准 ->行高大小: 标准

在Ubuntu下移植好触摸屏的驱动后,一般都要移植一个tslib来配合,在用户层对触摸屏的数据进行滤波和矫正,同时也可以给应用程序一个统一的接口,很多GUI都支持tslib的接口.对于tslib的基础知识和移植,网上google一下就是一大把,下面简要地介绍一下我的交叉编译过程:

(1)下载最新版本的tslib,目前最新的是1.4版,下载方法是通过CVS下载:

$ mkdir - m777 cvs

$ cd cvs

$ export CVSROOT = : pserver : anoncvs@cvs . handhelds . org : / cvs

$ cvs login

Logging in to : pserver : anoncvs@cvs . handhelds . org : 2401 / cvs

CVS password : anoncvs

cvs login : CVS password file / home / daiq / . cvspass does not exist - creating a new file

$ cvs co apps / tslib

这样会在你的$PWD/cvs下建立一个 apps文件夹,其中的 tslib就是我们下载下来的源码.

(2)产生configure文件.

这里要先安装一些工具,我使用ubuntu9.10就不用安装,但是还是用新立得安装:autoconf、automake和libtool等软件包(新立得会自动添加其他需要的软件包).

sudo apt - get install m4 autoconf automake libtool

先设置好交叉编译环境:

$ export PATH = $ PATH : / work / cross / toolchain / gcc - 3 . 4 . 5 - glibc - 2 . 3 . 6 / arm - softfloat - linux - gnu / bin

$ export CC = arm - softfloat - linux - gnu - gcc

$ export CXX = arm - softfloat - linux - gnu - g + +

执行 ./autogen.sh

daiq@daiq - desktop : / work / cvs / apps / tslib$ . / autogen . sh

Libtoolize . . . libtoolize : putting auxiliary files in ` . '.

libtoolize: copying file `./ltmain.sh'

libtoolize : You should add the contents of the following files to `aclocal . m4 ':

libtoolize: `/usr/share/aclocal/libtool.m4'

libtoolize : ` / usr / share / aclocal / ltoptions . m4 '

libtoolize: `/usr/share/aclocal/ltversion.m4'

libtoolize : ` / usr / share / aclocal / ltsugar . m4 '

libtoolize: `/usr/share/aclocal/lt~obsolete.m4'

libtoolize : Consider adding `AC_CONFIG_MACRO_DIR ( [ m4 ] ) ' to configure.ac and

libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.

libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile . am .

Done .

Aclocal . . . Done .

Autoheader . . . Done .

Automake . . . configure . ac : 21 : installing ` . / config . guess '

configure.ac:21: installing `./config.sub'

configure . ac : 7 : installing ` . / install - sh '

configure.ac:7: installing `./missing'

plugins / Makefile . am : installing ` . / depcomp

Done.

Autoconf...Done.

Now you can do ./configure, make, make install.

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/50009.html