移植LCD:(注:我的mini2440是256m的(不过这个没有影响),用的内核是2。6。30。4,这部可以实验成功,不过在屏幕上显示的时候,篇右,不知道如何修改)
转载:http://hi.baidu.com/wenes/blog/item/3018a1fac87dd9d3b48f312c.html
# gedit arch/arm/mach-s3c2440/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 = 240,
.height = 320,
.pixclock = 174757,
.xres = 240,
.yres = 320,
.bpp = 16,
.left_margin = 2,
.right_margin = 37,
.hsync_len = 6,
.upper_margin = 2,
.lower_margin = 6,
.vsync_len = 2,
};
|
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
.displays = &smdk2440_lcd_cfg,
.num_displays = 1,
.default_display = 0,
.gpccon = 0xaa955699,
.gpccon_mask = 0xffc003cc,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.lpcsel = 0xf82,
};
|
加入LCD背光:
# gedit arch/arm/mach-s3c2440/mach-smdk2440.c
因为mini2440的3.5英寸液晶显示屏的背光是由 S3C2440 的 GPG4 引脚来控制的,故下面的改动将开启背光:
static void __init smdk2440_machine_init(void)
{
s3c24xx_fb_set_platdata(&smdk2440_fb_info);
s3c_i2c0_set_platdata(NULL);
platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
smdk_machine_init();
//加入以下两句
s3c2410_gpio_cfgpin(S3C2410_GPG4,S3C2410_GPG4_OUTP);
s3c2410_gpio_setpin(S3C2410_GPG4,1);
}
|
加入RTC:(
这一步我也没有加上,因为我感觉没有必要)
# gedit arch/arm/mach-s3c2440/mach-smdk2440.c
static struct platform_device *smdk2440_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_rtc, //加入这一句
};
|
在开发板上测试:(这一步我没有实验)
[root@jjx /]# date -s 2009.11.11-10:58:00 //设置时期和日期
Wed Nov 11 10:58:00 UTC 2009
[root@jjx /]# date //查看
时期和日期
Wed Nov 11 11:12:09 UTC 2009
[root@jjx /]# hwclock -w //保存
时期和日期
然后在make menuconfig中设置:
选择编译内核
Device Drives-à
Graphics support->
<*>support for frame buffer devices
<*>s3c2410 LCD framebuffer support
Console display driver supportà
<*>Framebuffer Console support(上面这几相默认的都已经悬赏了)
[*] Bootup logo -à
[*] standard 224-color linux logo(这个是启动画面)
之后保存
make zImage 就Ok了
烧进去就可以看见企鹅了,但是这个只是lcd驱动,并不是触摸平驱动,所以还是进入不到图像界面的,后续还要移植触摸平驱动和鼠标驱动。
阅读(1216) | 评论(0) | 转发(1) |