全部博文(156)
分类: LINUX
2010-10-02 19:43:32
#include
#include
#include
static struct s3c2410fb_mach_info smdk2410_lcdcfg __initdata={
.fixed_syncs= 0,
.regs={
.lcdcon1= (7<<8)|(0<<7)|(3<<5)|(12<<1),
.lcdcon2= (4<<24)|(239<<14)(4<<6)|4,
.lcdcon3= (13<<19)|(319<<8)|4,
.lcdcon4= (13<<8)|18,
.lcdcon5= (1<<11)|(1<<10)|(1<<9)|(1<<8)|(0<<7)|(0<<6)|(1<<3)|(0<<1)|(1),
},
.type=S3C2410_LCDCON1_TFT,
.lpcsel= ((0XCE6)&~7)|1<<4,//0x0,
.width= 320,//640,
.height= 240,//480,
.xres = {
.min = 322,
.max = 320,
.defval = 320,
},
.yres = {
.min = 240,
.max = 240,
.defval = 480,
},
.bpp = {
.min = 16,
.max = 16,
.defval = 16,
},
};
在smdk2410_init函数里添加:
static void __init smdk2410_init(void)
{
s3c24xx_fb_set_platdata(&smdk2410_lcdcfg);
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}
下面配置内核
Device Drivers --->
Graphics support --->
<*> S3C2410 LCD framebuffer support
<*> Virtual Frame Buffer support(ONLY FOR TESTING!)
Console display driver support --->
<*> Framebuffer Console support
[*] Framebuffer Console Rotation
[*] Select compiled-in fonts
[*] VGA 8x8 font
[*] VGA 8x16 font
[*] Mini 4x6 font
[*] Sparc console 8x16 font
[*] Bootup logo --->
--- Bootup logo
[*] Standard 224-color Linux logo
然后就是重新编译内核 ,tftp到开发板启动,应该就可以看到企鹅Tux了。但你如果想在LCD上显示自己的Logo,那下面我介绍一下自定义Logo的方法: