Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
3.6 KiB

let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let Genode = Test.Genode
let XML = Genode.Prelude.XML
let Init = Genode.Init
let ServiceRoute = Init.ServiceRoute
let Child = Init.Child
in λ(guest : { linux : Text, dtb : Text, initrd : Text })
→ let init =
Init::{
, children = toMap
{ nic =
Child.flat
Child.Attributes::{
, binary = "nic_router"
, config = Init.Config::{
, content =
[ XML.element
{ name = "domain"
, attributes = toMap
{ name = "default"
, interface = "10.0.1.1/24"
}
, content =
[ XML.leaf
{ name = "dhcp-server"
, attributes = toMap
{ ip_first = "10.0.1.2"
, ip_last = "10.0.1.254"
}
}
]
}
]
, defaultPolicy = Some Init.Config.Policy::{
, attributes = toMap { domain = "default" }
}
}
, provides = [ "Nic" ]
, resources = Init.Resources::{ ram = Genode.units.MiB 8 }
}
, earlycon =
Child.flat
Child.Attributes::{
, binary = "log_terminal"
, provides = [ "Terminal" ]
}
, terminal_crosslink =
Child.flat
Child.Attributes::{
, binary = "terminal_crosslink"
, provides = [ "Terminal" ]
}
, vmm =
Child.flat
Child.Attributes::{
, binary = "vmm"
, resources = Init.Resources::{
, caps = 256
, ram = Genode.units.MiB 256
}
, routes =
[ ServiceRoute.parent "VM"
, ServiceRoute.child "Nic" "nic"
, ServiceRoute.childLabel
"Terminal"
"earlycon"
(Some "earlycon")
(None Text)
, ServiceRoute.child "Terminal" "terminal_crosslink"
]
}
, vm =
Child.flat
Child.Attributes::{
, binary = "test-terminal_expect_send"
, config = Init.Config::{
, attributes = toMap
{ expect = "/ #", send = "ls", verbose = "yes" }
}
, routes =
[ ServiceRoute.child "Terminal" "terminal_crosslink" ]
}
}
, routes = [ ServiceRoute.parent "Timer" ]
}
in Test::{
, children = Test.initToChildren init
, rom = Genode.Boot.toRomPaths (toMap guest)
}