Replace default splash screen in Yocto

On boot, if you have observed a splash screen with yocto logo appears in core-image-sato. This post is all about to change that splash screen with your own customized image. 

Splash screen is handled by a recipe called psplash found under "poky/meta-poky/recipes-core" directory of the source tree. 

Since psplash expects an image to be in header file format, first you need to convert your image into a header file format by using script called "make-image-header.sh"

Here is what make-image-header.sh contains,
source - http://git.yoctoproject.org/cgit/cgit.cgi/psplash/tree/make-image-header.sh

You could replace your generated image header in poky/meta-poky/recipes-core/psplash/files with existing one but I would recommend to create a recipe in your own layer and add this image file there.

Steps to be followed,
  • Get your own splash screen image(I took .jpg image)
  • Convert that into header file by using script described above
    • ./make-image-header.sh <psplash-poky> POKY
    • Script will generate psplash-poky-img.h for you 
  • Create a recipe directory called "/recipe-core/psplash" under your own layer and copy make-image-header.sh under files directory
  • Create a recipe file "psplash_git.bbappend" with this single line as shown below under "psplash" recipe directory
  • That's it !!!!
  • Recompile image "bitbake core-image-sato"
  • Run image "runqemu core-image-sato" and you would see your own image at boot time
Note: You may not see splash screen at boot time for some reason(may be very fast it boots up) then open terminal and run "reboot", you will see splash screen.

Comments

  1. Hi,

    I use gdk-pixbuf-csource v3.0 (on ubuntu 18.4 and on Centos8) and I suppose it has a bug.
    The make-image-header.sh tool convert a generic .png file but the data outpumt are corrupted, in several points (you can see that there are a lot wrong octal number in the data file):

    "\335\351\362\272\377\377\377\1\260\315\342\222t\246\314\2q\244\313\323" \
    "\343\357\377\377\377\377\242\377\377\377\2\361\366\372\204\260\322\265" \
    "t\246\314\1\205\261\322\242\377\377\377\2\331\347\361p\244\313\222t\246" \
    "\314\1\266\320\344\206\377\377\377\1\250\307\337\221t\246\314\1\230\275" \
    "\331\246\377\377\377\2\340\353\364p\243\312\215t\246\314\1\240\302\334" \
    "\247\377\377\377\1@v\256\2317p\252\207\377\377\377\2\312\335\354r\245" \
    "\313\221t\246\314\2s\245\314\277\326\347\257\377\377\377\2\277\326\347" \
    "s\246\314\214t\246\314\207\377\377\377\1\243\304\335\260t\246\314\3\207" \
    "\262\322\365\370\373\376\376\376\267\377\377\377\1\201\256\321\222t\246" \
    "\314\1l\241\311\377\377\377\377\242\377\377\377\3\271\322\345u\247\314" \
    "s\246\314\265t\246\314\1\205\261\322\242\377\377\377\1\266\320\344\222" \
    "t\246\314\2n\242\312\347\360\366\206\377\377\377\1\250\307\337\221t\246" \
    "\314\2p\244\313\340\353\363\245\377\377\377\2\340\353\364p\243\312\215" \

    ReplyDelete
    Replies
    1. My fault, it's a char string, octal where is possible or chars. I am sorry.
      The strange is that if I convert in binary the mixed string and after that I use gimp to import the picture as data/raw format, the image is not weel done at all.

      Delete

Post a Comment

Popular posts from this blog

MBR partitioning with 'parted' utility

Disk Partitioning: MBR vs GPT