mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-11 03:55:23 +03:00
splash: different splash for sthe stages
This is to allow platforms where the virtual console is not available to graphically show the state of the system; is it stuck in stage-1, early stage-2 or is it about to get into systemd's init? This is still a big hack, though but relatively clean.
This commit is contained in:
parent
66a7f812c9
commit
54a52b8351
BIN
artwork/splash.stage-1.png
Normal file
BIN
artwork/splash.stage-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -5,6 +5,7 @@ with import ./initrd-order.nix;
|
||||
|
||||
let
|
||||
cfg = config.mobile.boot.stage-1.splash;
|
||||
image = name: ../artwork + "/${name}.png";
|
||||
mkSplash = at: name:
|
||||
{
|
||||
init = lib.mkOrder at ''
|
||||
@ -12,7 +13,7 @@ let
|
||||
'';
|
||||
contents = [
|
||||
{
|
||||
object = (builtins.path { path = ../artwork + "/${name}.png"; });
|
||||
object = (builtins.path { path = image name; });
|
||||
symlink = "/${name}.png";
|
||||
}
|
||||
];
|
||||
@ -49,7 +50,14 @@ in
|
||||
}
|
||||
|
||||
(mkSplash AFTER_FRAMEBUFFER_INIT "loading")
|
||||
(mkSplash (READY_INIT - 1) "splash")
|
||||
(mkSplash (READY_INIT - 1) "splash.stage-1")
|
||||
(mkIf cfg.rgb-debug (mkSplash (READY_INIT) "rgb-debug"))
|
||||
]);
|
||||
|
||||
# This happens in stage-2. This is why we're not using `mkSplash`.
|
||||
# This is the earliest in stage-2 we can show, for vt-less devices, that
|
||||
# stage-2 is really happening.
|
||||
config.boot.postBootCommands = ''
|
||||
${pkgs.ply-image}/bin/ply-image --clear=0x000000 ${image "splash.stage-2"} > /dev/null 2>&1
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user