fixup consolidation of eris store

This commit is contained in:
Ehmry - 2021-04-15 09:20:57 +02:00
parent d43df20002
commit 3d722d1d2a
2 changed files with 51 additions and 5 deletions

View File

@ -1,9 +1,55 @@
{ pkgs, ... }: {
imports = [ ./rom-fs.nix ./rom-memory.nix ];
{ config, lib, pkgs, ... }:
{
genode.core.children.eris_rom = {
package = pkgs.genodePackages.cached_fs_rom;
configFile = ./cached_fs_rom.dhall;
};
genode.core.children.eris_vfs = {
fs = let
vfsRump = lib.getEris' "lib" pkgs.genodePackages.rump "vfs_rump.lib.so";
in {
package = pkgs.genodePackages.vfs;
extraErisInputs = [ vfsRump ];
configFile = pkgs.writeText "rom-vfs.dhall" ''
let Sigil = env:DHALL_SIGIL
let VFS = Sigil.VFS
in ${./rom-vfs.dhall}
"${config.block.partitions.store.guid}"
Sigil.Init.Resources::{ caps = 256, ram = Sigil.units.MiB 32 }
( VFS.vfs
[ VFS.leafAttrs
"plugin"
(toMap { load = "${vfsRump.cap}", fs = "cd9660", ram = "12M", writeable="no" })
]
)
'';
};
memory = {
package = pkgs.genodePackages.vfs;
configFile = pkgs.writeText "rom-vfs.dhall" ''
let Sigil = env:DHALL_SIGIL
let VFS = Sigil.VFS
in ${./rom-vfs.dhall}
"${config.block.partitions.store.guid}"
Sigil.Init.Resources::{ ram = Sigil.units.MiB 4 }
( VFS.vfs
[ VFS.leafAttrs
"tar"
( toMap
{ name =
"${config.system.build.tarball}/tarball/${config.system.build.tarball.fileName}.tar"
}
)
]
)
'';
};
}.${config.genode.core.storeBackend};
}

View File

@ -21,9 +21,9 @@ let
bootConfigFile = let
storeBackendInputs = {
memory = [ config.system.build.tarball ];
}.${config.genode.core.storeBackend} or [ ];
storeBackendInputs =
lib.optional (config.genode.core.storeBackend == "memory")
config.system.build.tarball;
coreInputs =
# TODO: get rid of this?