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.

vmm_arm.dhall 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. let Test = ./test.dhall ? env:DHALL_GENODE_TEST
  2. let Genode = Test.Genode
  3. let XML = Genode.Prelude.XML
  4. let Init = Genode.Init
  5. let ServiceRoute = Init.ServiceRoute
  6. let Child = Init.Child
  7. in λ(guest : { linux : Text, dtb : Text, initrd : Text })
  8. → let init =
  9. Init::{
  10. , children = toMap
  11. { nic =
  12. Child.flat
  13. Child.Attributes::{
  14. , binary = "nic_router"
  15. , config = Init.Config::{
  16. , content =
  17. [ XML.element
  18. { name = "domain"
  19. , attributes = toMap
  20. { name = "default"
  21. , interface = "10.0.1.1/24"
  22. }
  23. , content =
  24. [ XML.leaf
  25. { name = "dhcp-server"
  26. , attributes = toMap
  27. { ip_first = "10.0.1.2"
  28. , ip_last = "10.0.1.254"
  29. }
  30. }
  31. ]
  32. }
  33. ]
  34. , defaultPolicy = Some Init.Config.Policy::{
  35. , attributes = toMap { domain = "default" }
  36. }
  37. }
  38. , provides = [ "Nic" ]
  39. , resources = Init.Resources::{ ram = Genode.units.MiB 8 }
  40. }
  41. , earlycon =
  42. Child.flat
  43. Child.Attributes::{
  44. , binary = "log_terminal"
  45. , provides = [ "Terminal" ]
  46. }
  47. , terminal_crosslink =
  48. Child.flat
  49. Child.Attributes::{
  50. , binary = "terminal_crosslink"
  51. , provides = [ "Terminal" ]
  52. }
  53. , vmm =
  54. Child.flat
  55. Child.Attributes::{
  56. , binary = "vmm"
  57. , resources = Init.Resources::{
  58. , caps = 256
  59. , ram = Genode.units.MiB 256
  60. }
  61. , routes =
  62. [ ServiceRoute.parent "VM"
  63. , ServiceRoute.child "Nic" "nic"
  64. , ServiceRoute.childLabel
  65. "Terminal"
  66. "earlycon"
  67. (Some "earlycon")
  68. (None Text)
  69. , ServiceRoute.child "Terminal" "terminal_crosslink"
  70. ]
  71. }
  72. , vm =
  73. Child.flat
  74. Child.Attributes::{
  75. , binary = "test-terminal_expect_send"
  76. , config = Init.Config::{
  77. , attributes = toMap
  78. { expect = "/ #", send = "ls", verbose = "yes" }
  79. }
  80. , routes =
  81. [ ServiceRoute.child "Terminal" "terminal_crosslink" ]
  82. }
  83. }
  84. , routes = [ ServiceRoute.parent "Timer" ]
  85. }
  86. in Test::{
  87. , children = Test.initToChildren init
  88. , rom = Genode.Boot.toRomPaths (toMap guest)
  89. }