Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify Logo in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to modify Logo in Linux. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

1. Install pngtopnm tools.

$sudo apt-get install netpbm

Note: after installation, there will be three tools for pngtopnm,pnmquant,pnmtoplainpnm.

2. Select the image of logo:

First select a picture you like, and then save the picture in .png format through the GIMP software

For example, save as dianyu.png. Need to pay attention to set the size of the picture, can not exceed the size of the screen resolution, otherwise the picture will not be displayed on the screen.

3. Make pictures in .ppm format:

$pngtopnm dianyu.png > dianyu.pnm

$pnmquant 224 dianyu.pnm > dianyu.pnm

$pnmtoplainpnm dianyu224.pnm > dianyu224.ppm

Or

$bmptoppm linuxlogo.bmp > dianyu.ppm / / generate ppm

$ppmquant 224 linuxlogo.ppm > dianyu224.ppm / / convert to 224 colors

$pnmnoraw linuxlogo224.ppm > dianyu224.ppm / / convert to ascii format

4. Replace the original picture.

$make clean SUB_DIR=./drivers/video/logo/ to clear the .c and .o files in the logo directory

Note: the picture of the board is called logo_linux_clut224.ppm, so just replace it with the picture generated in step 3.

Improve the article:

It is easy to find that for a general vga console,logo, it is displayed by the fb_show_logo () function in drivers/video/fbmem.c.

The caller of this function is drivers/video/console/fbcon.c. This function doesn't do much, so

First convert the bitmap with non-8-bit color depth to 8-bit color depth, and then use info- > fbops- > fb_imageblit (info, & image); to display the logo, there is one logo when there is a cpu, two when there are two cpu, and so on.

Modify the logo height:

File drivers/video/console/fbcon.c

{{

Logo_height = fb_prepare_logo (info, ops- > rotate) + xxxxxxx; / / add or subtract the corresponding xxxxxxx to achieve height adjustment.

Logo_lines = DIV_ROUND_UP (logo_height, vc- > vc_font.height)

}}

U-boot LOGO modification:

How to change the startup logo of Uboot:

1. Go to the tools directory, and in this directory you will see a directory called logos, which contains the logo icon

You can add the logo icon to the directory, pay attention to the 256colors, and also note that the size of the picture is smaller than your screen resolution.

How to make a 256color bitmap: use the computer's own drawing tool to open and save as a bmp picture, set the save type to 256color bitmap.

2. Open the Makefile file in the tools directory. Between lines 187 and 200, there is the following code:

# Generic logo

Ifeq ($(LOGO_BMP),)

LOGO_BMP= $(srctree) / $(src) / logos/denx.bmp

# Use board logo and fallback to vendor

Ifneq ($(wildcard $(srctree) / $(src) / logos/$ (BOARD) .bmp),)

LOGO_BMP= $(srctree) / $(src) / logos/$ (BOARD) .bmp

Else

Ifneq ($(wildcard $(srctree) / $(src) / logos/$ (VENDOR) .bmp),)

LOGO_BMP= $(srctree) / $(src) / logos/$ (VENDOR) .bmp

Endif

Endif

Endif #! LOGO_BMP

3. "freescale.bmp" is the logo icon. You can replace him with your favorite icon.

4, in the common directory, open the lcd.c file, you can change the location of the logo, the coordinate function is lcd_logo_plot (0Magne0); change the number of XMagi y to change the display position of the logo. The function is on line 722 of the lcd.c code

5. Enter the u-boot root directory and execute make!

The above is how to modify Logo in Linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report