• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 交叉编译tslib-1.4,运行./ts_calibrate提示:ts_open:ts_open no such file or directory 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
楼主  发表于: 2009-06-17 13:21

 交叉编译tslib-1.4,运行./ts_calibrate提示:ts_open:ts_open no such file or directory

大家好,今天编译tslib-1.4,
运行./ts_calibrate提示:ts_open:ts_open no such file or directory
运行./ts_test提示:dev/touchscreen/ucb1x00:no such file or directory

我的配置:./configure --host=$ARCH-linux --prefix=/usr/local --cache-file=$ARCH-linux.cache --enable-inputapi=no

在网上看到有人说是因为触摸屏驱动不支持ioctl操作(不知友善的2.6.29内核支持吗?),所以在配置时应该加上 --enable-inputapi=no
但是我加上了也是提示这个,
运行./ts_calibrate提示:ts_open:ts_open no such file or directory
运行./ts_test提示:dev/touchscreen/ucb1x00:no such file or directory
不知应不应该加,不过我看到一个人也是使用mini2440开发板,他就加了,而且也好使了,这是网址:http://blog.chinaunix.net/u1/34474/showart_1882664.html

说下我的配置吧

在/etc/init.d/rcS文件里添加

export TSLIB_ROOT=/usr/local(我的tslib放到这个文件夹里)
export TSLIB_TSDEVICE=/dev/event0(我看友善自带的就写的是:/dev/input/event0,但是/dev下没有input这个东西,只有event0,而且这两种写法我都试了,错误是一样的,不知该怎么写?)
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib

ts.conf文件
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear

大家看我配置的那里错了使用mini2440是否在配置tslib时添加 --enable-inputapi=no这个参数,TSLIB_TSDEVICE应该写哪个呢?
谢谢大家了
[ 此帖被maidisula在2009-06-17 13:28重新编辑 ]
级别: 侠客
UID: 4545
精华: 3
发帖: 88
金钱: 810 两
威望: 614 点
综合积分: 236 分
注册时间: 2009-03-19
最后登录: 2020-06-17
1楼  发表于: 2009-06-17 14:29
你敲env看看TSLIB_TSDEVICE=/dev/event0 等是否存在于环境变量中
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
2楼  发表于: 2009-06-17 14:42
谢谢长风的回复,我敲了结果是这样的:
USER=root                                                                      
SHELL=/bin/sh                                                                  
PATH=/sbin:/usr/sbin:/bin:/usr/bin                                              
TERM=vt102                                                                      
HOME=/                  

不仅TSLIB_TSDEVICE=/dev/event0没有,其他的也没有,这是怎么回事呢?

我把tslib的环境变量放到了/etc/init.d/rcS里,
为什么不好使呢?
使用env命令开不到设置的环境变量,但是要是每条都敲进去就好使,这是怎么回事呢?
[ 此帖被maidisula在2009-06-17 15:10重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-06-17 15:11
你怎么知道/etc/init.d/rcS就一定会被执行呢?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
4楼  发表于: 2009-06-17 15:43
应该是执行了啊,因为我在里面输出东西了
echo "Set ENV for tslib......"
export TSLIB_ROOT=/usr/local
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib

echo "/etc/init.d/rcS Done!"

在系统启动时这两句话都输出了,那就应该是执行了,
我在命令行里依次执行
export TSLIB_ROOT=/usr/local
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
这些,再使用env命令就能看到环境变量。
级别: 侠客
UID: 4545
精华: 3
发帖: 88
金钱: 810 两
威望: 614 点
综合积分: 236 分
注册时间: 2009-03-19
最后登录: 2020-06-17
5楼  发表于: 2009-06-17 15:54
把那些export  写到 /etc/profile 中去吧
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
6楼  发表于: 2009-06-17 15:56
上网查了一下,说是在shell里执行export只能影响当前这个脚本和它的子脚本,不能影响正在运行的登录 shell(当前shell).,所以没有作用,那要是这样的话,怎么才能让这几个环境变量开机就有用呢?
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
7楼  发表于: 2009-06-17 16:02
我写了,还是不好使啊,
/etc/profile文件

# /etc/profile: system-wide .profile file for the Bourne shells

echo
echo "Processing /etc/profile..."

# Set search library path
echo "Set search library path"
export LD_LIBRARY_PATH=/lib:/usr/lib

# Set user path
echo "Set user path"
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH

echo "Set ENV for tslib......"
export TSLIB_ROOT=/usr/local
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib

echo "/etc/profile Done!"
#echo

执行env还是没看到tslib环境变量!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-06-17 16:44
如果/etc/init.d/rcS是init进程执行的话,当前登录的shell是它的子进程,应该会继承这些环境变量。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 2535
精华: 0
发帖: 73
金钱: 690 两
威望: 626 点
综合积分: 146 分
注册时间: 2008-11-23
最后登录: 2011-12-15
9楼  发表于: 2009-06-17 17:09
我又修改了一下/etc/profile文件,重启系统后好使了,执行env可以看到设置的文件系统了,谢谢版主和长风的帮助,我会整理一个文档发出来,分享我的经验,谢谢大家
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go