2021-03-28 15:07:21 +02:00
|
|
|
let Sigil = env:DHALL_SIGIL
|
2020-12-10 19:27:53 +01:00
|
|
|
|
2021-03-28 15:07:21 +02:00
|
|
|
let Prelude = Sigil.Prelude
|
2020-12-10 19:27:53 +01:00
|
|
|
|
2021-03-28 15:07:21 +02:00
|
|
|
let VFS = Sigil.VFS
|
2020-12-10 19:27:53 +01:00
|
|
|
|
|
|
|
let XML = Prelude.XML
|
|
|
|
|
2021-03-28 15:07:21 +02:00
|
|
|
let Init = Sigil.Init
|
2020-12-10 19:27:53 +01:00
|
|
|
|
|
|
|
let Child = Init.Child
|
|
|
|
|
|
|
|
let Resources = Init.Resources
|
|
|
|
|
|
|
|
let ServiceRoute = Init.ServiceRoute
|
|
|
|
|
2021-04-16 13:19:59 +02:00
|
|
|
let routeLog =
|
|
|
|
λ(label : Text) →
|
|
|
|
ServiceRoute.childLabel "terminal_log" "LOG" (None Text) (Some label)
|
|
|
|
|
2021-04-15 09:25:28 +02:00
|
|
|
let routeRom =
|
2020-12-10 19:27:53 +01:00
|
|
|
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
|
|
|
|
|
2021-04-15 09:25:28 +02:00
|
|
|
in λ ( params
|
2021-04-16 13:19:59 +02:00
|
|
|
: { fontFile : Text
|
2021-04-15 09:25:28 +02:00
|
|
|
, log_core : Text
|
|
|
|
, terminal : Text
|
|
|
|
, terminal_log : Text
|
|
|
|
, vfs_ttf : Text
|
|
|
|
}
|
|
|
|
) →
|
2021-02-16 15:25:30 +01:00
|
|
|
λ(binary : Text) →
|
2020-12-10 19:27:53 +01:00
|
|
|
Init.toChild
|
|
|
|
Init::{
|
2021-04-15 09:25:28 +02:00
|
|
|
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
2021-04-16 13:19:59 +02:00
|
|
|
, children = toMap
|
|
|
|
{ terminal =
|
2020-12-10 19:27:53 +01:00
|
|
|
Child.flat
|
|
|
|
Child.Attributes::{
|
2021-04-15 09:25:28 +02:00
|
|
|
, binary = params.terminal
|
2020-12-10 19:27:53 +01:00
|
|
|
, exitPropagate = True
|
|
|
|
, resources = Resources::{
|
|
|
|
, caps = 256
|
2021-03-28 15:07:21 +02:00
|
|
|
, ram = Sigil.units.MiB 4
|
2020-12-10 19:27:53 +01:00
|
|
|
}
|
|
|
|
, routes =
|
2021-04-16 13:19:59 +02:00
|
|
|
[ ServiceRoute.parent "Gui"
|
2021-04-15 09:25:28 +02:00
|
|
|
, ServiceRoute.parentLabel
|
|
|
|
"ROM"
|
|
|
|
(Some "vfs_ttf.lib.so")
|
|
|
|
(Some params.vfs_ttf)
|
2020-12-10 19:27:53 +01:00
|
|
|
]
|
|
|
|
, config = Init.Config::{
|
|
|
|
, content =
|
|
|
|
[ XML.element
|
|
|
|
{ name = "palette"
|
|
|
|
, attributes = toMap
|
2021-04-15 09:25:28 +02:00
|
|
|
{ uri = "https://pippin.gimp.org/ametameric/"
|
|
|
|
, notes = "Black on white is unsupported."
|
|
|
|
}
|
2020-12-10 19:27:53 +01:00
|
|
|
, content =
|
|
|
|
let color =
|
|
|
|
λ(index : Natural) →
|
|
|
|
λ(value : Text) →
|
|
|
|
XML.leaf
|
|
|
|
{ name = "color"
|
|
|
|
, attributes = toMap
|
|
|
|
{ index = Natural/show index
|
|
|
|
, value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
in [ color 0 "#000000"
|
|
|
|
, color 1 "#a02929"
|
|
|
|
, color 2 "#4aa08b"
|
|
|
|
, color 3 "#878453"
|
|
|
|
, color 4 "#2424ed"
|
|
|
|
, color 5 "#ab4adf"
|
|
|
|
, color 6 "#3b6bb1"
|
|
|
|
, color 7 "#c3c3c3"
|
|
|
|
, color 8 "#6f6f6f"
|
|
|
|
, color 9 "#edac82"
|
|
|
|
, color 10 "#99edba"
|
|
|
|
, color 11 "#e9d808"
|
|
|
|
, color 12 "#82b4ed"
|
|
|
|
, color 13 "#d66fed"
|
|
|
|
, color 14 "#1de1ed"
|
|
|
|
, color 15 "#ffffff"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
, VFS.vfs
|
|
|
|
[ VFS.leafAttrs
|
|
|
|
"rom"
|
|
|
|
(toMap { name = params.fontFile })
|
|
|
|
, VFS.dir
|
|
|
|
"fonts"
|
|
|
|
[ VFS.dir
|
|
|
|
"monospace"
|
|
|
|
[ VFS.leafAttrs
|
|
|
|
"ttf"
|
|
|
|
( toMap
|
|
|
|
{ name = "regular"
|
|
|
|
, path = params.fontFile
|
|
|
|
, size_px = "10"
|
|
|
|
}
|
|
|
|
)
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
, policies =
|
|
|
|
[ Init.Config.Policy::{
|
|
|
|
, service = "Terminal"
|
|
|
|
, label = Init.LabelSelector.prefix "terminal_log"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2021-04-16 13:19:59 +02:00
|
|
|
, terminal_log =
|
|
|
|
Child.flat Child.Attributes::{ binary = params.terminal_log }
|
|
|
|
, core_log =
|
2020-12-10 19:27:53 +01:00
|
|
|
Child.flat
|
|
|
|
Child.Attributes::{
|
2021-04-15 09:25:28 +02:00
|
|
|
, binary = params.log_core
|
|
|
|
, priorityOffset = 1
|
2021-04-16 13:19:59 +02:00
|
|
|
, routes = [ routeLog "core", routeRom "core_log" ]
|
2020-12-10 19:27:53 +01:00
|
|
|
}
|
2021-04-16 13:19:59 +02:00
|
|
|
, kernel_log =
|
2020-12-10 19:27:53 +01:00
|
|
|
Child.flat
|
|
|
|
Child.Attributes::{
|
2021-04-15 09:25:28 +02:00
|
|
|
, binary = params.log_core
|
|
|
|
, priorityOffset = 1
|
2021-04-16 13:19:59 +02:00
|
|
|
, routes = [ routeLog "kernel", routeRom "kernel_log" ]
|
2020-12-10 19:27:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Init.Attributes.default
|