diff --git a/distributions/LibreELEC/splash/splash-1024.png b/distributions/LibreELEC/splash/splash-1024.png deleted file mode 100644 index c67f7ac602..0000000000 Binary files a/distributions/LibreELEC/splash/splash-1024.png and /dev/null differ diff --git a/distributions/LibreELEC/splash/splash-full.png b/distributions/LibreELEC/splash/splash-1080.png similarity index 100% rename from distributions/LibreELEC/splash/splash-full.png rename to distributions/LibreELEC/splash/splash-1080.png diff --git a/distributions/LibreELEC/splash/splash-1200.png b/distributions/LibreELEC/splash/splash-1200.png new file mode 100644 index 0000000000..fbce843293 Binary files /dev/null and b/distributions/LibreELEC/splash/splash-1200.png differ diff --git a/distributions/LibreELEC/splash/splash-2160.png b/distributions/LibreELEC/splash/splash-2160.png new file mode 100644 index 0000000000..63ab150257 Binary files /dev/null and b/distributions/LibreELEC/splash/splash-2160.png differ diff --git a/distributions/LibreELEC/splash/splash-720.png b/distributions/LibreELEC/splash/splash-720.png new file mode 100644 index 0000000000..d213ad8710 Binary files /dev/null and b/distributions/LibreELEC/splash/splash-720.png differ diff --git a/distributions/LibreELEC/splash/splash-768.png b/distributions/LibreELEC/splash/splash-768.png new file mode 100644 index 0000000000..47a07721be Binary files /dev/null and b/distributions/LibreELEC/splash/splash-768.png differ diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index ac89c448ad..4253df1416 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -144,6 +144,10 @@ overlay) OVERLAY=yes ;; + setfbres=*) + SWITCH_FRAMEBUFFER="${arg#*=}" + SWITCH_FRAMEBUFFER="${SWITCH_FRAMEBUFFER//,/ }" + ;; break=*) BREAK="${arg#*=}" ;; @@ -395,25 +399,50 @@ } load_splash() { + local set_default_res=no + local vres + if [ ! "$SPLASH" = "no" ]; then progress "Loading bootsplash" - SPLASHIMAGE="/splash/splash-full.png" - # 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" || \ + insmod "$MODULE_DIR/uvesafb.ko" && \ + set_default_res=yes || \ 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 if [ -e /dev/fb0 ]; then + # Set framebuffer to a custom resolution and/or fallback to default resolution (1024x768-32), if required. + if [ ! "$SWITCH_FRAMEBUFFER" = "no" ]; then + if [ "$SWITCH_FRAMEBUFFER" = "1080" ]; then + SWITCH_FRAMEBUFFER="1920 1080 1920 1080 32" + elif [ "$SWITCH_FRAMEBUFFER" = "720" ]; then + SWITCH_FRAMEBUFFER="1280 720 1280 720 32" + fi + + # Try setting a custom framebuffer resolution + if [ ! "${SWITCH_FRAMEBUFFER:-yes}" = "yes" ]; then + fbset -g $SWITCH_FRAMEBUFFER 2>/dev/null && set_default_res=no + fi + + # Set a default resolution if required + if [ "$set_default_res" = "yes" ]; then + fbset -g 1024 768 1024 768 32 + fi + fi + + # Select splash image based on current native resolution + if [ -z "$SPLASHIMAGE" ]; then + vres="$(fbset | awk '/geometry/ { print $3 }')" + if [ -n "$vres" -a -f /splash/splash-$vres.png ]; then + SPLASHIMAGE="/splash/splash-$vres.png" + else + SPLASHIMAGE="/splash/splash-1080.png" + fi + fi + # load splash if [ -f /flash/oemsplash.png ]; then SPLASHIMAGE="/flash/oemsplash.png" diff --git a/packages/tools/plymouth-lite/package.mk b/packages/tools/plymouth-lite/package.mk index a2016169bc..31ae9dfcee 100644 --- a/packages/tools/plymouth-lite/package.mk +++ b/packages/tools/plymouth-lite/package.mk @@ -50,14 +50,12 @@ makeinstall_init() { if [ -f $PROJECT_DIR/$PROJECT/splash/splash.conf ]; then cp $PROJECT_DIR/$PROJECT/splash/splash.conf $INSTALL/splash cp $PROJECT_DIR/$PROJECT/splash/*.png $INSTALL/splash - elif [ -f $PROJECT_DIR/$PROJECT/splash/splash-1024.png \ - -o -f $PROJECT_DIR/$PROJECT/splash/splash-full.png ]; then + elif ls $PROJECT_DIR/$PROJECT/splash/splash-*.png 1>/dev/null 2>&1; then cp $PROJECT_DIR/$PROJECT/splash/splash-*.png $INSTALL/splash elif [ -f $DISTRO_DIR/$DISTRO/splash/splash.conf ]; then cp $DISTRO_DIR/$DISTRO/splash/splash.conf $INSTALL/splash cp $DISTRO_DIR/$DISTRO/splash/*.png $INSTALL/splash - elif [ -f $DISTRO_DIR/$DISTRO/splash/splash-1024.png \ - -o -f $DISTRO_DIR/$DISTRO/splash/splash-full.png ]; then + elif ls $DISTRO_DIR/$DISTRO/splash/splash-*.png 1>/dev/null 2>&1; then cp $DISTRO_DIR/$DISTRO/splash/splash-*.png $INSTALL/splash else cp $PKG_DIR/splash/splash-*.png $INSTALL/splash