ref: f7f60d610e921146415db59b501a78bde8f6bf1f
parent: 019f1650c922a2995a2fa1f98b01e17b8c64bd10
author: Timo Teräs <timo.teras@iki.fi>
date: Wed Feb 17 07:45:50 CST 2016
init: support individual splash image per fbdev
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -472,22 +472,28 @@
fi
if [ "$KOPT_splash" != "no" ]; then
+ echo "IMAGE_ALIGN=CM" > /tmp/fbsplash.cfg
+ local fbdev img
+ for fbdev in /dev/fb[0-9]; do
+ [ -e "$fbdev" ] || break
+ local num="${fbdev#/dev/fb}"
+ for img in /media/*/fbsplash$num.ppm; do
+ local config="${img%.*}.cfg"
+ [ -e "$config" ] || config=/tmp/fbsplash.cfg
+ fbsplash -s "$img" -d "$fbdev" -i "$config"
+ break
+ done
+ done
for fbsplash in /media/*/fbsplash.ppm; do
- if [ -e "$fbsplash" ]; then
- break;
- fi
+ [ -e "$fbsplash" ] && break
done
fi
if [ -n "$fbsplash" ] && [ -e "$fbsplash" ]; then
- local config
ebegin "Starting bootsplash"
mkfifo $sysroot/$splashfile
- config="${fbsplash%.*}.cfg"
- if ! [ -e "$config" ]; then
- config=/tmp/fbsplash.cfg
- echo "IMAGE_ALIGN=CM" > $config
- fi
+ local config="${fbsplash%.*}.cfg"
+ [ -e "$config" ] || config=/tmp/fbsplash.cfg
setsid fbsplash -T 16 -s "$fbsplash" -i $config -f $sysroot/$splashfile &
eend 0
else