【linux】imx6开发板上配置串口触摸屏驱动

  1. 开启Framebuffer。
# make menuconfig
[*]VGA text console
[*]Video mode selection support
<*> Framebuffer Console support
  1. 将安装包/rtouch/目录内的"rtouch.c" 复制到"/kernel source code/drivers/input/touchscreen/"目录内。
  2. 编辑"/kernel source code/drivers/input/touchscreen/Makefile" , 加入:
obj-$(CONFIG_TOUCHSCREEN_RTOUCH) += rtouch.o
  1. 编辑"/kernel source code/drivers/input/touchscreen/kconfig" , 加入:
config TOUCHSCREEN_RTOUCH
tristate "Risintech serial touchscreens"
select SERIO
help
Say Y here if you have a Risintech serial touchscreen connected to
your system.
If unsure, say N.
To compile this driver as a module, choose M here: the
module will be called rtouch.
  1. 编辑kernel 的".config" 将SERIO 相关参数打开:
CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_RAW=y
CONFIG_INPUT_TOUCHSCREEN=y

并增加下行:

CONFIG_TOUCHSCREEN_RTOUCH=y
  1. 编译kernel。
  2. 并用新内核制作根文件系统。
  3. 将新根文件系统烧写到目标机上。
  4. 交叉编译机上执行安装包内/touchattach/目录内的cp.sh 编译touchattach,请自行修改cp.sh 加上自己的cross compiler。
  5. 将编译好的touchattach从交叉编译机复制到目标机的/usr/bin/下。
cp -f ./ touchattach /usr/bin
  1. 配置开机自启动触控屏幕 , 在/etc/loacl.rc 加入:
modprobe rtouch
touchattach -rtouch --daemon /dev/ttyXXX       # XXX根据实际情况而定
  1. 将触摸屏校正程序LinearAp拷贝值目标机的/usr/bin/。
  2. 执行校正程序,但是报错“touchscreen device not found!”
# LinearAp
发布了206 篇原创文章 · 获赞 12 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_43248127/article/details/104021540