Modify the Linux kernel Boot logo and center full screen display

Source: Internet
Author: User


1. Prepare the picture



Using Ubuntu's own drawing software GIMP is the quickest way to use a command to convert a picture in a real-world test with a command to convert an old hint to an error, so it is handled in a GIMP way. The specific process is as follows:



(1) Open the GIMP software and load picture resources (File->open), their original image format should not be limited, my BMP format.



(2) Click Image->mode->indexed and set the Generate optimum palette under the pop-up option box maximum number of colors:224 the original value defaults to 255, Click the Convert button.



(3) Click File->save as, modify the picture file suffix to. ppm Click Save will pop up a small tab to select the data format, where you can choose to save ASCII.



(4) Rename the newly generated picture file to logo_linux_clut224.ppm and copy it to the/driver/video/logo/in the kernel source code, replacing the file with the same name. Delete the logo_linux_clut224.c and logo_linux_clut224.o two files, and the two files are automatically generated after recompilation.



Here the picture is ready ...



2. Modify Kernel configuration options



(1) Device Drivers--->



Graphics Support--->



[*] Boot Logo--->



[*] Standard 224-color Linux logo



Support Kernel logo



(2) Device Drivers--->



Graphics Support--->



Console Display Driver Support--->



<*> framebuffer Console Support



The item cannot be displayed on the screen without selecting it.



Re-compiling the source code is the replacement of the logo, but not the center full screen display.



3. Center Full Screen Display



(1) Modify the Fb_show_logo_line function in the source/DRIVER/VIDEO/FBMEM.C



image.dx=0;



Image.dy=y;



Image.width = logo->width;



Image.heigh = logo->height;



Increase



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



+image.dy = (INFO->VAR.YRES/2)-(IMAGE.HEIGHT/2);



(2) Modify the Fbcon_prepare_logo () function in the source/driver/video/console/fbcon.c



In logo_height = Fb_prepare_logo (info, ops->rotate), then add the following line of code



+logo_height + = (INFO->VAR.YRES/2)-(LOGO_HEIGHT/2);



After the above way recompile kernel boot will see the modified kernel logo can be centered full screen display.



Through the above way, the kernel logo can be displayed normally, but will be Android boot first logo (white "A N D R O I D" text) to quickly refresh off, resulting in a flash of the feeling. So it's actually going to block it out.


Related Article

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.