内核版本:linux 2.6.30.4
开发板:TQ2440
交叉编译环境:arm-linux-gcc 4.3.3
在linux 2.6.30.4/driver/video/s3c2410fb.c 第370添加两行:
struct s3c2410fb_mach_info *mach_info = fbi->dev->platform_data; struct s3c2410fb_display *default_display = mach_info->displays + mach_info->default_display;
//fbi->regs.lcdcon1 |= S3C2410_LCDCON1_CLKVAL(clkdiv); fbi->regs.lcdcon1 |= S3C2410_LCDCON1_CLKVAL(default_display->setclkval);
unsigned setclkval; /*clkval*/
下面修改LCD的参数,不同开发板的参数不一样,本文是基于4.3寸屏第参数:
修改108行为:
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, .height = 272, .pixclock = 40000, /* HCLK 100 MHz, divisor 1 */ .setclkval = 0x4, .xres = 480, .yres = 272, .bpp = 16, .left_margin = 19, .right_margin = 10, .hsync_len = 30, .upper_margin = 4, .lower_margin = 2, .vsync_len = 8, };
配置内核支持LCD:
Device Drivers --->
Graphics support --->
<*> Support for frame buffer devices --->
[*] Enable firmware EDID
[*] Enable Video Mode Handling Helpers
<*> S3C2410 LCD framebuffer support
Console display driver support --->
<*> Framebuffer Console Support
[*] Bootup Logo --->
<*> Standard 224-color Linux logo
重新编译uImage
出现小企鹅话画面。
制作自己的启动图片:
在Centos下打开Applictaions->Graphics->GNU Image Manipulation Program
选择自己的图片打开,鼠标移动到图片上右键Image->Mode->indexed... 把256改成224
右键File->Save as保存为logo_linux_clut224.ppm,确定后弹出一个对话框,选择Ascii,OK。
把这个文件复制到logo文件夹中就可以了。
drivers/video/logo/logo_linux_clut224.ppm
原文:http://blog.csdn.net/hanglinux/article/details/20305099