2
0
Fork 0

Update dhall-genode for policy-route changes

This commit is contained in:
Ehmry - 2020-10-22 14:57:33 +02:00
parent b40adf2e46
commit 580e40f09a
6 changed files with 31 additions and 22 deletions

View File

@ -6,8 +6,8 @@ dhallPackages.buildDhallPackage {
code = let
src = fetchgit {
url = "https://git.sr.ht/~ehmry/dhall-genode";
rev = "b9630af18be8956562ffba026f7bfc3b55b093b1";
sha256 = "072w6g3561qnhfw2j721584c6ds9bw4f9xq1j5ggj3p0fhf5yp5z";
rev = "1a6b3609a778f1644bc2831c366c65cce854ae42";
sha256 = "1zcnja7wmjx8rlm38x0lkgdz7cfwnd4m6jkasczrf7jqr53j73kv";
};
in src + "/package.dhall";

View File

@ -35,9 +35,16 @@ in λ(params : { bash : Text, coreutils : Text, script : Text }) →
</vfs>
''
]
, defaultPolicy = Some Init.Config.DefaultPolicy::{
, attributes = toMap { root = "/", writeable = "yes" }
}
, policies =
[ Init.Config.Policy::{
, service = "File_system"
, label =
Init.LabelSelector.Type.Partial
{ prefix = Some "shell", suffix = None Text }
, attributes = toMap
{ root = "/", writeable = "yes" }
}
]
}
, provides = [ "File_system" ]
, resources = Genode.Init.Resources::{
@ -96,8 +103,7 @@ in λ(params : { bash : Text, coreutils : Text, script : Text }) →
, ram = Genode.units.MiB 8
}
, routes =
[ Init.ServiceRoute.child "File_system" "vfs"
, { service =
[ { service =
{ name = "ROM"
, label =
Init.LabelSelector.Type.Partial

View File

@ -16,10 +16,7 @@ let init =
, caps = 256
, ram = Genode.units.MiB 3
}
, routes =
[ Init.ServiceRoute.parent "Timer"
, Init.ServiceRoute.child "Block" "block"
]
, routes = [ Init.ServiceRoute.parent "Timer" ]
}
, block =
Child.flat
@ -39,10 +36,16 @@ let init =
</vfs>
''
]
, defaultPolicy = Some Init.Config.DefaultPolicy::{
, attributes = toMap
{ file = "block.raw", writeable = "yes" }
}
, policies =
[ Init.Config.Policy::{
, service = "Block"
, attributes = toMap
{ file = "block.raw", writeable = "yes" }
, label =
Init.LabelSelector.Type.Partial
{ prefix = Some "solo5", suffix = None Text }
}
]
}
}
}

View File

@ -32,6 +32,7 @@ let init =
, attributes = toMap { mac = "02:02:02:02:03:00" }
, policies =
[ Init.Config.Policy::{
, service = "Nic"
, attributes = toMap { ip_addr = "10.0.0.2" }
, label =
Init.LabelSelector.Type.Partial

View File

@ -30,11 +30,13 @@ let init =
, defaultPolicy = Some Init.Config.DefaultPolicy::{=}
, policies =
[ Init.Config.Policy::{
, service = "Nic"
, attributes = toMap { ip_addr = "10.0.0.2" }
, label =
Init.LabelSelector.Type.Scoped "solo5 -> service0"
}
, Init.Config.Policy::{
, service = "Nic"
, attributes = toMap { ip_addr = "10.1.0.2" }
, label =
Init.LabelSelector.Type.Scoped "solo5 -> service1"

View File

@ -28,10 +28,7 @@ let rtc = Child.flat Child.Attributes::{ binary = "test-rtc" }
let pciInit =
Init::{
, verbose = True
, routes =
[ ServiceRoute.parent "Timer"
, ServiceRoute.child "Platform" "platform_drv"
]
, routes = [ ServiceRoute.parent "Timer" ]
, children = toMap
{ test-pci =
Child.flat
@ -49,7 +46,6 @@ let pciInit =
, ram = Genode.units.MiB 4
, constrainPhys = True
}
, provides = [ "Platform", "Acpi" ]
, romReports = [ label "acpi", label "smbios_table" ]
, routes =
[ ServiceRoute.parent "IRQ"
@ -67,7 +63,7 @@ let pciInit =
, constrainPhys = True
}
, reportRoms = [ label "acpi" ]
, provides = [ "Platform", "Acpi" ]
, provides = [ "Platform" ]
, routes =
[ ServiceRoute.parent "IRQ"
, ServiceRoute.parent "IO_MEM"
@ -76,13 +72,14 @@ let pciInit =
, config = Init.Config::{
, policies =
[ Init.Config.Policy::{
, service = "Platform"
, label = Init.LabelSelector.prefix "test-pci"
, content =
[ XML.leaf
{ name = "pci"
, attributes = toMap { class = "ALL" }
}
]
, label = Init.LabelSelector.prefix "test-pci"
}
]
}