From 8ef8f043bfdb17f2f5234977514f11fe9202948c Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 30 Sep 2013 03:23:11 +0200 Subject: [PATCH] busybox-initramfs: make uvesafb support optional, and use only if needed Signed-off-by: Stephan Raue --- packages/initramfs/linux-initramfs/install | 5 +++++ .../sysutils/busybox-initramfs/scripts/init | 19 ++++++++++++++----- .../initramfs/sysutils/plymouth-lite/install | 2 +- .../initramfs/sysutils/plymouth-lite/meta | 6 +++++- projects/ARCTIC_MC/options | 5 ++++- projects/ATV/options | 3 +++ projects/Fusion/options | 5 ++++- projects/Generic/options | 5 ++++- projects/Generic_OSS/options | 5 ++++- projects/ION/options | 5 ++++- projects/Intel/options | 3 +++ projects/RPi/options | 3 +++ projects/Virtual/options | 5 ++++- 13 files changed, 58 insertions(+), 13 deletions(-) diff --git a/packages/initramfs/linux-initramfs/install b/packages/initramfs/linux-initramfs/install index 2823989375..e478a65387 100755 --- a/packages/initramfs/linux-initramfs/install +++ b/packages/initramfs/linux-initramfs/install @@ -38,3 +38,8 @@ if [ -n "$INITRAMFS_MODULES" ]; then fi done fi + +if [ "$UVESAFB_SUPPORT" = yes ]; then + uvesafb=`find $LINUX_MODULES_DIR -name uvesafb.ko` + cp $uvesafb $INSTALL/lib/modules/`basename $uvesafb` +fi diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index b8835e6f20..923d506400 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -352,23 +352,32 @@ load_splash() { progress "Loading bootsplash" - if [ -e /dev/fb0 -a ! "$SPLASH" = "no" ]; then + if [ ! "$SPLASH" = "no" ]; then + SPLASHIMAGE="/splash/splash-full.png" - # set framebuffer to a default resolution (1024x768-32) + # load uvesafb module if needed + if [ -f "$MODULE_DIR/uvesafb.ko" -a ! -e /dev/fb0 ]; then + progress "Loading kernel module uvesafb.ko" + insmod "$MODULE_DIR/uvesafb.ko" || \ + progress "... Failed to load kernel module uvesafb, skipping" + + # set framebuffer to a default resolution (1024x768-32) if [ ! "$SWITCH_FRAMEBUFFER" = "no" ]; then fbset -g 1024 768 1024 768 32 + SPLASHIMAGE="/splash/splash-1024.png" fi + fi - # load splash + if [ -e /dev/fb0 ]; then + # load splash if [ -f /flash/oemsplash.png ]; then SPLASHIMAGE="/flash/oemsplash.png" elif [ -f /splash/splash.conf ]; then . /splash/splash.conf - else - SPLASHIMAGE="/splash/splash.png" fi ply-image $SPLASHIMAGE > /dev/null 2>&1 + fi fi } diff --git a/packages/initramfs/sysutils/plymouth-lite/install b/packages/initramfs/sysutils/plymouth-lite/install index 92f4c5b3a6..9a6bfce747 100755 --- a/packages/initramfs/sysutils/plymouth-lite/install +++ b/packages/initramfs/sysutils/plymouth-lite/install @@ -32,5 +32,5 @@ mkdir -p $INSTALL/splash elif [ -f $PROJECT_DIR/$PROJECT/splash/splash.png ]; then cp $PROJECT_DIR/$PROJECT/splash/splash.png $INSTALL/splash else - cp $PKG_DIR/splash/splash.png $INSTALL/splash + cp $PKG_DIR/splash/splash-*.png $INSTALL/splash fi diff --git a/packages/initramfs/sysutils/plymouth-lite/meta b/packages/initramfs/sysutils/plymouth-lite/meta index 17f41680e5..7421051a48 100644 --- a/packages/initramfs/sysutils/plymouth-lite/meta +++ b/packages/initramfs/sysutils/plymouth-lite/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.meego.com" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="gcc-initramfs zlib-initramfs v86d" +PKG_DEPENDS="gcc-initramfs zlib-initramfs" PKG_BUILD_DEPENDS="toolchain zlib libpng" PKG_PRIORITY="optional" PKG_SECTION="system" @@ -34,3 +34,7 @@ PKG_LONGDESC="Boot splash screen based on Fedora's Plymouth code" PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +if [ "UVESAFB_SUPPORT" = yes ]; then + PKG_DEPENDS="$PKG_DEPENDS v86d" +fi diff --git a/projects/ARCTIC_MC/options b/projects/ARCTIC_MC/options index e6577a409b..8feb61e348 100755 --- a/projects/ARCTIC_MC/options +++ b/projects/ARCTIC_MC/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="yes" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -296,7 +299,7 @@ LCD_DRIVER="none" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/ATV/options b/projects/ATV/options index bdaed5216d..63ff75c3eb 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="yes" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" diff --git a/projects/Fusion/options b/projects/Fusion/options index d628ba3de3..8c3c3c6e9b 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -296,7 +299,7 @@ LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Generic/options b/projects/Generic/options index c3e86bcd79..52d9cdf29f 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="yes" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -296,7 +299,7 @@ LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 0ae4aeb13a..367d3cad51 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -296,7 +299,7 @@ LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/ION/options b/projects/ION/options index 61b1f73110..65c4c94ba2 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="yes" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -296,7 +299,7 @@ LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Intel/options b/projects/Intel/options index b5e01ce09f..72f24960b2 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" diff --git a/projects/RPi/options b/projects/RPi/options index 24cdefe90a..2010176b47 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -243,6 +243,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="none" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="no" diff --git a/projects/Virtual/options b/projects/Virtual/options index 2292bc9897..f91f4cc712 100755 --- a/projects/Virtual/options +++ b/projects/Virtual/options @@ -238,6 +238,9 @@ # Windowmanager to use (ratpoison / none) WINDOWMANAGER="ratpoison" +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" @@ -291,7 +294,7 @@ LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" # Modules to install in initramfs for early boot - INITRAMFS_MODULES="uvesafb xhci-hcd" + INITRAMFS_MODULES="xhci-hcd" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported,