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.

driver_manager.dhall 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. let Test = ./test.dhall ? env:DHALL_GENODE_TEST
  2. let drivers = env:drivers ? ../compositions/pc-drivers.dhall
  3. let Genode = Test.Genode
  4. let Init = Genode.Init
  5. let Child = Init.Child
  6. let Resources = Init.Resources
  7. let ServiceRoute = Init.ServiceRoute
  8. let parentRomRoute =
  9. λ(from : Text)
  10. → λ(to : Text)
  11. → ServiceRoute.parentLabel "ROM" (Some from) (Some to)
  12. let childRomRoute =
  13. λ(child : Text)
  14. → λ(from : Text)
  15. → ServiceRoute.childLabel "ROM" child (Some from) (None Text)
  16. let label = λ(_ : Text) → { local = _, route = _ }
  17. let init =
  18. Init::{
  19. , verbose = True
  20. , routes = [ ServiceRoute.parent "Timer" ]
  21. , children = toMap
  22. { drivers =
  23. Init.toChild
  24. drivers
  25. Init.Attributes::{
  26. , provides = [ "Block", "Framebuffer", "Input" ]
  27. , resources = Init.Resources::{ ram = Genode.units.MiB 4 }
  28. , romReports = [ label "block_devices" ]
  29. , routes =
  30. [ parentRomRoute "managed/input_filter" "input_filter.config"
  31. , parentRomRoute " numlock_remap" "numlock_remap.config"
  32. , childRomRoute "dynamic_rom" "capslock"
  33. , childRomRoute "dynamic_rom" "numlock"
  34. , childRomRoute "dynamic_rom" "system"
  35. , ServiceRoute.child "Report" "_report_rom"
  36. , ServiceRoute.parent "IRQ"
  37. , ServiceRoute.parent "IO_MEM"
  38. , ServiceRoute.parent "IO_PORT"
  39. , ServiceRoute.parent "Timer"
  40. ]
  41. }
  42. , dynamic_rom =
  43. Child.flat
  44. Child.Attributes::{
  45. , binary = "dynamic_rom"
  46. , resources = Resources::{ ram = Genode.units.MiB 4 }
  47. , provides = [ "ROM" ]
  48. , config = Genode.Init.Config::{
  49. , content =
  50. [ Genode.Prelude.XML.text
  51. ''
  52. <rom name="system">
  53. <inline>
  54. <system state=""/>
  55. </inline>
  56. <sleep milliseconds="10000"/>
  57. </rom>
  58. ''
  59. ]
  60. }
  61. }
  62. , test-driver_manager =
  63. Child.flat
  64. Child.Attributes::{
  65. , binary = "test-driver_manager"
  66. , config = Init.Config::{
  67. , content =
  68. [ Genode.Prelude.XML.text
  69. ''
  70. <check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
  71. <check_input/>
  72. <check_framebuffer/>
  73. ''
  74. ]
  75. }
  76. , reportRoms = [ label "block_devices" ]
  77. , routes =
  78. [ ServiceRoute.child "Block" "drivers"
  79. , ServiceRoute.child "Framebuffer" "drivers"
  80. , ServiceRoute.child "Input" "drivers"
  81. ]
  82. }
  83. }
  84. }
  85. let rom =
  86. Genode.Boot.toRomTexts
  87. ( toMap
  88. { capslock = "<feature_creep/>"
  89. , numlock = "<feature_creep/>"
  90. , usb_policy = "<usb/>"
  91. }
  92. # [ { mapKey = "fb_drv.config"
  93. , mapValue =
  94. ''
  95. <config width="1024" height="768" buffered="yes"/>
  96. <report connectors="yes"/>
  97. </config>
  98. ''
  99. }
  100. , { mapKey = "input_filter.config"
  101. , mapValue =
  102. ''
  103. <config>
  104. <input label="ps2"/>
  105. <input label="usb"/>
  106. <output>
  107. <chargen>
  108. <remap>
  109. <key name="KEY_F11" to="KEY_RESTART"/>
  110. <key name="KEY_F12" to="KEY_DASHBOARD"/>
  111. <key name="KEY_LEFTMETA" to="KEY_SCREEN"/>
  112. <merge>
  113. <accelerate max="50" sensitivity_percent="1000" curve="127">
  114. <button-scroll>
  115. <input name="ps2"/>
  116. <vertical button="BTN_MIDDLE" speed_percent="-10"/>
  117. <horizontal button="BTN_MIDDLE" speed_percent="-10"/>
  118. </button-scroll>
  119. </accelerate>
  120. <input name="usb"/>
  121. </merge>
  122. </remap>
  123. <mod1>
  124. <key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
  125. </mod1>
  126. <mod2>
  127. <key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
  128. </mod2>
  129. <mod3>
  130. <key name="KEY_RIGHTALT"/> <!-- AltGr -->
  131. </mod3>
  132. <repeat delay_ms="230" rate_ms="40"/>
  133. </chargen>
  134. </output>
  135. </config>
  136. ''
  137. }
  138. ]
  139. )
  140. in Test::{ children = Test.initToChildren init, rom = rom }