1. 修改自定义数据成如下:
mach-smdkv210.c
|
static struct s3c_fb_pd_win smdkv210_fb_win0 = {
.win_mode = {
.left_margin = 26,
.right_margin = 210,
.upper_margin = 13,
.lower_margin = 22,
.hsync_len = 20,
.vsync_len = 10,
.xres = 800,
.yres = 480,
},
.max_bpp = 32,
.default_bpp = 16,
};2. 添加背光:
smdkv210_machine_init(void)
|
添加以下代码:
gpio_request(S5PV210_GPD0(0),"gpd0_blacklight");
gpio_direction_output(S5PV210_GPD0(0),1);
gpio_free(S5PV210_GPD0(0));3. 将driver/video/fbmem.c和s3c-fb.c这两层驱动编译到内核中:
在内核中:
make menuconfig
Device Drivers --->
Graphics support --->
<*> Support for frame buffer devices ---> // fbmem.c
<*> Samsung S3C framebuffer support // s3c-fb.c
Console display driver support --->
<*> Framebuffer Console support //内核启动的代码,会自动将启动logo图片放入到显存中显示
[*] Bootup logo ---> //启动logo图片
[*] Standard 224-color Linux logo (NEW)
make zImage -j2
cp -raf arch/arm/boot/uImage /tftpboot/
制作启动logo
1. jpg/bmp ---> 转换成ppm文件 (将图片转换为ppm格式,并放在内核路径下的 drivers/video/logo/ )
a, 制作ppm文件--gimp转换 (ppm图片的制作软件: 1.gtk+-2.10.13-setup 2.gimp-2.2.17-i586-setup)
b,编译进内核
logo_nexus_clut224.ppm
2. 在内核中编译一个文件: Kconfig 和 Makefile
2.1 drivers/video/logo$ vim Kconfig
30 config LOGO_NEXUS_CLUT224
31 tristate "My 224-color Nexus Logo"32 help
33 you can choose y/n/m to build it2.2 drivers/video/logo$ vim Makefile:
obj-$(CONFIG_LOGO_NEXUS_CLUT224) += logo_nexus_clut224.o
2.3 在启动的时候指定显示你自己做的logo
drivers/video/logo/logo.c
|
30 extern const struct linux_logo logo_nexus_clut224;
65if (depth >= 8) {
66#ifdef CONFIG_LOGO_NEXUS_CLUT2246768 logo = &logo_nexus_clut224;
69#endif2.4 在内核中要选择你的启动logo
make menuconfig
Device Drivers --->
Graphics support --->--- Bootup logo
x x [ ] Standard black and white Linux logo
x x [ ] Standard 16-color Linux logo
x x [ ] Standard 224-color Linux logo
x x <*> My 224-color Nexus Logo (选择自己制作的那个)
2.5 重新编译内核:
make zImage -j2
cp -raf arch/arm/boot/uImage /tftpboot/