- 论坛徽章:
- 0
|
[color="#000000"]1、制作logo的方法:
首先选择一个自己喜欢的图片,然后通过GIMP软件将该图片保存为.png格式,
变换方式这个就不说了(very easy),比如保存为linuxlogo.png.
然后将该图片传入到装有Linux PC比如(ubuntu),按照以下顺序你就可以制作一个你喜欢logo
前提你必须安装以下的工具(pngtopnm,pnmquant,pnmtoplainpnm)
$ pngtopnm linuxlogo.png > linuxlogo.pnm
$ pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
$ pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm
这样您制作的logo就已经成功了,将linuxlogo224.ppm
拷贝到/drivers/video/logo文件夹中的根据你的平台具体使用的哪个logo进行命名,
由与我用的是freescal的i.mx27,所以我取的名字为logo_mx27ads_clut224.ppm,友情提醒将原有的logo保存。
这样你的logo就完全制作好了,但是有这一点还是不够的,你必须在内核中选择logo,接下来我们来看如何配置内核
2、配置logo选项
在内核路径下执行make menuconfig
a、选择虚拟控制台为控制台显示驱动做准备
Device Drivers --->Character devices ---> Virtual terminal
Support for console on virtual terminal
b、选择虚拟控制台显示驱动
Device Drivers --->Graphics support --->下有这个选项Console display driver support --->
根据你的硬件选择由Framebuffer还是VGA
Framebuffer Console support或者
VGA text console
c、Device Drivers --->Graphics support --->
Support for frame buffer devices
MXC Framebuffer support下选择是VGA还是TVOUT
tvout CH7024 on MX27 //TVOUT
support VGA daughter //VGA
当然以上的配置选项,因平台而异会有些小的差别。
做好以上两个步骤,你就可以重新编译内核,将其烧到开发板,接VGA或者TVOUT显示。
这样你可以看到你自己制作的logo,你可以发现在logo的左上角有一个闪动的光标,接下来我们说说如何将这个光标去除。
3、如何将开机logo中的光标去除
在内核的当前目录进入到drivers/video/console/fbcon.c文件
将static void fb_flashcursor(void *private)制成空函数如下
386 static void fb_flashcursor(void *private)
387 {
388 #if 0 //modify by yejj for clear cursor of lcdc
389 struct fb_info *info = private;
390 struct fbcon_ops *ops = info->fbcon_par;
391 struct display *p;
392 struct vc_data *vc = NULL;
393 int c;
394 int mode;
395
396 acquire_console_sem();
397 if (ops && ops->currcon != -1)
398 vc = vc_cons[ops->currcon].d;
399
400 if (!vc || !CON_IS_VISIBLE(vc) ||
401 registered_fb[con2fb_map[vc->vc_num]] != info ||
402 vc->vc_deccm != 1) {
403 release_console_sem();
404 return;
405 }
406
407 p = &fb_display[vc->vc_num];
408 c = scr_readw((u16 *) vc->vc_pos);
409 mode = (!ops->cursor_flash || ops->cursor_state.enable) ?
410 CM_ERASE : CM_DRAW;
411 ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
412 get_color(vc, info, c, 0));
413 release_console_sem();
414 #endif
415 }
同样的方法将函数static void fbcon_cursor(struct vc_data *vc, int mode)用空函数替换如下
1304 static void fbcon_cursor(struct vc_data *vc, int mode)
1305 {
1306 #if 0 //modify by yejj for clear cursor of lcdc
1307 struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
1308 struct fbcon_ops *ops = info->fbcon_par;
1309 int y;
1310 int c = scr_readw((u16 *) vc->vc_pos);
1311
1312 if (fbcon_is_inactive(vc, info))
1313 return;
1314
1315 ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
1316 if (mode & CM_SOFTBACK) {
1317 mode &= ~CM_SOFTBACK;
1318 y = softback_lines;
1319 } else {
1320 if (softback_lines)
1321 fbcon_set_origin(vc);
1322 y = 0;
1323 }
1324
1325 ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1),
1326 get_color(vc, info, c, 0));
1327 vbl_cursor_cnt = CURSOR_DRAW_DELAY;
1328 #endif
1329 }
这样制作的logo就完美了。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/91092/showart_1896934.html |
|