-- SPDX-License-Identifier: CC0-1.0
let Test = ./test.dhall ? env:DHALL_GENODE_TEST
let drivers = env:drivers ? ../compositions/pc-drivers.dhall
let Genode = Test.Genode
let Init = Genode.Init
let Child = Init.Child
let Resources = Init.Resources
let ServiceRoute = Init.ServiceRoute
let parentRomRoute =
λ(from : Text)
→ λ(to : Text)
→ ServiceRoute.parentLabel "ROM" (Some from) (Some to)
let childRomRoute =
λ(child : Text)
→ λ(from : Text)
→ ServiceRoute.childLabel "ROM" child (Some from) (None Text)
let label = λ(_ : Text) → { local = _, route = _ }
let init =
Init::{
, verbose = True
, routes = [ ServiceRoute.parent "Timer" ]
, children = toMap
{ drivers =
Init.toChild
drivers
Init.Attributes::{
, provides = [ "Block", "Framebuffer", "Input" ]
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
, romReports = [ label "block_devices" ]
, routes =
[ parentRomRoute "managed/input_filter" "input_filter.config"
, parentRomRoute " numlock_remap" "numlock_remap.config"
, childRomRoute "dynamic_rom" "capslock"
, childRomRoute "dynamic_rom" "numlock"
, childRomRoute "dynamic_rom" "system"
, ServiceRoute.child "Report" "_report_rom"
, ServiceRoute.parent "IRQ"
, ServiceRoute.parent "IO_MEM"
, ServiceRoute.parent "IO_PORT"
, ServiceRoute.parent "Timer"
]
}
, dynamic_rom =
Child.flat
Child.Attributes::{
, binary = "dynamic_rom"
, resources = Resources::{ ram = Genode.units.MiB 4 }
, provides = [ "ROM" ]
, config = Genode.Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
''
]
}
}
, test-driver_manager =
Child.flat
Child.Attributes::{
, binary = "test-driver_manager"
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
''
]
}
, reportRoms = [ label "block_devices" ]
, routes =
[ ServiceRoute.child "Block" "drivers"
, ServiceRoute.child "Framebuffer" "drivers"
, ServiceRoute.child "Input" "drivers"
]
}
}
}
let rom =
Genode.Boot.toRomTexts
( toMap
{ capslock = ""
, numlock = ""
, usb_policy = ""
}
# [ { mapKey = "fb_drv.config"
, mapValue =
''
''
}
, { mapKey = "input_filter.config"
, mapValue =
''
''
}
]
)
in Test::{ children = Test.initToChildren init, rom = rom }