linux psplash开机进度条

如何去掉开机进度条

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颜色配置文件(背景色 进度条颜色等)



/* This is the overall background color */
#define PSPLASH_BACKGROUND_COLOR 0x00,0x00,0x00 //背景色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 //进度条颜色
/* This is the color of the progress bar background */
#define PSPLASH_BAR_BACKGROUND_COLOR 0x00,0x00,0x00//进度条背景颜色

设置进度条 高度宽度 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也要做相应覆盖
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值