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.
 
 
 
 
 

153 lines
5.3 KiB

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
''
<rom name="system">
<inline>
<system state=""/>
</inline>
<sleep milliseconds="10000"/>
</rom>
''
]
}
}
, test-driver_manager =
Child.flat
Child.Attributes::{
, binary = "test-driver_manager"
, config = Init.Config::{
, content =
[ Genode.Prelude.XML.text
''
<check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
<check_input/>
<check_framebuffer/>
''
]
}
, reportRoms = [ label "block_devices" ]
, routes =
[ ServiceRoute.child "Block" "drivers"
, ServiceRoute.child "Framebuffer" "drivers"
, ServiceRoute.child "Input" "drivers"
]
}
}
}
let rom =
Genode.Boot.toRomTexts
( toMap
{ capslock = "<feature_creep/>"
, numlock = "<feature_creep/>"
, usb_policy = "<usb/>"
}
# [ { mapKey = "fb_drv.config"
, mapValue =
''
<config width="1024" height="768" buffered="yes"/>
<report connectors="yes"/>
</config>
''
}
, { mapKey = "input_filter.config"
, mapValue =
''
<config>
<input label="ps2"/>
<input label="usb"/>
<output>
<chargen>
<remap>
<key name="KEY_F11" to="KEY_RESTART"/>
<key name="KEY_F12" to="KEY_DASHBOARD"/>
<key name="KEY_LEFTMETA" to="KEY_SCREEN"/>
<merge>
<accelerate max="50" sensitivity_percent="1000" curve="127">
<button-scroll>
<input name="ps2"/>
<vertical button="BTN_MIDDLE" speed_percent="-10"/>
<horizontal button="BTN_MIDDLE" speed_percent="-10"/>
</button-scroll>
</accelerate>
<input name="usb"/>
</merge>
</remap>
<mod1>
<key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
</mod1>
<mod2>
<key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
</mod2>
<mod3>
<key name="KEY_RIGHTALT"/> <!-- AltGr -->
</mod3>
<repeat delay_ms="230" rate_ms="40"/>
</chargen>
</output>
</config>
''
}
]
)
in Test::{ children = Test.initToChildren init, rom = rom }