linux psplash开机进度条

2019-07-13 06:59发布

如何去掉开机进度条

ls -l /etc/rcS.d lrwxrwxrwx 1 root root 17 Aug 30 2018 S01psplash -> ../init.d/psplash lrwxrwxrwx 1 root root 16 Aug 30 2018 S02banner -> ../init.d/banner ......... lrwxrwxrwx 1 root root 19 Aug 30 2018 S99finish.sh -> ../init.d/finish.sh ​ 去掉S01psplash脚本

修改开机进度条及LOGO图片

官方源码下载地址 CSDN源码下载地址 编译参考 https://blog.csdn.net/liming8754955/article/details/78506247 https://blog.csdn.net/tbadolph/article/details/78105623 https://blog.csdn.net/Phoenix500526/article/details/51286795

修改相关源文件

psplash-config.h /* Text to output on program start; if undefined, output nothing */ #define PSPLASH_STARTUP_MSG "" /* Bool indicating if the image is fullscreen, as opposed to split screen */ #define PSPLASH_IMG_FULLSCREEN 0 /* Position of the image split from top edge, numerator of fraction */ //图像的位置从上边缘分割,分数的分子 #define PSPLASH_IMG_SPLIT_NUMERATOR 5 /* Position of the image split from top edge, denominator of fraction */ //图像的位置从顶部边缘分割,分数的分母 #define PSPLASH_IMG_SPLIT_DENOMINATOR 6 psplash-colors.h颜 {MOD}配置文件(背景 {MOD} 进度条颜 {MOD}等) /* This is the overall background color */ #define PSPLASH_BACKGROUND_COLOR 0x00,0x00,0x00 //背景 {MOD}rgb值 /* This is the color of any text output */ #define PSPLASH_TEXT_COLOR 0xFF,0xFF,0xFF//文本内容 /* This is the color of the progress bar indicator */ #define PSPLASH_BAR_COLOR 0xff,0x00,0x00 //进度条颜 {MOD} /* This is the color of the progress bar background */ #define PSPLASH_BAR_BACKGROUND_COLOR 0x00,0x00,0x00//进度条背景颜 {MOD} 设置进度条 高度宽度 psplash_draw_progress(psplash.c)函数中 /* 4 pix border */ //bar.png的(上下左右)边界到进度条区间隔4pix,如果间隔改了,此处应做修改. x = ((fb->width - BAR_IMG_WIDTH)/2) + 4 ; y = SPLIT_LINE_POS(fb) + 4; width = BAR_IMG_WIDTH - 8; height = BAR_IMG_HEIGHT - 8; 设置LOGO 进度条的坐标 /* Text to output on program start; if undefined, output nothing */ #define PSPLASH_STARTUP_MSG "" //文本信息 /* Bool indicating if the image is fullscreen, as opposed to split screen */ #define PSPLASH_IMG_FULLSCREEN 1 //为0时:LOGO 居中 //为1时:LOGO 上部分屏居中(height*PSPLASH_IMG_SPLIT_NUMERATOR/PSPLASH_IMG_SPLIT_DENOMINATOR) //屏分为上下两部分 上部分LOGO居中 下部分进度条居中 /* Position of the image split from top edge, numerator of fraction */ #define PSPLASH_IMG_SPLIT_NUMERATOR 5 /* Position of the image split from top edge, denominator of fraction */ #define PSPLASH_IMG_SPLIT_DENOMINATOR 6 生成Makefile 运行#./autogen.sh #!/bin/bash aclocal autoheader automake --add-missing autoconf #./configure --host=arm-linux CC=arm-linux-gnueabihf-g #设置交叉编译库 #./make-image-header.sh base-images/bar.png BAR #会生成bar-img.h #copy bar-img.h psplash-bar-img.h #./make-image-header.sh base-images/logo.png POKY#会生成logo-img.h #copy logo-img.h psplash-poky-img.h //或者psplash.c中 将#include "psplash-poky-img.h" 替换为#include "logo-img.h" #make 最后将psplash复制到/usr/bin/psplash 若修改了psplash也要做相应覆盖