mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-17 14:57:22 +03:00
boot/init: Use the new boot/splash applet
This commit is contained in:
parent
426f31113d
commit
c35116cdcd
@ -13,7 +13,7 @@ log("")
|
||||
# To these tasks, add all Singleton tasks found under tasks/*
|
||||
|
||||
# Without any added dependency, show a first splash ASAP
|
||||
Tasks::Splash.new("stage-0")
|
||||
Tasks::Splash.new("/etc/logo.svg")
|
||||
|
||||
# Some software (mainly extfs tools) bark angrily and fail when this is missing.
|
||||
Tasks::Symlink.new("/proc/mounts", "/etc/mtab")
|
||||
@ -28,9 +28,6 @@ Mounting.create_boot_mount_points()
|
||||
Tasks::Directory.new(dir)
|
||||
end
|
||||
|
||||
Tasks::Splash.new("stage-1")
|
||||
.add_dependency(:Target, :Devices)
|
||||
|
||||
Tasks::Modules.new(*Configuration["kernel"]["modules"])
|
||||
|
||||
Tasks::go()
|
||||
|
@ -9,7 +9,8 @@ class Tasks::Splash < Task
|
||||
|
||||
def run()
|
||||
begin
|
||||
System.run("ply-image", "/splash.#{image}.png")
|
||||
System.run($PROGRAM_NAME, "/applets/boot-splash.mrb", image)
|
||||
# Don't fail the boot if the splash fails
|
||||
rescue System::CommandError
|
||||
end
|
||||
end
|
||||
|
@ -5,15 +5,6 @@ with lib;
|
||||
let
|
||||
cfg = config.mobile.boot.stage-1.splash;
|
||||
image = name: ../artwork + "/${name}.png";
|
||||
addSplash = name:
|
||||
{
|
||||
contents = [
|
||||
{
|
||||
object = (builtins.path { path = image name; });
|
||||
symlink = "/${name}.png";
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
options.mobile.boot.stage-1.splash = {
|
||||
@ -24,13 +15,6 @@ 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 [
|
||||
@ -39,14 +23,6 @@ in
|
||||
{ package = pkgs.ply-image; extraCommand = "cp -pv ${pkgs.glibc.out}/lib/libpthread.so.* $out/lib"; }
|
||||
];
|
||||
}
|
||||
|
||||
# This is as early as we can splash...
|
||||
(addSplash "splash.stage-0")
|
||||
# Though there's still some setting-up in stage-1,
|
||||
# This is where "init is ready".
|
||||
(addSplash "splash.stage-1")
|
||||
# FIXME: Add a task / example (debug) image using this.
|
||||
#(mkIf cfg.rgb-debug (addSplash "rgb-debug"))
|
||||
]);
|
||||
|
||||
# This happens in stage-2. This is why we're not using `addSplash`.
|
||||
|
Loading…
Reference in New Issue
Block a user