分类: LINUX
2009-03-20 14:44:38
一. 修改smdk2440_lcd_cfg结构,它在arch/arm/mach-s
static struct s
.regs = {
.lcdcon1 = S
S
S
.lcdcon2 = S
S
S
S
.lcdcon3 = S
S
S
.lcdcon4 = S
S
.lcdcon5 = S
S
S
S
S
},
/* 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 = S
.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
<*>S
Console display driver support--à
<*> framebuffer Console support
[ ]select compiled-in fonts
[*]bootup logo--à
[*]standard 224-color linux logo
三. make uImage,下载到板子上
四. 操作/dev/fb0绘制图像
#Mknod /dev/fb
#Fb_test /dev/fb0
五. 命令行参数加一项 console=tty1
六. 创建设备文件
#mknod /dev/tty
#mknod /dev/tty
#mknod /dev/tty
#mknod /dev/tty
#mknod /dev/tty
#mknod /dev/tty
#mknod /dev/tty
七.#echo hello>/dev/tty0 或者 >/dev/tty1命令可以在LCD上显示”hello”,