You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
let Genode =
|
|
env:DHALL_GENODE
|
|
? https://git.sr.ht/~ehmry/dhall-genode/blob/master/package.dhall
|
|
|
|
let Init = Genode.Init
|
|
|
|
let Child = Init.Child
|
|
|
|
in Child.flat
|
|
Child.Attributes::{
|
|
, binary = "hello"
|
|
, exitPropagate = True
|
|
, resources = Genode.Init.Resources::{
|
|
, caps = 500
|
|
, ram = Genode.units.MiB 10
|
|
}
|
|
, config = Init.Config::{
|
|
, content =
|
|
let XML = Genode.Prelude.XML
|
|
|
|
in [ XML.leaf
|
|
{ name = "libc"
|
|
, attributes = toMap
|
|
{ stdin = "/dev/null"
|
|
, stdout = "/dev/log"
|
|
, stderr = "/dev/log"
|
|
}
|
|
}
|
|
, XML.element
|
|
{ name = "vfs"
|
|
, attributes = XML.emptyAttributes
|
|
, content =
|
|
let dir =
|
|
λ(name : Text) →
|
|
λ(content : List XML.Type) →
|
|
XML.element
|
|
{ name = "dir"
|
|
, content
|
|
, attributes = toMap { name }
|
|
}
|
|
|
|
let leaf =
|
|
λ(name : Text) →
|
|
XML.leaf
|
|
{ name, attributes = XML.emptyAttributes }
|
|
|
|
in [ dir "dev" [ leaf "log", leaf "null" ] ]
|
|
}
|
|
]
|
|
}
|
|
}
|