|
|
|
@ -19,7 +19,9 @@ in λ ( params
|
|
|
|
|
: { args : List Text
|
|
|
|
|
, binary : Text
|
|
|
|
|
, coreutils : Text
|
|
|
|
|
, extraVfs : List XML.Type
|
|
|
|
|
, interface : Optional Text
|
|
|
|
|
, ramQuotaMiB : Natural
|
|
|
|
|
}
|
|
|
|
|
) →
|
|
|
|
|
let socketsVfs =
|
|
|
|
@ -52,40 +54,44 @@ in λ ( params
|
|
|
|
|
, config = Init.Config::{
|
|
|
|
|
, content =
|
|
|
|
|
[ VFS.vfs
|
|
|
|
|
[ VFS.dir
|
|
|
|
|
"dev"
|
|
|
|
|
( [ VFS.dir "pipes" [ VFS.leaf "pipe" ]
|
|
|
|
|
, VFS.leaf "log"
|
|
|
|
|
, VFS.leaf "null"
|
|
|
|
|
, VFS.leafAttrs
|
|
|
|
|
"terminal"
|
|
|
|
|
( toMap
|
|
|
|
|
{ name = "entropy"
|
|
|
|
|
, label = "entropy"
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
, VFS.leaf "rtc"
|
|
|
|
|
, VFS.leaf "zero"
|
|
|
|
|
( [ VFS.dir
|
|
|
|
|
"dev"
|
|
|
|
|
( [ VFS.dir "pipes" [ VFS.leaf "pipe" ]
|
|
|
|
|
, VFS.leaf "log"
|
|
|
|
|
, VFS.leaf "null"
|
|
|
|
|
, VFS.leafAttrs
|
|
|
|
|
"terminal"
|
|
|
|
|
( toMap
|
|
|
|
|
{ name = "entropy"
|
|
|
|
|
, label = "entropy"
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
, VFS.leaf "rtc"
|
|
|
|
|
, VFS.leaf "zero"
|
|
|
|
|
]
|
|
|
|
|
# socketsVfs
|
|
|
|
|
)
|
|
|
|
|
, VFS.dir
|
|
|
|
|
"usr"
|
|
|
|
|
[ VFS.dir
|
|
|
|
|
"bin"
|
|
|
|
|
[ VFS.symlink
|
|
|
|
|
"env"
|
|
|
|
|
"${params.coreutils}/bin/env"
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
# socketsVfs
|
|
|
|
|
)
|
|
|
|
|
, VFS.dir
|
|
|
|
|
"usr"
|
|
|
|
|
[ VFS.dir
|
|
|
|
|
"bin"
|
|
|
|
|
[ VFS.symlink
|
|
|
|
|
"env"
|
|
|
|
|
"${params.coreutils}/bin/env"
|
|
|
|
|
, VFS.dir "tmp" [ VFS.leaf "ram" ]
|
|
|
|
|
, VFS.dir
|
|
|
|
|
"nix"
|
|
|
|
|
[ VFS.dir
|
|
|
|
|
"store"
|
|
|
|
|
[ VFS.fs
|
|
|
|
|
VFS.FS::{ label = "nix-store" }
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
, VFS.dir "tmp" [ VFS.leaf "ram" ]
|
|
|
|
|
, VFS.dir
|
|
|
|
|
"nix"
|
|
|
|
|
[ VFS.dir
|
|
|
|
|
"store"
|
|
|
|
|
[ VFS.fs VFS.FS::{ label = "nix-store" } ]
|
|
|
|
|
]
|
|
|
|
|
]
|
|
|
|
|
# params.extraVfs
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
, policies =
|
|
|
|
|
[ Init.Config.Policy::{
|
|
|
|
@ -98,7 +104,7 @@ in λ ( params
|
|
|
|
|
, service = "File_system"
|
|
|
|
|
, label = Init.LabelSelector.prefix "vfs_rom"
|
|
|
|
|
, attributes = toMap
|
|
|
|
|
{ root = "/", writeable = "yes" }
|
|
|
|
|
{ root = "/", writeable = "no" }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
@ -128,7 +134,7 @@ in λ ( params
|
|
|
|
|
, exitPropagate = True
|
|
|
|
|
, resources = Genode.Init.Resources::{
|
|
|
|
|
, caps = 256
|
|
|
|
|
, ram = Genode.units.MiB 8
|
|
|
|
|
, ram = Genode.units.MiB params.ramQuotaMiB
|
|
|
|
|
}
|
|
|
|
|
, config =
|
|
|
|
|
( Libc.toConfig
|
|
|
|
|