Create custom Linux-based systems - psplash

psplash란?

splash란 linux 환경에 진입하는 과정을 그래픽으로 나타내는 도구입니다.
ubuntu의 splash 이미지

Yocto Project에서 splash 사용하기
yocto에서는 부팅(bootloader,kernel) 이후 rootfs에서 동작하는 splash tool을 제공합니다.

meta/recipes-core/psplash/psplash_git.bb

아래와 같이 image에 추가할 수 있습니다.

i.e) my-image.bb 이미지를 사용하는 경우
IMAGE_INSTALL += "psplash"

기본으로 제공되는 splash 이미지는 openembedded 화면이 표시가 됩니다.

이미지 바꾸기

첫번째 방법. 이미지로 헤더를 추출하여 바꾸기

이미지를 바꾸기 위해서는 먼저 myimage.png -> myimage.h 형태로 변환이 필요합니다.

cd tmp/work/armv7ahf-neon-poky-linux-gnueabi/psplash/0.1+gitAUTOINC+2015f7073e-r15/git
./make-image-header.sh myimage.png POKY
* POKY를 붙여야 header파일에 POKY define이 붙어 나오며 빌드가 됩니다.

명령어를 실행하고 나면 myimage.h 파일이 생성됩니다.

생성된 이미지를 아래와 같이 적용합니다.

user layer에 아래와 같이 psplash 폴더를 만들고 myimage.h를 pspash-poky-img.h로 이름을 변경합니다.

recipes-core/psplash/files/psplash-poky-img.h
recipes-core/psplash/psplash_git.bbappend

psplash_git.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

두번째 방법. png를 직접 넣기

psplash 원본 recipe를 참고하시면 background의 이미지는 png파일로 직접 바꿀 수 있게 recipe가 구성되어있습니다.

user layer 구성 :
recipes-core/psplash/files/psplash-poky-img.png
recipes-core/psplash/psplash_git.bbappend

vi pspash_git_bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SPLASH_IMAGES = "file://psplash-poky-img.png;outsuffix=default"

이미지 색상 바꾸기

소스 내 psplash-colors.h를 수정

/* This is the overall background color */
//#define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
#define PSPLASH_BACKGROUND_COLOR 0x00,0x00,0x00
 
/* 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
#define PSPLASH_BAR_COLOR 0xff,0xff,0xff
 
/* This is the color of the progress bar background */
//#define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
#define PSPLASH_BAR_BACKGROUND_COLOR 0x00,0x00,0x00

background, bar 색상 등을 변경할 수 있습니다.
*bar의 이미지는 'psplash-bar-img.h'가 사용됩니다. 변경하기 위해서는 위의 background image 변경과 비슷한 방법으로 수정할 수 있습니다.

댓글