nixos/gui: terminal is now a Gui client

This commit is contained in:
Ehmry - 2021-04-16 13:19:59 +02:00
parent af796dd627
commit fb35449420
2 changed files with 15 additions and 60 deletions

View File

@ -14,12 +14,15 @@ let Resources = Init.Resources
let ServiceRoute = Init.ServiceRoute
let routeLog =
λ(label : Text) →
ServiceRoute.childLabel "terminal_log" "LOG" (None Text) (Some label)
let routeRom =
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
in λ ( params
: { gui_fb : Text
, fontFile : Text
: { fontFile : Text
, log_core : Text
, terminal : Text
, terminal_log : Text
@ -30,33 +33,8 @@ in λ ( params
Init.toChild
Init::{
, routes = [ Init.ServiceRoute.parent "Timer" ]
, children =
[ { mapKey = "gui_fb"
, mapValue =
Child.flat
Child.Attributes::{
, binary = params.gui_fb
, exitPropagate = True
, resources = Resources::{ ram = Sigil.units.MiB 8 }
, routes = [ Init.ServiceRoute.parent "Gui" ]
, config = Init.Config::{
, attributes = toMap
{ origin = "top_left", xpos = "0", ypos = "0" }
, policies =
[ Init.Config.Policy::{
, service = "Framebuffer"
, label = Init.LabelSelector.prefix "terminal"
}
, Init.Config.Policy::{
, service = "Input"
, label = Init.LabelSelector.prefix "terminal"
}
]
}
}
}
, { mapKey = "terminal"
, mapValue =
, children = toMap
{ terminal =
Child.flat
Child.Attributes::{
, binary = params.terminal
@ -66,8 +44,7 @@ in λ ( params
, ram = Sigil.units.MiB 4
}
, routes =
[ ServiceRoute.child "Framebuffer" "gui_fb"
, ServiceRoute.child "Input" "gui_fb"
[ ServiceRoute.parent "Gui"
, ServiceRoute.parentLabel
"ROM"
(Some "vfs_ttf.lib.so")
@ -139,44 +116,22 @@ in λ ( params
]
}
}
}
, { mapKey = "terminal_log"
, mapValue =
Child.flat
Child.Attributes::{
, binary = params.terminal_log
, config = Init.Config::{
, policies =
[ Init.Config.Policy::{
, service = "LOG"
, label = Init.LabelSelector.prefix "core_log"
}
, Init.Config.Policy::{
, service = "LOG"
, label = Init.LabelSelector.prefix "kernel_log"
}
]
}
}
}
, { mapKey = "core_log"
, mapValue =
, terminal_log =
Child.flat Child.Attributes::{ binary = params.terminal_log }
, core_log =
Child.flat
Child.Attributes::{
, binary = params.log_core
, priorityOffset = 1
, routes = [ routeRom "core_log" ]
, routes = [ routeLog "core", routeRom "core_log" ]
}
}
, { mapKey = "kernel_log"
, mapValue =
, kernel_log =
Child.flat
Child.Attributes::{
, binary = params.log_core
, priorityOffset = 1
, routes = [ routeRom "kernel_log" ]
, routes = [ routeLog "kernel", routeRom "kernel_log" ]
}
}
]
}
Init.Attributes.default

View File

@ -98,7 +98,7 @@ in {
genode.core.children.consoleLog = lib.mkIf cfg.consoleLog.enable (let
erisInputs = (lib.attrsets.mapAttrs (_: lib.getEris "bin") {
inherit (pkgs.genodePackages) gui_fb log_core terminal terminal_log;
inherit (pkgs.genodePackages) log_core terminal terminal_log;
}) // (lib.attrsets.mapAttrs (_: lib.getEris "lib") {
inherit (pkgs.genodePackages) vfs_ttf;
});