- 论坛徽章:
- 0
|
一. 修改smdk2440_lcd_cfg结构,它在arch/arm/mach-s3c2440/mach-smdk2440.c文件中
static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {
.regs = {
.lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
S3C2410_LCDCON1_TFT |
S3C2410_LCDCON1_CLKVAL(0x04),
.lcdcon2 = S3C2410_LCDCON2_VBPD(1) |
S3C2410_LCDCON2_LINEVAL(319) |
S3C2410_LCDCON2_VFPD(5) |
S3C2410_LCDCON2_VSPW(1),
.lcdcon3 = S3C2410_LCDCON3_HBPD(36) |
S3C2410_LCDCON3_HOZVAL(239) |
S3C2410_LCDCON3_HFPD(19),
.lcdcon4 = S3C2410_LCDCON4_MVAL(13) |
S3C2410_LCDCON4_HSPW(5),
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
},
/* currently setup by downloader */
.gpccon = 0xaaaaaaaa,
.gpccon_mask = 0xffffffff,
.gpcup = 0xffffffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0xffffffff,
.gpdup = 0xffffffff,
.gpdup_mask = 0xffffffff,
.fixed_syncs = 1,
.type = S3C2410_LCDCON1_TFT,
.width = 240,
.height = 320,
.xres = {
.min = 240,
.max = 240,
.defval = 240,
},
.yres = {
.min = 320,
.max = 320,
.defval = 320,
},
.bpp = {
.min = 16,
.max = 16,
.defval = 16,
},
};
二. 配置内核以使用LCD:
Device Drivers--à
Graphics support--à
support for frame buffer device
S3C2410 LCD framebuffer support
Console display driver support--à
framebuffer Console support
[ ]select compiled-in fonts
bootup logo--à
standard 224-color linux logo
三. make uImage,下载到板子上
四. 操作/dev/fb0绘制图像
#Mknod /dev/fb0 c 29 0
#Fb_test /dev/fb0
五. 命令行参数加一项 console=tty1
六. 创建设备文件
#mknod /dev/tty0 c 4 0
#mknod /dev/tty1 c 4 1
#mknod /dev/tty2 c 4 2
#mknod /dev/tty3 c 4 3
#mknod /dev/tty4 c 4 4
#mknod /dev/tty5 c 4 5
#mknod /dev/tty6 c 4 6
七.#echo hello>/dev/tty0 或者 >/dev/tty1命令可以在LCD上显示”hello”,
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/93882/showart_1869911.html |
|