操作环境:ubuntu 11.10

Arm-linux-GCC:  gcc version 4.5.2 (Sourcery G++ Lite 2011.03-42)

Linux内核版本:2.6.29.6

硬件平台:FS2410(S3C2410)

(1) 修改arch/arm/mach-s3c2410/mach-smdk2410.c文件:

   1)添加头文件引用:

#include <mach/fb.h>

 2)添加两个Struct:

/*****magc  start *****************************************************************************/

static struct s3c2410fb_display smdk2410_lcd_cfg __initdata = {
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
.type = S3C2410_LCDCON1_TFT,
.width = 320,
.height = 240,
.pixclock = 174757,
.xres = 320,
.yres = 240,
.bpp = 16,
.left_margin = 16,
.right_margin = 59,
.hsync_len = 9,
.upper_margin = 2,
.lower_margin = 6,
.vsync_len = 16,
};

static struct s3c2410fb_mach_info smdk2410_fb_info __initdata = {
.displays = &smdk2410_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,
};

/******magc end *********************************************************************/

3)在smdk2410_init()函数中增加:

s3c24xx_fb_set_platdata(&smdk2410_fb_info);

(2) 配置内核:

# make menuconfig
    Device Drivers
    Graphics support→
       Support for frame buffer devices→

 

(3)重新编译内核

make zImage

这样得到的产物便支持LCD显示了