개요

PSplash는 16bpp 또는 32bpp 프레임버퍼를 제공하는 임베디드 리눅스 장치들의 사용자 영역에서 그래픽으로 boot splash 화면을 보여주는 프로그램이다. PSplash는 libc 패키지에만 의존할 정도로 의존성이 낮으며 이미지와 텍스트를 보여주는 것이 가능하다.

사용법

psplash는 다음과 같이 server 프로그램을 동작 시키고 클라이언트 프로그램으로 msg와 progress bar를 조종하는 방법이 있다.

$ psplash -n&

아래 코드는 rotation으로 프로그램을 동작시켜 콘솔 메시지가 화면에 나타나지 않도록 하는 것이다.

rotation=0
if [ -e /etc/rotation ]; then
    read rotation < /etc/rotation
fi

/usr/bin/psplash --angle $rotation &

위와 같이 서버를 동작 시키고 psplash-write를 이용해 msg와 progress bar를 설정할 수 있다.

PROGRESS는 0-100의 값을 가지며 다음 명령으로 설정 가능하다.

psplash-write "PROGRESS 20"

MSG는 다음과 같이 입력 가능하다.

psplash-write "MSG Hello World!"

종료는 다음과 같이 입력 가능하다.

psplash-write "QUIT"

이미지 생성

psplash 패키지 안에 make-image-header.sh 스크립트가 존재하는데 png 파일을 매크로 해더파일로 만들어 주는 스크립트이다.

$ ./make-image-header.sh bootlogo.png HAND

위와 같이 입력하면 bootlogo-img.h 파일이 생성된다.

색상 설정

부팅 화면의 Background 색이나 기타 색 설정을 하기 위해서 psplash-colors.h 를 수정해준다.

/* This is the overall background color */
#define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1

/* This is the color of any text output */
#define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70

/* This is the color of the progress bar indicator */
#define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70

/* This is the color of the progress bar background */
#define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1

참고