--------------------------------------------------------------------------------------------------------------------------------
系統環境:Centos 6.5
板子芯片:s3c2440
內核版本:linux 3.0
編譯器:arm-linux-gcc 4.5.4
作者:Lu Zengmeng <[email protected]>
--------------------------------------------------------------------------------------------------------------------------------
注:板子爲4.3寸屏
1、修改arch/arm/mach-s3c2440/mach-smdk2440.c,使開發板上的LCD資源可用
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 = 111111,
.xres = 480,
.yres = 272,
.bpp = 16,
.left_margin = 38,
.right_margin = 20,
.hsync_len = 30,
.upper_margin = 15,
.lower_margin = 12,
.vsync_len = 3,
};
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
.displays = &smdk2440_lcd_cfg,
.num_displays = 1,
.default_display = 0,
#if 0
/* currently setup by downloader */
.gpccon = 0xaa940659,
.gpccon_mask = 0xffffffff,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa84aaa0,
.gpdcon_mask = 0xffffffff,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
#endif
.lpcsel = 0,
};
2、配置menuconfig,使能LCD相關驅動
Device Drivers----->
Graphics support----->
<*> /dev/agpgart (AGP Support) --->
│ │ -*- VGA Arbitration
│ │ (64) Maximum number of GPUs
│ │ [*] Laptop Hybrid Graphics - GPU switching support
│ │ <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
│ │ < > Intel GMA500 Stub Driver (NEW)
│ │ {M} Lowlevel video output switch controls
│ │ {*} Support for frame buffer devices --->
--- Support for frame buffer devices
│ │ [*] Enable firmware EDID
│ │ [ ] Framebuffer foreign endianness support --->
│ │ [*] Enable Video Mode Handling Helpers
│ │ [ ] Enable Tile Blitting Support
│ │ *** Frame buffer hardware drivers ***
│ │ -*- Backlight & LCD device support --->
│ │ Display device support --->
│ │ Console display driver support --->
│ │ [*] Bootup logo --->
重新編譯內核燒錄後可看到屏幕左上角出現小企鵝,移植完成