linux tslib-1.4移植
来源:互联网 发布:ember.js form表单 编辑:程序博客网 时间:2024/04/29 03:37
1、下载tslib-1.4.tar.gz:
http://download.csdn.net/source/3177449
2、解压安装tslib:
# tar -zxvf tslib-1.4.tar.gz
# cd tslib
# ./autogen.sh
# echo "ac_cv_func_malloc_0_nonnull=yes" > arm-none-linux-gnueabi.cache
# ./configure --host=arm-none-linux-gnueabi --cache-file=arm-none-linux-gnueabi.cache --prefix=/usr/local/tslib
# make
# sudo make install
3、修改ts.conf内容:
# vi /usr/local/tslib/etc/ts.conf
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
然后将整个tslib文件夹,下载到开发板的对应路径下(/usr/local)。
4、开发板配置环境变量:
通过超级终端,# vi /etc/profile
添加如下内容(绿色):
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/input/event0 #指定触屏设备
export TSLIB_CALIBFILE=/etc/pointercal #指定触摸屏校准文件 pintercal 的存放位置
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf #指定 TSLIB 配置文件的位置
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts #指定触摸屏插件所在路径
export TSLIB_FBDEVICE=/dev/fb0 #指定帧缓冲设备
export TSLIB_CONSOLEDEVICE=none #设定控制台设备为 none ,否则默认为 /dev/tty ,这样可以避免出“open consoledevice: No such file or directory KDSETMODE: Bad file descriptor ” 的错误
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
另外,要确保在/dev/input/目录下有event0设备文件,在/dev/目录下有fb0设备文件,如果没有,在执行下面./ts_calibrate 的时候,会报出“open *: No such file or directory ”的错误,这时,我们需要手动创建设备文件:
# mknod /dev/input/event0 c 13 64
# mknod /dev/fb0 c 29 0
5、执行测试命令:
重启开发板,在 /usr/local/tslib/bin 目录下,输入./ts_calibrate,出现tslib的触摸屏五点校准画面,至此,tslib的安装移植成功完成。
tslib 安装出错及解决
1.执行./autogen.sh
提示错误:./autogen.sh: 4: autoreconf: not found
解决方法:
sudo apt-get install autoconf automake libtool2.执行./configure --host=arm-Linux --prefix=/usr/local/tslib
提示错误:
ts_test.o(.text+0x218): In function `main':: undefined reference to `rpl_malloc'
fbutils.o(.text+0x234): In function `open_framebuffer':
: undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
make[2]: Leaving directory `/home/gfpeak/Desktop/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gfpeak/Desktop/tslib'
make: *** [all] Error 2
解决方法:
在编译的时候 ./configure 后面的参数没有设置对,正确设置如下:./configure --prefix=/usr/local/tslib/ --host=arm-linux ac_cv_func_malloc_0_nonnull=yes
3. 执行 make 出错
error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
解决方法:
修改cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR ,0)(据说是交叉编译器版本问题)4. 编译 QT 时报错找不到 tslib 库
交叉编译器是 arm-none-linux-gnu-eabi 4.2.0
5. 在开发板上运行校正程序时出现 No raw modules loaded
解决方法
把 tslib/etc 目录下的 ts.conf 的 "#module_raw input"的注释符号"#"去掉。但记住不要在前面留有空格 ,否则还会出现错误。
原文地址:
http://blog.chinaunix.net/uid-12461657-id-2975918.html
http://blog.csdn.net/lwbeyond/article/details/7694749
- linux tslib-1.4移植
- Linux移植随笔 tslib
- :移植tslib-1.4
- Tslib 1.4 移植
- tslib-1.4的移植
- tslib-1.4移植记录
- tslib-1.4移植
- tslib-1.4移植
- tslib-1.4 移植
- tslib-1.4移植
- Tslib-1.4的移植
- linux驱动摸索 --tslib移植
- linux arm移植触摸屏tslib
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植 (转)
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- tslib-1.4移植和使用
- Tslib-1.4的嵌入式移植
- Android 添加App快捷方式到桌面
- 3.31 java多线程与内存模型
- Android级连异步任务——Bolts-Android源码简单学习(二)
- Promise—javascript异步操作的潮流
- BigInteger权限判断示例
- linux tslib-1.4移植
- 打印十字架
- 【腾讯TMQ】十分钟学会Fiddler
- hdu 2196 【树形DP】
- 转 大白话系列之C#委托与事件讲解
- 字符串--单词查找树(trie)
- Linux 将一个用户添加到某一用户组中
- 把第三方的jar包一起打成一个jar包方法
- ifame实现左侧导航栏右侧内容