mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-17 14:57:22 +03:00
Reviews splash
All images are now good for a while. Adds option to show the rbg-debug splash.
This commit is contained in:
parent
350ca1b90a
commit
db81d8c50e
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 24 KiB |
Binary file not shown.
BIN
artwork/rgb-debug.png
Normal file
BIN
artwork/rgb-debug.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
BIN
artwork/rgb-debug.xcf
Normal file
BIN
artwork/rgb-debug.xcf
Normal file
Binary file not shown.
BIN
artwork/splash.png
Normal file
BIN
artwork/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
artwork/splash.xcf
Normal file
BIN
artwork/splash.xcf
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 905 KiB |
Binary file not shown.
@ -5,6 +5,18 @@ with import ./initrd-order.nix;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.mobile.boot.stage-1.splash;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.mobile.boot.stage-1.splash = {
|
options.mobile.boot.stage-1.splash = {
|
||||||
@ -15,31 +27,29 @@ in
|
|||||||
Enables splash screen.
|
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 [
|
config.mobile.boot.stage-1 = lib.mkIf cfg.enable (mkMerge [
|
||||||
{
|
{
|
||||||
init = lib.mkOrder AFTER_FRAMEBUFFER_INIT ''
|
init = lib.mkOrder BEFORE_FRAMEBUFFER_INIT ''
|
||||||
show_splash() {
|
show_splash() {
|
||||||
ply-image /$1.png > /dev/null 2>&1
|
ply-image --clear=0x000000 /$1.png > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
show_splash loading
|
|
||||||
'';
|
'';
|
||||||
extraUtils = [
|
extraUtils = [
|
||||||
{ package = pkgs.ply-image; extraCommand = "cp -pv ${pkgs.glibc.out}/lib/libpthread.so.* $out/lib"; }
|
{ 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))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user