nixos-module: graphical and fs log
parent
78cf596db3
commit
e203c4b57b
@ -0,0 +1,58 @@
|
||||
-- SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let Init = Genode.Init
|
||||
|
||||
let Child = Init.Child
|
||||
|
||||
let ServiceRoute = Init.ServiceRoute
|
||||
|
||||
let routeLogRom =
|
||||
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
|
||||
|
||||
in Init::{
|
||||
, verbose = True
|
||||
, children = toMap
|
||||
{ fs_log =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "fs_log"
|
||||
, config = Init.Config::{
|
||||
, defaultPolicy = Some Init.Config.DefaultPolicy::{
|
||||
, attributes = toMap { merge = "yes", truncate = "yes" }
|
||||
}
|
||||
}
|
||||
, exitPropagate = True
|
||||
, provides = [ "LOG" ]
|
||||
, routes = [ ServiceRoute.parent "File_system" ]
|
||||
}
|
||||
, log_core =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "log_core"
|
||||
, routes =
|
||||
[ routeLogRom "core_log"
|
||||
, ServiceRoute.childLabel
|
||||
"LOG"
|
||||
"fs_log"
|
||||
(Some "log")
|
||||
(Some "core")
|
||||
]
|
||||
}
|
||||
, log_kernel =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "log_core"
|
||||
, routes =
|
||||
[ routeLogRom "kernel_log"
|
||||
, ServiceRoute.childLabel
|
||||
"LOG"
|
||||
"fs_log"
|
||||
(Some "log")
|
||||
(Some "kernel")
|
||||
]
|
||||
}
|
||||
}
|
||||
, routes = [ ServiceRoute.parent "Timer" ]
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
-- SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let Prelude = Genode.Prelude
|
||||
|
||||
let XML = Prelude.XML
|
||||
|
||||
let Init = Genode.Init
|
||||
|
||||
let Child = Init.Child
|
||||
|
||||
let Resources = Init.Resources
|
||||
|
||||
let ServiceRoute = Init.ServiceRoute
|
||||
|
||||
let routeLogRom =
|
||||
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
|
||||
|
||||
in Init::{
|
||||
, verbose = True
|
||||
, routes =
|
||||
Prelude.List.map
|
||||
Text
|
||||
Init.ServiceRoute.Type
|
||||
Init.ServiceRoute.parent
|
||||
[ "Nitpicker", "Rtc", "Timer" ]
|
||||
, children = toMap
|
||||
{ nit_fb =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "nit_fb"
|
||||
, config = Init.Config::{
|
||||
, attributes = toMap
|
||||
{ initial_width = "600", initial_height = "600" }
|
||||
}
|
||||
, exitPropagate = True
|
||||
, provides = [ "Framebuffer", "Input" ]
|
||||
, resources = Resources::{ ram = Genode.units.MiB 8 }
|
||||
}
|
||||
, terminal =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "terminal"
|
||||
, config = Init.Config::{
|
||||
, content =
|
||||
[ XML.element
|
||||
{ name = "vfs"
|
||||
, attributes = XML.emptyAttributes
|
||||
, content =
|
||||
[ XML.element
|
||||
{ name = "dir"
|
||||
, attributes = toMap { name = "fonts" }
|
||||
, content =
|
||||
[ XML.leaf
|
||||
{ name = "fs"
|
||||
, attributes = toMap { label = "fonts" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
, provides = [ "Terminal" ]
|
||||
, resources = Resources::{ caps = 256, ram = Genode.units.MiB 4 }
|
||||
, routes =
|
||||
[ ServiceRoute.child "Framebuffer" "nit_fb"
|
||||
, ServiceRoute.child "Input" "nit_fb"
|
||||
, ServiceRoute.parent "File_system"
|
||||
]
|
||||
}
|
||||
, terminal_log =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "terminal_log"
|
||||
, provides = [ "LOG" ]
|
||||
, routes = [ ServiceRoute.child "Terminal" "terminal" ]
|
||||
}
|
||||
, log_core =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "log_core"
|
||||
, routes =
|
||||
[ routeLogRom "core_log"
|
||||
, ServiceRoute.childLabel
|
||||
"LOG"
|
||||
"terminal_log"
|
||||
(Some "log")
|
||||
(Some "core")
|
||||
]
|
||||
}
|
||||
, log_kernel =
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary = "log_core"
|
||||
, routes =
|
||||
[ routeLogRom "kernel_log"
|
||||
, ServiceRoute.childLabel
|
||||
"LOG"
|
||||
"terminal_log"
|
||||
(Some "log")
|
||||
(Some "kernel")
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue