-
Notifications
You must be signed in to change notification settings - Fork 494
Bootsplash
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
Install plymouth framebuffer support (/usr/lib/arm-linux-gnueabihf/plymouth/renderers/frame-buffer.so):
sudo apt-get install plymouth-drm
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.
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
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.
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
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
- http://www.freedesktop.org/wiki/Software/Plymouth/
- https://wiki.debian.org/plymouth
- https://wiki.ubuntu.com/Plymouth#Debugging
- https://wiki.debian.org/initramfs
- https://wiki.debian.org/InitramfsDebug
- Plymouth theming guide part 1, part 2, part 3, part 4, scripts
- http://blog.sheasilverman.com/2013/09/adding-a-startup-movie-to-your-raspberry-pi/
- http://www.edv-huber.com/index.php/problemloesungen/15-custom-splash-screen-for-raspberry-pi-raspbian
/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)