Linux boot logo Creation

Source: Internet
Author: User

 

[From making a logo to LCD display or VGA display logo]
1. How to Create a logo:
First, select a local image. Then, use the gimpsoftware to save the image as. PNG,
The conversion method is not mentioned.
Then pass the image to a Linux PC, such as ubuntu. you can create your favorite logo in the following order.
Before you install the following tools (pngtopnm, pnmquant, pnmtoplainpnm)

$ Pngtopnm linuxlogo.png> linuxlogo. PNM
$ Pnmquant 224 linuxlogo. PNM> linuxlogo224.pnm
$ Pnmtoplainpnm linuxlogo224.pnm> linuxlogo224.ppm

Or

$ 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

In this way, your logo has been created successfully, and the linuxlogo224.ppm
Copy it to the/Drivers/Video/logo folder and name it based on the logo used by your platform,
Since I used RedHat Linux, the name I used is logo_linux_clut224.ppm. The friendly reminder is to save the original logo.

In. the xxx_xxx_xxx.c and xxx_xxx_xxx.o files under/Drivers/Video/logo/are generated after make compilation. use make clean sub_dir =. /Drivers/Video/logo/to clear. C and. o file.
In this way, your logo is completely created, but this is not enough. You must select the logo in the kernel. Next let's look at how to configure the kernel.

2. Configure logo options
Run make menuconfig in the kernel path.

Enable logo display on the Development Board

Device Drivers ---> character devices --- bootup logo

A. Select the virtual console to prepare for the console display driver.
Device Drivers ---> character devices ---> virtual terminal
[*] Support for console on virtual terminal
B. Select the virtual console display driver.
Device Drivers ---> graphics support ---> console display driver support --->
Select either framebuffer or VGA based on your hardware.
[*] Framebuffer console support or
[*] VGA text Console
C. Device Drivers ---> graphics support --->
<*> Support for frame buffer devices
<*> Select VGA or tvout under mxc framebuffer support.
[*] Tvout ch7024 on mx27 // tvout
[*] Support VGA daughter // VGA
Of course, the above configuration options may vary slightly from platform to platform.
After completing the above two steps, you can re-compile the kernel, burn it to the Development Board, and display it with VGA or tvout.
In this way, you can see your own logo. You can find a flashing cursor in the upper left corner of the logo. Next, let's talk about how to remove the cursor.

3. How to remove the cursor from the logo
Enter the drivers/Video/console/fbcon. c file in the current directory of the kernel.
Use static void fb_flashcursor (void * Private) as an empty function as follows:

386 static void fb_flashcursor (void * private)
387 {
388 # If 0 // modify by yejj for clear cursor of lcdc

389 struct fb_info * info = private;
390 struct fbcon_ops * Ops = Info-> fbcon_par;
391 struct display * P;
392 struct vc_data * Vc = NULL;
393 int C;
394 int mode;
395
396 acquire_lele_sem ();
397 if (OPS & OPS-> currcon! =-1)
398 Vc = vc_cons [OPS-> currcon]. D;
399
400 if (! VC |! Con_is_visible (VC) |
401 registered_fb [con2fb_map [VC-> vc_num]! = Info |
402 VC-> vc_deccm! = 1 ){
403 release_console_sem ();
404 return;
405}
406
407 P = & fb_display [VC-> vc_num];
408 c = scr_readw (2010*) VC-> vc_pos );
409 mode = (! OPS-> cursor_flash | OPS-> cursor_state.enable )?
410 cm_erase: cm_draw;
411 OPS-> cursor (VC, info, mode, softback_lines, get_color (VC, info, C, 1 ),
412 get_color (VC, info, C, 0 ));
413 release_console_sem ();
414 # endif
415}

In the same way, replace the static void fbcon_cursor (struct vc_data * VC, int mode) function with the following empty function:

1304 static void fbcon_cursor (struct vc_data * VC, int Mode)
1305 {
1306 # If 0 // modify by yejj for clear cursor of lcdc

1307 struct fb_info * info

 

Another way to disable the cursor:

Drivers/Video/console/makefile

# Obj-$ (config_framebuffer_console) + = fbcon. O bitbits. O font. O softcursor. oobj-$ (config_framebuffer_console) + = fbcon. O bitbits. O font. O compilation encounters a problem that is not defined by soft_cursor. Note the code: Drivers/Video/console/bitbits. C // abing // If (ERR) // soft_cursor (Info, & cursor );

Note ]:
Linux logo creation tool: logomaker. tgz 4.7 MB
Http://www.arm9.com.cn/downloads.htm
Logomakers allows you to easily create a Linux logo file, which is developed and used based on the fedora 9 platform. The method is very simple. Open a graphical file (in JPEG, BMP, or PNG format) and click the convert button. It will fix the output file name: logo_linux_clut224.ppm, this file is generally located in the kernel source code directory kernel-src/Drivers/Video/logo. After replacement, re-compile the kernel to see your favorite Linux logo.

Note: The logomaker program actually calls the netpbm tool group. Therefore, ensure that this tool is installed in your PC Linux system before conversion is successful.

 

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.

For other solutions, refer to blogs written by others:

Http://blog.chinaunix.net/u3/110679/showart_2170160.html

Http://blog.chinaunix.net/u2/67203/showart_1277576.html

In addition, the simplest way to create an image is as follows:

When using photeshopto make an image that is quite small with the LCD screen and save it in. PNG format, if it is not a PNG image, you can use gimp to convert it:
Convert a PNG Image to PNM
# Pngtopnm utulinux_logo.png> utulinux_logo.pnm
Then, set the PNM image color Quantity to 224.
# Pnmquant 224 utulinux_logo.pnm> utulinux_logo_224.pnm
Finally, convert the PNM image to the PPM we need.
# Pnmtoplainpnm utulinux_logo_224.pnm> utulinux_logo_224.ppm
However, replace utulinux_logo_224.ppm with the image corresponding to linuxsrc/Drivers/Video/logo. Note: In. the xxx_xxx_xxx.c and xxx_xxx_xxx.o files under/Drivers/Video/logo/are generated after make compilation. use make clean sub_dir =. /Drivers/Video/logo/to clear. C and. o file. Finally, you can directly make the compilation. After the compilation, you can download the internal files and you will see the corresponding results.
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.