From d4502bc705679dd887b457ccba48f84e18f87139 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 8 May 2011 12:12:31 +0200 Subject: [PATCH] busybox-initramfs: add support for OEM Splash, dont load splash if framebuffer is not enabled Signed-off-by: Stephan Raue --- .../sysutils/busybox-initramfs/scripts/init | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/sysutils/busybox-initramfs/scripts/init b/packages/sysutils/busybox-initramfs/scripts/init index 8953a4eef4..c6e8c4eede 100755 --- a/packages/sysutils/busybox-initramfs/scripts/init +++ b/packages/sysutils/busybox-initramfs/scripts/init @@ -63,11 +63,23 @@ REBOOT="0" } show_splash() { + if [ ! -e /dev/fb0 ]; then + SPLASH=no + fi + + if [ -f /flash/oemsplash.png ]; then + SPLASHIMAGE="/flash/oemsplash.png" + elif [ -f /splash/splash.png ]; then + SPLASHIMAGE="/splash/splash.png" + else + SPLASH=no + fi + if [ "$SPLASH" = "no" ]; then break else - if [ -f "/sbin/ply-image" -a -f "/splash/splash.png" ]; then - /sbin/ply-image /splash/splash.png + if [ -f "/sbin/ply-image" ]; then + /sbin/ply-image "$SPLASHIMAGE" fi fi } @@ -103,10 +115,10 @@ REBOOT="0" fi } - show_splash - mount_part "$boot" "/flash" "ro,noatime" + show_splash + if [ -n "$disk" ]; then mount_part "$disk" "/storage" "rw,noatime" update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL"