Merge pull request #371 from fewtarius/dev

Drop hard coded splash screens and generate a correct resolution/aspect splash during the build.
This commit is contained in:
fewtarius 2022-08-23 07:23:57 -04:00 committed by GitHub
commit a843c1ed9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 85 additions and 44 deletions

View file

@ -10,7 +10,7 @@ RUN apt update \
xmlstarlet patchutils gawk gperf xfonts-utils default-jre python3 python-is-python3 xsltproc libjson-perl \
lzop libncurses5-dev device-tree-compiler u-boot-tools rsync p7zip libparse-yapp-perl \
zip binutils-aarch64-linux-gnu dos2unix p7zip-full libvpx-dev bsdmainutils bc meson p7zip-full \
qemu-user-binfmt zstd parted \
qemu-user-binfmt zstd parted imagemagick \
&& apt autoremove --purge -y \
&& apt clean -y \
&& rm -rf /var/lib/apt/lists/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -10,35 +10,22 @@ PKG_DEPENDS_INIT="toolchain ccache:init libpng"
PKG_DEPENDS_TARGET="toolchain libpng"
PKG_LONGDESC="Boot splash screen based on Fedora's Plymouth code"
if [ "$UVESAFB_SUPPORT" = yes ]; then
PKG_DEPENDS_INIT="$PKG_DEPENDS_INIT v86d:init"
if [ "${UVESAFB_SUPPORT}" = yes ]; then
PKG_DEPENDS_INIT="${PKG_DEPENDS_INIT} v86d:init"
fi
pre_configure_init() {
# plymouth-lite dont support to build in subdirs
cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}-init
rm -rf .${TARGET_NAME}-init
}
makeinstall_init() {
mkdir -p ${INSTALL}/usr/bin
cp ply-image ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/splash
find_file_path splash/splash.conf && cp ${FOUND_PATH} ${INSTALL}/splash
find_file_path "splash/splash-*.png" && cp ${FOUND_PATH} ${INSTALL}/splash
cp ply-image ${INSTALL}/usr/bin
}
pre_configure_target() {
# plymouth-lite dont support to build in subdirs
cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}-init
rm -rf .${TARGET_NAME}-init
}
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/splash
find_file_path "splash/splash-*.png" && cp ${FOUND_PATH} ${INSTALL}/usr/config/splash
}

View file

@ -16,9 +16,9 @@ if [ "${SPLASH_TYPE}" == "intro" ] || [ "${SPLASH_TYPE}" == "exit" ]
then
if [ ${vres} -gt ${hres} ]
then
SPLASH="/usr/config/splash/splash-${hres}l.png"
SPLASH="/usr/config/splash/splashl.png"
else
SPLASH="/usr/config/splash/splash-${hres}.png"
SPLASH="/usr/config/splash/splash.png"
fi
else
exit 0

View file

@ -427,11 +427,15 @@ set_consolefont() {
progress "Set console font"
if [ -e /dev/fb0 ]; then
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
if [ "${hres}" -lt "1152" ]
if [ "${hres}" -gt "0" ] && [ "${hres}" -lt "640" ]
then
setfont -C /dev/tty0 ter-v12n.psf
elif [ "${hres}" -ge "640" ] && [ "${hres}" -lt "720" ]
setfont -C /dev/tty0 ter-v14n.psf
elif [ "${hres}" -ge "720" ] && [ "${hres}" -lt "1080" ]
setfont -C /dev/tty0 ter-v18n.psf
else
setfont -C /dev/tty0 ter-v32n.psf
setfont -C /dev/tty0 ter-v24n.psf
fi
fi
}
@ -478,26 +482,16 @@ load_splash() {
if [ -z "$SPLASHIMAGE" ]; then
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
RES="${hres}"
# Test to determine if the display is rotated
# and set the splash to suit.
if [ ${vres} -gt ${hres} ]
then
RES="${RES}l"
if [ ! -f "/splash/splash-${RES}.png" ]
then
RES="1080l"
fi
else
if [ ! -f "/splash/splash-${RES}.png" ]
then
RES="1080"
fi
RES="l"
fi
SPLASHIMAGE="/splash/splash-${RES}.png"
SPLASHIMAGE="/splash/splash${RES}.png"
fi

View file

@ -36,7 +36,7 @@ then
done
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
cp -f /usr/config/splash/splash-${hres}.png /storage/.config/emulationstation/resources/logo.png
cp -f /usr/config/splash/splash.png /storage/.config/emulationstation/resources/logo.png
fi
if [ ! -e "/storage/.cache/ld.so.cache" ]

View file

@ -0,0 +1,42 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020-present Fewtarius
PKG_NAME="splash"
PKG_VERSION="$(date +%Y%m%d)"
PKG_ARCH="any"
PKG_LICENSE="apache2"
PKG_SITE=""
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain imagemagick"
PKG_LONGDESC="Boot splash screens"
PKG_TOOLCHAIN="manual"
make_init() {
:
}
make_target() {
:
}
mksplash() {
SPLASH="${ROOT}/distributions/JELOS/splash/splash.png"
if [ -n "${DISPLAY_RESOLUTION}" ]
then
convert ${SPLASH} -background none -resize ${DISPLAY_RESOLUTION} -gravity center -extent ${DISPLAY_RESOLUTION} ${1}/splash.png
convert ${SPLASH} -rotate 270 -background none -resize ${DISPLAY_RESOLUTION} -gravity center -extent ${DISPLAY_RESOLUTION} ${1}/splashl.png
else
cp ${SPLASH} ${INSTALL}/splash
convert ${SPLASH} -rotate 270 -background none ${INSTALL}/splash/splashl.png
fi
}
makeinstall_init() {
mkdir -p ${INSTALL}/splash
mksplash ${INSTALL}/splash
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/splash
mksplash ${INSTALL}/usr/config/splash
}

View file

@ -4,7 +4,7 @@
PKG_NAME="image"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware ${BOOTLOADER} busybox util-linux corefonts network misc-packages debug usb-modeswitch unzip poppler socat p7zip file bluez initramfs jelos"
PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware ${BOOTLOADER} busybox util-linux corefonts network misc-packages debug usb-modeswitch unzip poppler socat p7zip file bluez splash initramfs jelos"
PKG_SECTION="virtual"
PKG_LONGDESC="Root package used to build and create complete image"

View file

@ -7,7 +7,7 @@ PKG_VERSION=""
PKG_LICENSE="GPL"
PKG_SITE="http://www.openelec.tv"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init linux:init plymouth-lite:init util-linux:init e2fsprogs:init dosfstools:init exfat:init fakeroot:host terminus-font:init"
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init linux:init splash:init plymouth-lite:init util-linux:init e2fsprogs:init dosfstools:init exfat:init fakeroot:host terminus-font:init"
PKG_SECTION="virtual"
PKG_LONGDESC="debug is a Metapackage for installing initramfs"

View file

@ -43,7 +43,10 @@
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Display Resolution
DISPLAY_RESOLUTION="640x480"
# Mali GPU family
MALI_FAMILY="bifrost-g31"
OPENGLES="libmali"

View file

@ -43,7 +43,10 @@
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Display Resolution
DISPLAY_RESOLUTION="320x240"
# Mali GPU family
MALI_FAMILY="bifrost-g31"
OPENGLES="libmali"

View file

@ -43,7 +43,10 @@
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Display Resolution
DISPLAY_RESOLUTION="640x480"
# Mali GPU family
MALI_FAMILY="bifrost-g31"
OPENGLES="libmali"

View file

@ -44,7 +44,10 @@
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Display Resolution
DISPLAY_RESOLUTION="640x480"
# Define the CPU
HW_CPU="Rockchip RK3566"

View file

@ -44,7 +44,10 @@
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
KERNEL_MAKE_EXTRACMD+=" rockchip/${DEVICE_DTB}.dtb"
# Display Resolution
DISPLAY_RESOLUTION="960x544"
# Define the CPU
HW_CPU="Rockchip RK3566"

View file

@ -45,6 +45,9 @@
# Define the CPU
HW_CPU="Rockchip RK3399"
# Display Resolution
DISPLAY_RESOLUTION="1152x1920"
# Mali GPU family
MALI_FAMILY="midgard-t86x"

View file

@ -60,7 +60,7 @@ fi
# Clean OS specific packages.
PKG_CLEAN="${PKG_CLEAN} system-utils plymouth-lite initramfs busybox linux grub u-boot SDL2 modules \
emulationstation retroarch lib32 jelos"
emulationstation retroarch lib32 splash jelos"
if [ -d "build.${DISTRO}-${DEVICE_ROOT}.${ARCH}/initramfs" ]
then