Linux Modify Boot logo

Source: Internet
Author: User
Tags new set

The default boot logo will show a small penguin at the top left foot of the LCD screen, the resolution is 80*80, the Kernel/drivers/video/logo will have logo_linux_clut224.ppm this image, the program will be based on the image generated Logo_ LINUX_CLUT224.C and

LOGO_LINUX_CLUT224.O two files, eventually showing the little penguin on the LCD screen.

Here we need to modify the boot screen, and not limited to display only 80*80, if we need to display a full LCD screen image, what to do?

In order to be able to resume the display of this little penguin, here we add another set of data to display the full screen, if you do not have to recover later, the method is simpler:

One: Make the PPM image of LCD resolution;

Second: The production of PPM image is named logo_linux_clut224.ppm;

Three: Delete Kernel/drivers/video/logo under the logo_linux_clut224.c and logo_linux_clut224.o two files;

Four: Re-make to generate a new kernel image.

Here's how we add a new set of data to implement the boot logo:

First step: Add the configuration file in Kernel/drivers/video/logo kconfig:
#lqm added for XGD bootup logo.
Config logo_xgdlinux_clut224
BOOL "XGD 224-color Linux logo"
Default Y
#end added.

Step two: Make Menuconfig at this time, in the Bootup logo column will be more than one XGD 224-color Linux logo configuration options to choose from. Remove all other logo options, select XGD 224-color Linux logo, exit

Step three: Determine the resolution of the logo to be modified, first find a favorite picture, the picture is cut to the resolution you need, resolution can not exceed the LCD resolution, allow small but never allow large.

Seventh Step: Rename the image made above to logo_xgdlinux_clut224.ppm and place it in the/kernel/drivers/video/logo directory. Ensure that the directory does not have logo_xgdlinux_clut224.c and logo_xgdlinux_clut224.o two files, if any, delete.

Eighth step: Modify the Logo.c file under Kernel/drivers/video/logo:
LQM added for G300.
#ifdef config_logo_xgdlinux_clut224
Logo = &logo_xgdlinux_clut224;
#endif
End added.

Nineth Step: Modify the Kernel/include/linux/linux_logo.h file:
extern const struct Linux_logo logo_xgdlinux_clut224;//LQM added for G300

Tenth step: Modify the Makefile file under Kernel/drivers/video/logo:
obj-$ (config_logo_xgdlinux_clut224) + = logo_xgdlinux_clut224.o #lqm added

11th Step: Make generates a new kernel image

Through the above steps to complete their own definition of logo image modification.

=================================================================

Create logo Image:

1, the kernel default logo image for drivers/video/logo/logo_linux_clut224.ppm

File logo_linux_clut224.ppm

Get the size of the picture first, and then create a PNG image of the same size with tools like GIMP

2. Convert the PNG image you created into a 224-color ppm image

PNGTOPNM Logo.png | Ppmquant-fs 224 | PNMTOPLAINPNM > logo_linux_clut224.ppm

If you do not have the above conversion command, install the NETPBM toolkit

3, overwrite the original logo_linux_clut224.ppm file, if there is logo_linux_clut224.o and logo_linux_clut224.c file is deleted

Kernel configuration:

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

[*] Standard 224-color Linux logo

Recompile the kernel

4.logo Center:

1. Set the position of logo image in the screen

VI DRIVERS/VIDEO/FBMEM.C

Find the "fb_show_logo_line" function and put

IMAGE.DX = 0;

Image.dy = y;

Switch

IMAGE.DX = (INFO->VAR.XRES/2)-(610/2);

Image.dy = (INFO->VAR.YRES/2)-(206/2);

[Note]:

Info->var.xres and Info->var.yres are resolution sizes

610 and 206 are the size of the logo image

2.

VI drivers/video/console/fbcon.c

Find the "Fbcon_prepare_logo" function,

Logo_height = Fb_prepare_logo (info, ops->rotate);

After adding

Logo_height + = (INFO->VAR.YRES/2)-(206/2);

5. Add a new Image:

There is one sentence in makefile:extra-y + + $ (call logo-cfiles,_clut224,ppm)

It means to find a ppm picture that ends with "_clut224" at the moment, and then generates a. c file based on it, so adding a new picture name can look like this: logo_linux_sullg_clut224.ppm

1.Makefile, join a row

obj-$ (config_logo_linux_sullg_clut224) + = LOGO_LINUX_SULLG_CLUT224.O

2.Kconfig, join

Config logo_linux_sullg_clut224

BOOL "Standard 224-color Linux logos for Sullg"

Default Y

3.LOGO.C, join

extern const struct Linux_logo logo_linux_sullg_clut224;

Find "#ifdef config_logo_linux_clut224" in "Fb_find_logo" and join later:

#ifdef config_logo_linux_sullg_clut224

Logo = &logo_linux_sullg_clut224;

#endif

Reference: http://blog.csdn.net/zhangjie201412/article/details/7472903

Linux Modify Boot logo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.