Modify the Linux kernel startup logo and disable the startup cursor (original)
Yu Chao yuchao86@gmail.com
The image file types used in the Linux kernel are pnm and PPm. Therefore, before modifying the Linux kernel startup LOGO,
1. First, we need to introduce how to design a logo ppm image. First, we need to select a png image.
Use the following command to ensure that you have to install the following tools (pngtopnm, pnmquant, pnmtoplainpnm)
If no installation is available, you can use the sudo get-apt install netpbm command to install it,
In addition, you can also use the Linux LOGO making tool LogoMaker, which can be downloaded from the following sites:
Http://www.arm9.com.cn/downloads.htm. there are many resources on this site,
It is strongly recommended.
$ Pngtopnm linuxlogo.png> linuxlogo. pnm
$ Pnmquant 224 linuxlogo. pnm> linuxlogo224.pnm
$ Pnmtoplainpnm linuxlogo224.pnm> linuxlogo224.ppm
Or
$ BMP toppm linuxlog.bmp> temp1.ppm // generate ppm
$ Ppmquant 224 temp1.ppm> temp2.ppm // convert to 224 color
$ Pnmnoraw temp2.ppm> linuxlog. ppm // convert to ascii format
In this way, your logo is completely ready. Next let's look at how to configure the kernel.
Target: Use a custom ppm image to replace/Drivers/Video/logo/logo_linux_clut224.ppm
In addition, you can delete the logo_linux_clut224.c logo_linux_clut224.o file to recompile logo_linux_clut224.ppm.
2. Configure logo options
Run make menuconfig in the kernel path.
Device Drivers ---> character devices --- bootup logo
After completing the preceding two steps, you can recompile the kernel,
In this way, you can see your own logo. You can find a flashing cursor in the upper left corner of the logo.
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:
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
4. Another method to disable the cursor:
Drivers/video/console/Makefile
# Obj-$ (CONFIG_FRAMEBUFFER_CONSOLE) + = fbcon. o bitblit. o font. o softcursor. o
Obj-$ (CONFIG_FRAMEBUFFER_CONSOLE) + = fbcon. o bitblit. o font. o
Compilation encountered a problem that soft_cursor was not defined. Note the Code:
Drivers/video/console/bitbw.c
// ABING
// If (err)
// Soft_cursor (info, & cursor );
Make is required after modification.
Make out the required packages. If it is a development board, it is different,
Compile as needed,
This is a success !!
Whow .... One night's effort...