From 9fb29079cdc491b2e5f273317b8c53118b199f2d Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Mon, 14 Aug 2023 02:04:05 +0100 Subject: [PATCH] main/postmarketos-initramfs: get to splash faster (MR 4204) With full-fat mdev supporting by-partlabel lookups, there is a small delay during startup. As mdev and dynamic partitions aren't actually needed for the framebuffer device, move show_splash earlier. Furthermore, slightly rework setup_framebuffer to not dump the verbose message about waiting for the framebuffer unless the framebuffer isn't found. Signed-off-by: Caleb Connolly --- main/postmarketos-initramfs/init.sh | 4 ++-- main/postmarketos-initramfs/init_functions.sh | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main/postmarketos-initramfs/init.sh b/main/postmarketos-initramfs/init.sh index 5dc5c568d..b363b87ca 100644 --- a/main/postmarketos-initramfs/init.sh +++ b/main/postmarketos-initramfs/init.sh @@ -18,10 +18,10 @@ setup_firmware_path # shellcheck disable=SC2154 load_modules /lib/modules/initramfs.load "usb_f_rndis" -setup_mdev -setup_dynamic_partitions "${deviceinfo_super_partitions:=}" setup_framebuffer show_splash "Loading..." +setup_mdev +setup_dynamic_partitions "${deviceinfo_super_partitions:=}" mount_subpartitions run_hooks /hooks diff --git a/main/postmarketos-initramfs/init_functions.sh b/main/postmarketos-initramfs/init_functions.sh index 69ea9bdc6..94e7e9bc2 100644 --- a/main/postmarketos-initramfs/init_functions.sh +++ b/main/postmarketos-initramfs/init_functions.sh @@ -703,15 +703,14 @@ setup_framebuffer() { fi # Wait for /dev/fb0 - echo "NOTE: Waiting 10 seconds for the framebuffer /dev/fb0." - echo "If your device does not have a framebuffer, disable this with:" - echo "no_framebuffer=true in " for _ in $(seq 1 100); do [ -e "/dev/fb0" ] && break sleep 0.1 done if ! [ -e "/dev/fb0" ]; then - echo "ERROR: /dev/fb0 did not appear!" + echo "ERROR: /dev/fb0 did not appear after waiting 10 seconds!" + echo "If your device does not have a framebuffer, disable this with:" + echo "no_framebuffer=true in " return fi