FL2440移植LINUX-3.4.2 -- 按键驱动和触摸屏驱动移植

(一)先移植按键输入子系统驱动:

拿过去编译,改错,然后insmod;

(二)触摸屏驱动拿过去编译,改错,然后insmod;

触摸屏驱动的使用:

编译:
tar xzf tslib-1.4.tar.gz
cd tslib
./autogen.sh  
 
mkdir tmp
echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=$(pwd)/tmp
make
make install
 
安装:
cd tmp
cp * -rf /nfsroot
 
修改 /etc/ts.conf第1行(去掉#号和第一个空格):
# module_raw input
改为:
module_raw input


使用:
 
1.启动系统,先安装驱动buttons.ko , s3c_ts.ko

2. 设置环境变量:
export TSLIB_TSDEVICE=/dev/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0

ts_calibrate
 
ts_test
 

 

 

安装tslib中遇到的错误:./autogen.sh: 4: autoreconf: not found

修改方法:

 

   ./autogen.sh: 4: autoreconf: not found
  是在不同版本的 tslib 下执行 autogen.sh 产生。它们产生的原因一样,是
因为没有安装
  automake 工具,      (ubuntu 8.04)用下面的命令安装好就可以了。
  sudo apt-get install autoconf automake libtool

 

测试屏幕校准ts_calibrate 出错:selected device is not a touchscreen I understand

修改方法:

tslib:
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/linux/input.h
#define EV_VERSION       0x010000
改为
#define EV_VERSION        0x010001

然后重新编译:
cd tslib
make clean
make
make install
 
重新安装:
cd tmp
cp * -rf /home/chris/nfs_work
 
修改 /etc/ts.conf第1行(去掉#号和第一个空格):
# module_raw input
改为:
module_raw input
 
再来测试:
export TSLIB_TSDEVICE=/dev/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
 
ts_calibrate
 
ts_test
            
 
0x00076617 0x00000003 0x00000018 0
0x00076617 0x00000003 0x00000018 0
0x00076617 0x00000003 0x00000018 0
0x00076617 0x00000003 0x00000018 0
0x00076617 0x00000003 0x00000018 0
0x0007661b 0x00000003 0x00000018 0
0x0007661b 0x00000003 0x00000018 0
0x0007661b 0x00000003 0x00000018 0
0x0007661b 0x00000003 0x00000018 0

 

转载于:https://www.cnblogs.com/chrispauls/p/4020559.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值