Adding custom splash screen to yocto image

 Hello All,

In this article we are going to see how we can add custom splash screen to our yocto image.

pre-requisite: you need to be familiar with my previous topics as it contains the necessary steps to setup the environment  and  build the image.

link to my previous topic: https://learnyoctowithme.blogspot.com/2022/04/constructing-embedded-linux-image-for.html

https://www.blogger.com/blog/posts/8695339245532547417?tab=rj


Adding custom splash screen to yocto image:

 lets check what is the default splash screen set to image.

step 1: open local.conf file

$ vi poky/build_x86/conf/local.conf 

and append the following line to local.conf file as

IMAGE_FEATURES += "splash"

and build the image using below command

$ bitbake core-image-minimal 

after successful compilation of build , boot the image using below command

$ runqemu

you can observe the splash screen while booting of the image


Now we will modify the custom splash screen with our image.

step 2: Psplash expects an image to be in header file format, so you need to convert your image into a header file format by using script called "make-image-header.sh"

source - http://git.yoctoproject.org/cgit/cgit.cgi/psplash/tree/make-image-header.sh

copy this make-image-header.sh script to your meta-poky/recipes-core/psplash folder

$ cp make-image-header.sh meta-poky/recipes-core/psplash

step 3: give the executable permissions to the script

$ chmod 0777 make-image-header.sh

step 4: run 
$ ./make-image-header.sh <path_to_image_file> <NAME>
Example: ./make-image-header.sh logo.png POKY

after successful execution of script you will have file logo-img.h

rename the file logo-img.h to psplash-poky-img.h

$ mv logo-img.h psplash-poky-img.h

and copy this file to files folder under psplash directory

$ cp psplash-poky-img.h files/

step 5: now compile the psplash recipe as

$ bitbake psplash



after successfully building the recipe , now compile the complete image as

$ bitbake core-image-minimal 



after successful building, now run the image as

$ runqemu core-image-minimal

now while booting we can see the custom splash screen with our logo


That's it now we have build our image with custom splash screen.


Comments

Popular posts from this blog

Adding libraries (pciutils,usbutils and util-linux) to our image using yocto project

Adding kernel module in to our image and installing in root file system using yocto project