linux 启动logo

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值