免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1470 | 回复: 0
打印 上一主题 下一主题

移植Linux 2.6.30.4到mini2440(触摸屏) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-24 23:19 |只看该作者 |倒序浏览

                                                                                                13)、加入触摸屏1.# gedit drivers/input/touchscreen/Makefile在最后加入下面一句  
[color="#0001ff"]      obj-$(CONFIG_TOUCHSCREEN_S3C2410) += s3c2410_ts.
2.# gedit drivers/input/touchscreen/Kconfig
在12行找到
[color="#0001ff"]       if INPUT_TOUCHSCREEN
在其后加入以下
[color="#0001ff"]
[color="#0001ff"]config TOUCHSCREEN_S3C2410     tristate "Samsung S3C2410 touchscreen input driver"     help          Say Y here if you have the s3c2410 touchscreen.          If unsure, say N.          To compile this driver as a module, choose M here: the          module will be called s3c2410_ts.
3. # gedit drivers/char/Makefile
找到
[color="#000000"]        obj-$(CONFIG_JS_RTC)        += js-rtc.o        js-rtc-y = rtc.o
在其后加入下面一句
[color="#000000"]        obj-$(CONFIG_MINI2440_ADC)    += mini2440_adc.o
# gedit drivers/char/Kconfig
找到
[color="#000000"]config DEVKMEM     bool "/dev/kmem virtual device support"     default y     help         Say Y here if you want to support the /dev/kmem device. The         /dev/kmem device is rarely used, but can be used for certain         kind of kernel debugging operations.         When in doubt, say "N".
在其后加入以下
config MINI2440_ADC   bool "ADC driver for FriendlyARM Mini2440/QQ2440 development boards"   default y if MACH_FRIENDLY_ARM_MINI2440   help       this is ADC driver for FriendlyARM Mini2440/QQ2440 development boards       Notes: the touch-screen-driver required this option
4.在 drivers/char放入 友善的 s3c24xx-adc.h mini2440_adc.c
在 drivers/input/touchscreen/ 放入 友善的 s3c2410_ts.c5.配置: # make menuconfig
[color="#660199"]   修改
        Device drivers -> Input device support ->(320)   Horizontal screen resolution                                                                       (240)   Vertical screen resolution  
      选中         Device drivers -> Input device support -> Touchscreen -> Samsung S3C2410 touchscreen input driver          Device drivers -> character devices -> ADC driver for FriendlyARM Mini2440/QQ2440 development boards
[color="#660099"]6.[color="#006666"]# make zImage[color="#ff0000"]发现触摸屏已经可以用,但Qtopia毫无反应!
[color="#000000"]开发板上操作:
[color="#000000"]
# cat /etc/init.d/rcS
....../bin/qtopia &
[color="#000000"]可以看到在最后,正是通过这句来启动Qtopia,/bin/qtopia是一个脚本# cat /bin/qtopia
[color="#000000"]
#!/bin/shexport TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=/usr/local/etc/ts.confexport TSLIB_PLUGINDIR=/usr/local/lib/tsexport TSLIB_CALIBFILE=/etc/pointercalexport QTDIR=/opt/qtopiaexport QPEDIR=/opt/qtopiaexport PATH=$QTDIR/bin:$PATHexport LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$LD_LIBRARY_PATHexport QWS_DISPLAY="linuxFB:mmWidth35:mmHeight45:0"TS_INFO_FILE=/sys/devices/virtual/input/input0/uevent                      if [ -e $TS_INFO_FILE -a "/bin/grep -q TouchScreen         export QWS_MOUSE_PROTO="TPanel:/dev/input/event0 USB:/dev/input/mice"           if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then                                rm /etc/pointercal                                                      fi                                                                      else                                                                                    export QWS_MOUSE_PROTO="USB:/dev/input/mice"                                    >/etc/pointercal                                                        fi                                                                              unset TS_INFO_FILE                                                                                                                                              export QWS_KEYBOARD=TTY:/dev/tty1                                               export KDEDIR=/opt/kde                                                                                                                                          export HOME=/root                                                                                                                                               exec $QPEDIR/bin/qpe 1>/dev/null 2>/dev/null   
[color="#000000"]# cd /sys# find -name uevent未能找到/sys/devices/virtual/input/input0/uevent 但找到了/sys/class/class/input/input0/uevent   
修改 TS_INFO_FILE=/sys/class/class/input/input0/uevent
OK!

[color="#02368d"]

[color="#02368d"]移植Linux 2.6.30.4到mini2440(USB配置)


[color="#02368d"]


[color="#02368d"]

               
               
               
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/49274/showart_2059502.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP