您的位置:首页 > 运维架构 > Linux

linux系统修改启动logo的步骤

2015-10-13 16:26 495 查看
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;

重新编译内核即可;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: