As described above, the default configuration of the system is to display the logo image at startup, that is, the logo_linux_clut224.ppm image under the drivers/Video/logo directory. But this logo is displayed in the upper left corner of the LCD, and there is an annoying cursor flashing. This article describes how to remove the cursor, display the logo in the center of the LCD, and finally shows how to add your own logo.
1. the logo is displayed in the middle of the LCD:
1. Modify the drivers/Video/fbmen. c file.
Modify rows 496th and 497:
496 // image. dx = 0;
497 // image. DY = y;
496 image. dx = (Info-> var. xres/2)-(logo-> width/2 );
497 image. DY = (Info-> var. yres/2)-(logo-> height/2 );
2. Modify Drivers/Video/console/fbcon. C.
Add a statement in row 588th:
587 logo_height = fb_prepare_logo (Info, OPS-> rotate );
588 logo_height + = (Info-> var. yres/2)-(logo_height/2); // Add a row
589 logo_lines = div_round_up (logo_height, VC-> vc_font.height );
Ii. Remove the cursor
In the drivers/Video/console/fbcon. c file, comment out the content in the fb_flashcursor function and the fbcon_cursor function to make it an empty function.
3. display your logo
My system is fedora17 with the GNU Image Processing Program (gimp), which can be used to convert any image into a 224 ppm file.
1. Open the image file, select the menu image --- à mode, and then select index color conversion. In the displayed window, set "Maximum number of colors" to 224, and click convert to close the window.
2. If the image pixel is greater than the LCD pixel, the image must be reduced. Otherwise, the image cannot be displayed. Select the menu image --- à zoom image and adjust the pixels in the window that opens.
3. Select File --- à export and save the image in ppm format in the window that opens. The image name is logo_linux_clut224.ppm, and the Save format is ASCII in the next window. In this way, the image in ppm format is ready.
4. Copy the created image to the drivers/Video/logo directory and replace the original file.
After the above three steps, restart the machine, your logo is displayed in the middle of the LCD, and when other images are displayed later, the cursor will disappear.