aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-02-17 13:45:50 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-02-17 13:45:50 +0200
commitf7f60d610e921146415db59b501a78bde8f6bf1f (patch)
tree5d7e24bfd797eed842f13aaa12b25f8b217802eb
parent019f1650c922a2995a2fa1f98b01e17b8c64bd10 (diff)
downloadmkinitfs-f7f60d610e921146415db59b501a78bde8f6bf1f.tar.bz2
mkinitfs-f7f60d610e921146415db59b501a78bde8f6bf1f.tar.xz
init: support individual splash image per fbdev
-rwxr-xr-xinitramfs-init.in24
1 files changed, 15 insertions, 9 deletions
diff --git a/initramfs-init.in b/initramfs-init.in
index e18652a..10bc3ea 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -472,22 +472,28 @@ if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then
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