main/postmarketos-mkinitfs: allow splash override (MR 1776)

Make it possible to set a custom splash screen by placing a
splash.ppm.gz file on the boot partition.
This commit is contained in:
Oliver Smith 2020-11-20 16:50:20 +01:00 committed by Alexey Min
parent 88ebc699f3
commit c108a5a8d1
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
3 changed files with 15 additions and 6 deletions

View file

@ -1,7 +1,7 @@
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=postmarketos-mkinitfs
pkgver=0.16
pkgrel=1
pkgver=0.17
pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
depends="
@ -54,8 +54,8 @@ check() {
}
sha512sums="5037cb7285bb7c0c40ca9e6df332d882ef9a8b379756c785f921e062dab1b7e7f3139d00897f69323a916d709ced4297fea8cbd3a13ebae575b873ec9e2cbfae 00-default.modules
7fc6ba96419628850984df3322b73bcf655cba03fe3e97ec7425e66e90f4b2a4de106b5cb2e3d46785a92557334288011334104285e2050c7a8e823b8fa5668c init.sh.in
2273bbda86954bd1b424ac55cb7d8d04e7fb19f318caad5f5cdfaa996681f04de788be83b02cabda7b6d07dabd44ff71be5c11f3969ba5f7fe4d8f95a2de8b4c init_functions.sh
bafd06286594102b8b3b126c3ae0a77a97f004ab804f03426154310c5107a1acaf3636bdba92626333adfe4fb0df32ff42c6d8d9e7adf35f6da620c6e14407a1 init.sh.in
e4b5bb7206a4a8f99a23414d6830ccf6ecaf2990ca4923842e99fa14dc50a0a4ae88e0368129b423f9e7e7b446f25b641ad629b7aa08682f269aed7a234762cb init_functions.sh
dfc01ee0547ea88b7aa45a005e842b636e9e19bbf1705f3dad53a66d57af7c5c513c092b5469a06d9b00322e56a4d25f1b47e4c5324aafa99f5291679968d1f1 mkinitfs.sh
874b1bba86085a4b7707b3d1ac6534e2027b5783111b2f9c66c2595ada95113a95272c1be9d234b7957c785978de0c5352b4abd70819871caed9efcfbf703dac mkinitfs_functions.sh
c7a3c33daeb12b33ac72207191941c4d634f15c22958273b52af381a70ebaba1d3a9299483f0c447d9e66c560151fe7b9588bb4bbef2c8914f83185984ee4622 mkinitfs_test.sh"

View file

@ -27,8 +27,6 @@ for hook in /etc/postmarketos-mkinitfs/hooks/*.sh; do
sh "$hook"
done
show_splash /splash-loading.ppm.gz
# Always run dhcp daemon/usb networking for now (later this should only
# be enabled, when having the debug-shell hook installed for debugging,
# or get activated after the initramfs is done with an OpenRC service).
@ -36,6 +34,7 @@ setup_usb_network
start_udhcpd
mount_boot_partition /boot
show_splash_loading
extract_initramfs_extra @INITRAMFS_EXTRA@
start_charging_mode
wait_root_partition

View file

@ -525,6 +525,16 @@ show_splash() {
fbsplash -s /tmp/splash.ppm
}
show_splash_loading() {
# Allow overriding the default loading splash screen with a
# "splash.ppm.gz" file on the boot partition
if [ -e /boot/splash.ppm.gz ]; then
show_splash /boot/splash.ppm.gz
else
show_splash /splash-loading.ppm.gz
fi
}
set_framebuffer_mode() {
[ -e "/sys/class/graphics/fb0/modes" ] || return
[ -z "$(cat /sys/class/graphics/fb0/mode)" ] || return