linux 内核配置lcd屏,移植lcd驱动和触摸屏驱动到linux3.4.2内核

1.lcd驱动

在移植Linux3.4.2内核和文件系统后,要测试在新内核下驱动

记得修改Makefile的lcd名字对应

编译内核

需要lcd.4.3.c驱动程序(对应s3c2440)发私信给我3127172734@qq.com

make menuconfig去掉原来的驱动程序

-> Device Drivers

-> Graphics support

S3C2410 LCD framebuffer support

make uImage

make modules

cp cfb*ko /work/nfs_root/fs_wzs

insmod cfbcopyarea.ko

insmod cfbfillrect.ko

insmod cfbimgblt.ko

insmod lcd.ko

echo hello > /dev/tty1  // 可以在LCD上看见hello

cat lcd.ko > /dev/fb0   // 花屏

结合buttons.ko

修改 /etc/inittab

tty1::askfirst:-/bin/sh

用新内核重启开发板

insmod cfbcopyarea.ko

insmod cfbfillrect.ko

insmod cfbimgblt.ko

insmod lcd.ko

insmod buttons.ko

可以实现在开发板上按3个按键输出ls

2.触摸屏

sudo apt-get install autoconf

sudo apt-get install automake

sudo apt-get install libtool

编译:

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

使用:

先安装s3c_ts.ko, lcd.ko

1.

修改 /etc/ts.conf第1行(去掉#号和第一个空格):

# module_raw input

改为:

module_raw input

2.在开发板终端输入

export TSLIB_TSDEVICE=/dev/event0/1记住先用insmod s3c_ts.ko 后看/dev/event*是哪个设备

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

可实现校准和画图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值