1:準備png圖片;
2:安裝netpbm
apt-get install netpbm
3:製作 ppm圖片
儲存一個png圖片logo.png,按如下方式操作:
#pngtopnm logo.png > linuxlogo.pnm
# pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
# pnmtoplainpnm linuxlogo224.pnm > logo_linux_clut224.ppm
將logo_linux_clut224.ppm 拷貝至drivers/video/logo/目錄下
4:配置核心
Device Drivers ->
Graphics Support ->
[*] Support for frame buffer devices
[*] VESA VGA graphics support
Console display driver support ->
[*] Video mode selection support
[*] Framebuffer Console support
[*]Select compiled-in fonts
[*]VGA 8x16 font
Logo configuration->
[*]Bootup logo
5:修改核心代碼
修改drivers/video/fbmem.c : 471-474行
image.dx = 0;
image.dy = y;
image.width = logo->width;
image.height = logo->height;
為
//image.dx = 0;
//image.dy = y;
image.width = logo->width;
image.height = logo->height;
image.dx=(info->var.xres - image.width)/2;
image.dy=(info->var.yres - image.height)/2;
修改drivers/video/console/fbcon.c, 在582行
logo_height = fb_prepare_logo(info, ops->rotate);
後面加入
logo_height += (info->var.yres - logo_height)/2;
重新編譯核心即可;
http://hi.baidu.com/steven926/blog/item/4724adfcdbd6163b5d6008b5.html