FL2440移植LINUX-3.4.2 (七)--驱动移植LCD(移植自己写的和移植内核自带的)
2014-10-11 17:27
656 查看
移植;
1.编译
2.解决错误
2.1头文件不对:去掉或更改
2.2宏不对:改名,使用新宏
2.3 函数没有了:改名使用新函数
(一):移植自己写的LCD驱动:
修改内核配置:
│ Location: │
│ -> Device Drivers │
│ -> Graphics support │
│ -> Support for frame buffer devices (FB [=y])
│ <M> S3C2410 LCD framebuffer support
一定选上这个:
│ -> Device Drivers │
│ -> Graphics support │
│ -> Console display driver support
<*> Framebuffer Console support
make zImage
make modules
使用最新的根文件系统
cd linux-3.4.2/drivers/video
拷贝这三个模块到网络文件系统下:
cfbcopyarea.ko cfbfillrect.ko cfbimgblt.ko
启动新系统:
/ # insmod cfbcopyarea.ko
/ # insmod cfbimgblt.ko
/ # insmod cfbfillrect.ko
/ # insmod lcd.ko
lcd移植成功。
(二)下面把内核自带的Lcd驱动编译到内核里面:
修改内核mach-smdk2440.c文件:
修改内核配置:
│ Location: │
│ -> Device
Drivers
│
│ -> Graphics
support
│
│ -> Support for frame buffer devices (FB [=y])
│ <*> S3C2410 LCD framebuffer support
如果选上这个将会在lcd上显示linux的LOGO:
Location:
│
│ -> Device
Drivers
│
│ -> Graphics support
│ [*] Bootup logo --->
编译内核,启动,就有小企鹅了。
1.编译
2.解决错误
2.1头文件不对:去掉或更改
2.2宏不对:改名,使用新宏
2.3 函数没有了:改名使用新函数
(一):移植自己写的LCD驱动:
修改内核配置:
│ Location: │
│ -> Device Drivers │
│ -> Graphics support │
│ -> Support for frame buffer devices (FB [=y])
│ <M> S3C2410 LCD framebuffer support
一定选上这个:
│ -> Device Drivers │
│ -> Graphics support │
│ -> Console display driver support
<*> Framebuffer Console support
make zImage
make modules
使用最新的根文件系统
cd linux-3.4.2/drivers/video
拷贝这三个模块到网络文件系统下:
cfbcopyarea.ko cfbfillrect.ko cfbimgblt.ko
启动新系统:
/ # insmod cfbcopyarea.ko
/ # insmod cfbimgblt.ko
/ # insmod cfbfillrect.ko
/ # insmod lcd.ko
lcd移植成功。
(二)下面把内核自带的Lcd驱动编译到内核里面:
修改内核mach-smdk2440.c文件:
/* LCD driver info */ static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = { .lcdcon5 = S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_INVVLINE | S3C2410_LCDCON5_INVVFRAME | S3C2410_LCDCON5_PWREN | S3C2410_LCDCON5_HWSWP, .type = S3C2410_LCDCON1_TFT, .width = 480, /* by zhutao */ .height = 272, /* by zhutao */ /*Set value from LCD datasheet, pixclock set refer to *document linux-3.0/Documentation/fb/framebuffer.txt */ #if 0 .pixclock = 166667, // HCLK 60 MHz, divisor 10 .xres = 240, .yres = 320, .bpp = 16, .left_margin = 20, .right_margin = 8, .hsync_len = 4, .upper_margin = 8, .lower_margin = 7, .vsync_len = 4, #endif /* by zhutao */ .pixclock = 111111, /* Dclk-Period =>1000000/Dclk=1000000/9*/ .xres = 480, /* Hsync Display Period =>Thd 480*/ .yres = 272, /* Vsync Display Period =>Tvd 272*/ .bpp = 16, /* 16 bpp*/ .left_margin = 2, /* Hsync Front-Porch =>Thf 2*/ .right_margin = 2, /* Hsync Back-Porch =>Thb 2*/ .hsync_len = 40, /* Hsync Pulse Width =>Thp 41*/ .upper_margin = 2, /* Vsync Front-Porch =>Tvf 2*/ .lower_margin = 2, /* Vsync Back-Porch =>Tvb 2*/ .vsync_len = 10, /* Vsync Pulse Width =>Tvp 10*/ /* by zhutao */ }; static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = { .displays = &smdk2440_lcd_cfg, .num_displays = 1, .default_display = 0, #if 0 /* currently setup by downloader */ .gpccon = 0xaa940659, .gpccon_mask = 0xffffffff, .gpcup = 0x0000ffff, .gpcup_mask = 0xffffffff, .gpdcon = 0xaa84aaa0, .gpdcon_mask = 0xffffffff, .gpdup = 0x0000faff, .gpdup_mask = 0xffffffff, #endif // .lpcsel = ((0xCE6) & ~7) | 1<<4, /* by zhutao */ .lpcsel = ((0xCE6) & ~7) | 1<<1, /* by zhutao */
修改内核配置:
│ Location: │
│ -> Device
Drivers
│
│ -> Graphics
support
│
│ -> Support for frame buffer devices (FB [=y])
│ <*> S3C2410 LCD framebuffer support
如果选上这个将会在lcd上显示linux的LOGO:
Location:
│
│ -> Device
Drivers
│
│ -> Graphics support
│ [*] Bootup logo --->
编译内核,启动,就有小企鹅了。
相关文章推荐
- FL2440移植LINUX-3.4.2 -- 内核自带的触摸屏驱动移植
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- 【移植驱动到Linux3.4.2内核之二】LCD,触摸屏,按键,USB等驱动程序的移植心得总结
- Linux4.3.2内核自带LCD驱动移植
- linux-2.6.32内核LCD驱动移植
- Linux-2.6.32.2内核在mini2440上的移植(五)---添加LCD背光驱动
- 【引用】Linux-2.6.32.2内核在mini2440上的移植(七)---LCD驱动移植
- linux-2.6.32内核LCD驱动移植-1
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植 (转)
- linux-2.6.26.5内核的&nbsp;lcd驱动移植…
- linux-3.4.2 s5pv210 LCD驱动移植(一)
- 基于tiny210v2的linux-3.9.6内核驱动移植3:LCD移植
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- linux-2.6.26.5内核的&nbsp;lcd驱动移植…
- Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动
- Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动
- Linux-2.6.32.2内核在mini2440上的移植(六)---LCD驱动移植
- 【引用】Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动
- Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动