1 在arch/arm/mach-s3c2410/mach-smdk2410.c中添加
//lcd
#include <asm/arch/regs-lcd.h>
#include <asm/arch-s3c2410/fb.h>
//lcd
static struct s3c2410fb_mach_info s3c2410_lcd_info __initdata ={
.fixed_syncs = 0,
.regs = {
.lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
S3C2410_LCDCON1_TFT |S3C2410_LCDCON1_CLKVAL(3),
.lcdcon2 = S3C2410_LCDCON2_VBPD(2) |
S3C2410_LCDCON2_VFPD(70)|S3C2410_LCDCON2_VSPW(2) ,
.lcdcon3 = S3C2410_LCDCON3_HBPD(30) | S3C2410_LCDCON3_HFPD(15) ,
.lcdcon4 = S3C2410_LCDCON4_MVAL(13) | S3C2410_LCDCON4_HSPW(8),
.lcdcon5 = S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_INVVLINE
| S3C2410_LCDCON5_HWSWP | S3C2410_LCDCON5_PWREN
|S3C2410_LCDCON5_INVVFRAME,
},
.lpcsel = 0x0,
.gpccon = 0xaaaaaaaa,
.gpccon_mask = 0xffffffff,
.gpcup = 0x0,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0x0,
.gpdup = 0x0,
.gpdup_mask = 0xffffffff,
.width = 320,
.height = 240,
.xres = {320,320,320},
.yres = {240,240,240},
.bpp = {16,16,16},
};
//lcd init
static void __init smdk2410_lcd_init(void)
{
set_s3c2410fb_info(&s3c2410_lcd_info);
}
2 在文件最后MACHINE_END之前添加
.init_machine = smdk2410_lcd_init,
3 编译内核,选中所装驱动
#make menuconfig
Device Drivers >
Graphics support --->
<*> support for frame buffer devices
<*> S3C2410 LCD framebuffer support
Logo configuration ---> //开机画面的选择,可据个人需要更改
[*]Bootup logo
[*]Standard 224-color linux logo
4 开机画面的选择
首先把要开机Logo图片(png格式)放在linux2.6.14文件中的 drivers/video/logo中,终端选择进入drivers/video/logo目录,进行以下操作:
(假设开机图片名为linux.png)
# pngtopnm linux.png > linuxlogo.pnm
# pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
# pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm
# mv linuxlogo224.ppm logo_linux_clut224.ppm //替换原来的启动文件
去掉10 分钟关闭LCD 的方法:
注释掉drivers\char\vt.c 的blank_screen_t(unsigned long dummy)的函数内容,否则,lcd 会在10 分钟左右关掉显示