Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Bootsplash

David Lechner edited this page Aug 5, 2014 · 11 revisions

This explains how to get a boot splash image using Plymouth with FBTFT on Raspian.

Video: Bootsplash using Plymouth on HY28A display

Note: INITRD support is needed (not the default on raspberrypi/linux@rpi-3.6.y):

$ uname -r
3.10.19+

$ zgrep INITRD /proc/config.gz
CONFIG_BLK_DEV_INITRD=y

Prerequisites

Install plymouth framebuffer support (/usr/lib/arm-linux-gnueabihf/plymouth/renderers/frame-buffer.so):

sudo apt-get install plymouth-drm

Setup initramfs

Make initramfs image

sudo update-initramfs -c -k $(uname -r)

Tell the bootloader to use the generated image. Add to /boot/config.txt:

initramfs initrd.img-X.XX.XX+

Use the filename reported by the update-initramfs command.

Setup loading of fbtft modules

spi_bcm2708

We need to be sure that the SPI master is available before fbtft_device is loaded.

/etc/initramfs-tools/scripts/init-top/spi

#!/bin/sh

modprobe spi_bcm2708

Make the script executable:

sudo chmod +x /etc/initramfs-tools/scripts/init-top/spi

fbtft modules

List the modules that should be included and loaded.

/etc/initramfs-tools/modules

spi_bcm2708
fbtft
fbtft_device name=hy28a verbose=0
fb_ili9320

Even though spi_bcm2708 is loaded earlier, we need it here so the module is included in the initramfs image.

Plymouth

Tell plymouth to use /dev/fb1:

echo "export FRAMEBUFFER=/dev/fb1" | sudo tee /etc/initramfs-tools/conf.d/fb1

List plymouth themes

$ plymouth-set-default-theme --list
details
fade-in
glow
joy
script
solar
spacefun
spinfinity
spinner
text

Set theme

sudo plymouth-set-default-theme joy

Update initramfs (add -v to get more info)

sudo update-initramfs -u

Add to /boot/cmdline.txt (all in one line)

fbcon=map:10 splash quiet plymouth.ignore-serial-consoles
Parameter                        | Description
---------------------------------|-----------------------------------------------
fbcon=map:10                     | Console: try /dev/fb1 first, then /dev/fb0
splash                           | Show splash
quiet                            | Don't show boot messages (errors will show)
plymouth.ignore-serial-consoles  |   

Reboot

Adafruit theme

adapiluv320x240
https://github.com/notro/adapiluv/wiki

Install

sudo sh -c "mkdir /usr/share/plymouth/themes/adapiluv && curl -L https://github.com/notro/adapiluv/tarball/master | tar xz --strip 1 -C /usr/share/plymouth/themes/adapiluv"

Enable and rebuild initramfs

sudo plymouth-set-default-theme -R adapiluv

Links

Alternative solutions

Debugging

/init (/usr/share/initramfs-tools/init) is the first script that is executed in the image.

plymouthd is started during premount (scripts/init-premount/plymouth)

List the initramfs files

lsinitramfs /boot/initrd.img-3.10.19+

Source directories

These directories are used to populate the image

/usr/share/initramfs-tools
/etc/initramfs-tools

Debug shell

Drop into a shell during initramfs script execution: add to cmdline.txt: break={top,premount,bottom}

Plymouth debug log

Add plymouth.debug to cmdline.txt
Result in: /var/log/plymouth-debug.log

initramfs debug output

cmdline.txt: add debug and remove splash quiet

initramfs debug info to the kernel log

Change /usr/share/initramfs-tools/scripts/functions

_log_msg()
 {
         if [ "$quiet" = "y" ]; then return; fi
-        printf "$@"
+        printf "$@" > /dev/kmsg
 }
 
 log_success_msg()

Add debug to cmdline.txt

This shows that the initramfs has been received by the kernel:

[    0.569908] Trying to unpack rootfs image as initramfs...
[    1.526456] Freeing initrd memory: 7816K (db84d000 - dbfef000)

piwik

Clone this wiki locally