mysql change logo_Change boot logo

How to change Linux boot logofrom http://gentoo-wiki.com/HOWTO_Linux_Logo_Hack

As far as I know, this is the least "hacky" way you can get a custom

logo. It preserves all the previous available logos, and lets you

choose between them in the Kernel config.

It requires you to edit three files in the /usr/src/linux/drivers/video/logo

directory, and (obviously) create the image(s) you want to appear. It

only covers 224-colour logos - if you want 16-colour or black&white

ones, you'll have to figure that out on your own. I did all this

yesterday, and the kernel booted fine this morning with my new logo. I

changed Tux to Larry,

so that's the example I'll be using throughout this tutorial. Of course

you can change this to whatever you want - just make sure you're

consistant with your names (eg. don't accidentally switch from "LARRY"

to "BARRY" for one file).

OK, let's get down to it.

Create your image, (I used the GIMP), and save it as a PNG

(mine's called larry.png). It might be a good idea to convert it to

indexed (223 colours) first - this is going to happen later anyway, so

you may as well get it how you like it now (whether you want it

dithered, any custom palettes, etc). I should also point out that the

default images are all 80x80 pixels, but you don't have to abide by

that. As far as I know, you can go as big as you want (within reason).

Change to root, and put yourself in the directory we're working in:

$su -

$cd /usr/src/linux/drivers/video/logo/

Convert the image with the netpbm tools (media-libs/netpbm):

$pngtopnm /path/to/larry.png | ppmquant -fs 223 | pnmtoplainpnm > logo_larry_clut224.ppm

Don't worry if the existing images seem to have more than one file

each - the *.c and *.o ones get created automatically when you compile

the kernel.

Open Kconfig in your favourite editor, and insert the following section (editing the first two lines as appropriate):

File: /usr/src/linux/drivers/video/logo/Kconfig

config LOGO_LARRY_CLUT224

bool "Gentoo-ised 224-colour logo"

depends on LOGO

default y

I put it underneath the entry for LOGO_LINUX_CLUT224, so it'll appear below the default logos in the kernel setup.

Open logo.c in your favourite editor, and insert the

following sections. Everything's a bit more cosily packed in this file,

so make sure you get them in the right place. Again, change everything

that says "larry" to your chosen name. The bit between /* these

parentheses */ is a comment, and doesn't make any difference. I changed

it anyway.

File: /usr/src/linux/drivers/video/logo/logo.c

Add this to the block of similar definitions at the top of the file:

extern const struct linux_logo logo_larry_clut224;

Add this to the section headed by "if (depth >= 8) {":

#ifdef CONFIG_LOGO_LARRY_CLUT224

/* Gentoo-ised logo */

logo = &logo_larry_clut224;

#endif

Open Makefile ...blahblahblah... and add the following line to that big block of definitions at the top. You know the drill by now.

File: /usr/src/linux/drivers/video/logo/Makefile

obj-$(CONFIG_LOGO_LARRY_CLUT224)+= logo_larry_clut224.o

You should be able to repeat those steps however many times you like if you want to add more than one image.

Save all the files, cd down to /usr/src/linux, and follow your

normal kernel-rolling procedure - making sure that you select your new

image in the configuration:

Linux Kernel Configuration: Kernel 2.6

Device Drivers ->

Graphics Support ->

[*] Support for frame buffer devices

[*] VESA VGA graphics support

VESA driver type ->

Console display driver support ->

[*] Video mode selection support

Framebuffer Console support

Logo configuration->

[*] Bootup logo

[ ] [*] Your Custom Logo

...and run make. (There is no need to run make modules_install.)

Finishing Up

This section is common to both methods.

Stick your newly customised kernel in its usual place under /boot

Make sure you've got a decent framebuffer by adding vga=0x318 or similar to your kernel's command-line:

NOTE: You can ignore this step if you selected vesafb-tng under "VESA driver type".

File: /boot/grub/menu.lst or /boot/grub/grub.conf

kernel (hd0,0)/vmlinuz root=/dev/sda3 vga=0x318

When you boot into the new kernel, you should see the fruit of your labours!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值