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
總結
以上是生活随笔為你收集整理的FL2440移植LINUX-3.4.2 -- 按键驱动和触摸屏驱动移植的全部內容,希望文章能夠幫你解決所遇到的問題。