你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 10.10下Mini2440 tslib1.4移植

[日期:2011-04-09] 来源:Linux社区  作者:Charistain_huang [字体:大 中 小]

错误3:

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


错误4:

在开发板上运行校正程序时出现No raw modules loaded

解决方法是把  tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉。但记住不要在前面留有 空格 ,否则会出现错误4

错误5:
在开发板上运行校正程序时出现Segmentation fault
解决方法是看错误3。

2.tslib的移植
过程如下:
a.到/home/duancp/mytslib/下(你在./configure时设置的目录下)把mytslib下载到开板
/mnt/yaffs/(下载方式可参考文章 下载方式)
b.设置环境变量如下:(或者写成shell形式)
export T_ROOT=/mnt/yaffs/mytslib
export LD_LIBRARY_PATH=$T_ROOT/lib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=$T_ROOT/lib/ts
export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf
export TSLIB_CALIBFILE=/mnt/yaffs/pointercal( #tslib配置文件内容)我没有到 这 个文件,应该不设置也行

解释:
TSLIB_TSDEVICE //触摸屏设备文件名
Default (no inputapi): /dev/touchscreen/ucb1x00
Default (inputapi): /dev/input/event0
TSLIB_CALIBFILE //校准的数据文件,由ts_calibrate 校准程序生成
Default: ${sysconfdir}/pointercal
TSLIB_CONFFILE //配置文件名
Default: ${sysconfdir}/ts.conf
TSLIB_PLUGINDIR //插件目录
Default: ${datadir}/plugins
TSLIB_CONSOLEDEVICE //控制台设备文件名
Default: /dev/tty
TSLIB_FBDEVICE //FrameBuffer设备名
Default: /dev/fb0
以上环境变量在实际开发中的实际配置可以根据实际情况决定。
c.修改mytslib/etc/ts.conf文件,要不会出现错误2
使ts.conf文件如下:
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
即把tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉,不要在前面留有空格。
d. cd bin
./ts_test(执行测试程序即可,你可以在屏幕上看到测试点,则成功了)
注意:触摸屏的前提是你的触摸屏驱动已经写好,并加载进了内核.你可以测试有没有加载触摸屏驱动,cat /dev/input/event0(这只是我的板子上的触摸屏) ,手摸触摸屏,看终端有无显示,若有则表明正确。 如无则要加上触摸屏的驱动 insmod touchscreen.o(此驱动自己找)

编译tslib1.4的错误和解决方法:

错误1:

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


错误2:

在开发板上运行校正程序时出现No raw modules loaded

解决方法是把  tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉。但记住不要在前面留有 空格 ,否则会出现错误4


错误3:

在开发板上运行校正程序时出现Segmentation fault

解决方法是看错误2

错误4:
ts_open: No such file or directory                                             
环境变量没有设置好

linux
相关资讯       Ubuntu 10.10 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款