Create a Linux kernel startup logo in. ppm format

Source: Internet
Author: User
[Switch] Create a Linux kernel startup logo in. ppm format

In the products, it is definitely not good to use the default little penguin logo, so be sure to replace a decent corporate logo image!

I used to start the Linux logo. It took too long to forget it. So I will try again.

After searching and verifying on the internet, follow these steps to create a Linux Startup logo:

1. Install the netpbm package in Linux. I used fedora 10. The installation command was yum install netpbm. After installation, I found that there are still no related commands in the system, as shown below:

It seems that the related package is not completely installed, and the command Yum install netpbm * is used, and two packages are installed.

Dependencies resolved

========================================================== ==========================================================
Package arch version repository size
========================================================== ==========================================================
Netpbm-devel i386 10.47.04-1. fc10 updates 96 k
Netpbm-progs i386 10.47.04-1. fc10 updates 1.9 m

Now, we can see that related commands are available.

[Root @ localhost developer] # PNG
Pngcomp pngcrush pngnq pngtopam pngtopnm

2. Change the logo image to. ppm format. First, you must have personal screen images that are less effective than screen images, such as linux_iunin_logo.png.

① Convert a PNG Image to PNM

Pngtopnm linux_iunin_logo.png> linux_iunin_logo.pnm

② Limit the number of PNM images to 224 colors

Pn mquant 224 linux_iunin_logo.pnm> logo_iunin_clut224.pnm

③ Convert PNM images into the PPM we need

Pnmtoplainpnm logo_iunin_clut224.pnm> logo_iunin_clut224.ppm

You can also use software, such as the friendly loglmaker, to directly convert images to. ppm format.


3. Place the logo_iunin_clut224.ppm logo image in the appropriate place. Go to the drivers/Video/logo directory.

Move the logo_iunin_clut224.ppm logo to the drivers/Video/logo directory under the Linux Kernel Directory, re-compile the kernel, burn it to the board, and you will see your picture!


1. Conversion of ppm in Ubuntu:

Sudo get-apt install netpbm

You can use the topnm tools for BMP images, such as BMP toppm.jpg, PNG, and GIF.

$ BMP toppm pic.bmp> temp1.ppm // generate ppm
$ Ppmquant 224 temp1.ppm> temp2.ppm // convert to 224 color
$ Pnmnoraw temp2.ppm> logo. ppm // convert to ASCII format
Logo. ppm is the desired image.

2. Modify Kernel configuration options

(1) device drivers --->

Graphics support --->

[*] Boot logo --->

[*] Standard 224-color Linux logo

Support for Kernel logo

(2) device drivers --->

Graphics support --->

Console display driver support --->

<*> Framebuffer console support

If this option is not selected, it cannot be displayed on the screen.

After the source code is re-compiled, the replaced logo is started, but it is not displayed in the center full screen.

3. Center full screen display

(1) modify the fb_show_logo_line function in source code/driver/Video/fbmem. C.

// Image. dx = 0;

// Image. DY = y;

Image. width = logo-> width;

Image. heigh = logo-> height;


+ 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 source code/driver/Video/console/fbcon. C.

Add the following line of code after logo_height = fb_prepare_logo (Info, OPS-> rotate );

+ Logo_height + = (Info-> var. yres/2)-(logo_height/2 );

After the preceding method, you can see that the modified kernel logo is displayed in the center and full screen mode.

After the above method, the kernel logo can be displayed normally, but it will be refreshed quickly by the first logo (White "a n d r o I d" text) on Android boot, this will lead to a sudden sensation. In practice, we need to block it.

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: 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.