LCD驱动程序(四)测试

来源:互联网 发布:sqlserver is null 编辑:程序博客网 时间:2024/05/01 10:55

我们先把内核里面的LCD驱动程序给去掉

步骤

1.make menuconfig

2.找到里面的Graphics support(图形支持)

linux内核配置:


Device Drivers  --->
Graphics support  --->
<*> Support for frame buffer devices  --->


     │    <*>   S3C Framebuffer support                                    │ │  
  │ │    [ ]     SPLASH_SCREEN on LCD                                     │ │  
  │ │    [*]     LCD init in kernel                                       │ │  
  │ │    [ ]     S3C Framebuffer debug messages                           │ │  
  │ │    [ ]     S3C Framebuffer FIFO underrun trace                      │ │  
  │ │    (0)     Default Window (0-4)     //修改为0

保存退出,编译替换内核。

我们static struct fb_ops tiny_lcdfb_ops = {
.owner = THIS_MODULE,
.fb_setcolreg = tiny_lcdfb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
};这里面的这三个成员

.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,

在drivers/video这个里面

我们需要insmod cfbcopyarea.ko

insmod cfbfillrect.ko

insmod cfbimgblt.ko

然后再insmod lcd.ko


我们运行命令 echo hello > /dev/tty1  //可以在LCD上看到hello

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


 


0 0
原创粉丝点击