diff --git a/artwork/loading.png b/artwork/loading.png index efb17dda..a727e0dd 100644 Binary files a/artwork/loading.png and b/artwork/loading.png differ diff --git a/artwork/loading.xcf b/artwork/loading.xcf index 3ee75bc5..011e0696 100644 Binary files a/artwork/loading.xcf and b/artwork/loading.xcf differ diff --git a/artwork/rgb-debug.png b/artwork/rgb-debug.png new file mode 100644 index 00000000..2dc5f388 Binary files /dev/null and b/artwork/rgb-debug.png differ diff --git a/artwork/rgb-debug.xcf b/artwork/rgb-debug.xcf new file mode 100644 index 00000000..16d038c3 Binary files /dev/null and b/artwork/rgb-debug.xcf differ diff --git a/artwork/splash.png b/artwork/splash.png new file mode 100644 index 00000000..db4947c6 Binary files /dev/null and b/artwork/splash.png differ diff --git a/artwork/splash.xcf b/artwork/splash.xcf new file mode 100644 index 00000000..2517dbf4 Binary files /dev/null and b/artwork/splash.xcf differ diff --git a/artwork/temp-splash.png b/artwork/temp-splash.png deleted file mode 100644 index 6f5a5370..00000000 Binary files a/artwork/temp-splash.png and /dev/null differ diff --git a/artwork/temp-splash.xcf b/artwork/temp-splash.xcf deleted file mode 100644 index f7d8ede9..00000000 Binary files a/artwork/temp-splash.xcf and /dev/null differ diff --git a/modules/initrd-splash.nix b/modules/initrd-splash.nix index f96b2b76..7e355973 100644 --- a/modules/initrd-splash.nix +++ b/modules/initrd-splash.nix @@ -5,6 +5,18 @@ with import ./initrd-order.nix; let cfg = config.mobile.boot.stage-1.splash; + mkSplash = at: name: path: + { + init = lib.mkOrder at '' + show_splash ${name} + ''; + contents = [ + { + object = path; + symlink = "/${name}.png"; + } + ]; + }; in { options.mobile.boot.stage-1.splash = { @@ -15,31 +27,29 @@ in Enables splash screen. ''; }; + rgb-debug = mkOption { + type = types.bool; + default = false; + description = '' + Enables a special splash with RGB debug components. + ''; + }; }; config.mobile.boot.stage-1 = lib.mkIf cfg.enable (mkMerge [ { - init = lib.mkOrder AFTER_FRAMEBUFFER_INIT '' + init = lib.mkOrder BEFORE_FRAMEBUFFER_INIT '' show_splash() { - ply-image /$1.png > /dev/null 2>&1 + ply-image --clear=0x000000 /$1.png > /dev/null 2>&1 } - - show_splash loading ''; extraUtils = [ { package = pkgs.ply-image; extraCommand = "cp -pv ${pkgs.glibc.out}/lib/libpthread.so.* $out/lib"; } ]; - contents = [ - { object = ../artwork/loading.png; symlink = "/loading.png"; } - ]; - } - { - init = lib.mkOrder READY_INIT '' - show_splash splash - ''; - contents = [ - { object = ../artwork/temp-splash.png; symlink = "/splash.png"; } - ]; } + + (mkSplash AFTER_FRAMEBUFFER_INIT "loading" ../artwork/loading.png) + (mkSplash (READY_INIT - 1) "splash" ../artwork/splash.png) + (mkIf cfg.rgb-debug (mkSplash (READY_INIT) "rgb-debug" ../artwork/rgb-debug.png)) ]); }