150 lines
5.4 KiB
Plaintext
150 lines
5.4 KiB
Plaintext
-- SPDX-License-Identifier: CC0-1.0
|
|
|
|
let drivers = env:drivers ? ../compositions/pc-drivers.dhall
|
|
|
|
let Genode = env:DHALL_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 = _ }
|
|
|
|
in Genode.Boot::{
|
|
, config = Init::{
|
|
, verbose = True
|
|
, 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 "Timer"
|
|
, Genode.Init.ServiceRoute.parent "IRQ"
|
|
, Genode.Init.ServiceRoute.parent "IO_MEM"
|
|
, Genode.Init.ServiceRoute.parent "IO_PORT"
|
|
]
|
|
}
|
|
, 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"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
, 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>
|
|
''
|
|
}
|
|
]
|
|
)
|
|
}
|