linux psplash開機進度條
阿新 • • 發佈:2018-12-25
如何去掉開機進度條
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圖片
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也要做相應覆蓋