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也要做相应覆盖