2
0
Fork 0
genodepkgs/tests/driver-nova-config.dhall

69 lines
2.6 KiB
Plaintext

-- SPDX-License-Identifier: CC0-1.0
let Genode = env:DHALL_GENODE
in λ(args : Genode.Boot.Type)
→ { config =
Genode.Init::{
, verbose = True
, defaultRoutes =
Genode.Init.default.defaultRoutes
# [ Genode.ServiceRoute.parent "IO_MEM"
, Genode.ServiceRoute.parent "IO_PORT"
, Genode.ServiceRoute.parent "IRQ"
, Genode.ServiceRoute.child "Timer" "timer"
]
, children =
[ { mapKey = "timer"
, mapValue =
Genode.Init.Start::{
, binary = "nova_timer_drv"
, resources = { caps = 96, ram = Genode.units.MiB 1 }
, provides = [ "Timer" ]
}
}
, { mapKey = "harness"
, mapValue =
let child = Genode.Init.toStart args.config
in Genode.Init.Start::{
, binary = "sotest-harness"
, exitPropagate = True
, resources =
{ caps = child.resources.caps + 128
, ram = child.resources.ram + Genode.units.MiB 1
}
, config =
Some
( Genode.Prelude.XML.element
{ name = "config"
, attributes =
Genode.Prelude.XML.emptyAttributes
, content =
[ Genode.Init.Start.toXML "init" child ]
}
)
, routes =
[ Genode.ServiceRoute.parentLabel
"LOG"
(Some "SOTEST")
(Some "platform")
]
}
}
]
}
, rom =
let manifest = env:MANIFEST
in Genode.Boot.toRomPaths
[ { mapKey = "ld.lib.so"
, mapValue = manifest.base-nova.lib.ld-nova.mapValue
}
, manifest.base-nova.bin.nova_timer_drv
, manifest.os.bin.init
, manifest.sotest-producer.bin.sotest-harness
]
# args.rom
}