diff --git a/nixos-modules/genode-core.nix b/nixos-modules/genode-core.nix index db8102b..ab0fee3 100644 --- a/nixos-modules/genode-core.nix +++ b/nixos-modules/genode-core.nix @@ -116,6 +116,7 @@ in { ++ (with pkgs.genodePackages; [ init cached_fs_rom + jitter_sponge report_rom vfs ]))); diff --git a/nixos-modules/genode-init.nix b/nixos-modules/genode-init.nix index eec0960..da46749 100644 --- a/nixos-modules/genode-init.nix +++ b/nixos-modules/genode-init.nix @@ -41,11 +41,12 @@ in { in Genode.Init::{ , routes = [ Genode.Init.ServiceRoute.parent "File_system" - , Genode.Init.ServiceRoute.parent "Rtc" - , Genode.Init.ServiceRoute.parent "Timer" - , Genode.Init.ServiceRoute.parent "IRQ" , Genode.Init.ServiceRoute.parent "IO_MEM" , Genode.Init.ServiceRoute.parent "IO_PORT" + , Genode.Init.ServiceRoute.parent "IRQ" + , Genode.Init.ServiceRoute.parent "Rtc" + , Genode.Init.ServiceRoute.parent "Terminal" + , Genode.Init.ServiceRoute.parent "Timer" ] } ''; diff --git a/nixos-modules/store-wrapper.dhall b/nixos-modules/store-wrapper.dhall index c8f6aa7..15f089a 100644 --- a/nixos-modules/store-wrapper.dhall +++ b/nixos-modules/store-wrapper.dhall @@ -39,6 +39,22 @@ in λ(subinit : Init.Type) → , routes = [ Init.ServiceRoute.parent "IO_PORT" ] } ) + , child + "jitter_sponge" + ( Child.flat + Child.Attributes::{ + , binary = "jitter_sponge" + , provides = [ "Terminal" ] + , config = Init.Config::{ + , policies = + [ Init.Config.Policy::{ + , service = "Terminal" + , label = Init.LabelSelector.suffix "entropy" + } + ] + } + } + ) , child "store_fs" ( Child.flat diff --git a/nixos-modules/systemd-runner.dhall b/nixos-modules/systemd-runner.dhall index 28b6ca8..b8bcc5d 100644 --- a/nixos-modules/systemd-runner.dhall +++ b/nixos-modules/systemd-runner.dhall @@ -36,7 +36,8 @@ in λ ( params let init = Init::{ - , routes = parentRoutes [ "Timer", "Rtc", "File_system" ] + , routes = + parentRoutes [ "File_system", "Rtc", "Terminal", "Timer" ] , children = toMap { vfs = Child.flat @@ -56,6 +57,13 @@ in λ ( params ( [ 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" ] @@ -101,7 +109,7 @@ in λ ( params , binary = "cached_fs_rom" , provides = [ "ROM" ] , resources = Genode.Init.Resources::{ - , ram = Genode.units.MiB 16 + , ram = Genode.units.MiB 32 } , config = Init.Config::{ , policies = @@ -129,7 +137,7 @@ in λ ( params , stdout = Some "/dev/log" , stderr = Some "/dev/log" , pipe = Some "/dev/pipes" - , rng = Some "/dev/random" + , rng = Some "/dev/entropy" , rtc = Some "/dev/rtc" , socket = Some "/dev/sockets" , vfs = [ VFS.leaf "fs" ] diff --git a/nixos-modules/systemd.nix b/nixos-modules/systemd.nix index e9e449c..8abf01b 100644 --- a/nixos-modules/systemd.nix +++ b/nixos-modules/systemd.nix @@ -43,7 +43,6 @@ with lib; { libc posix vfs - vfs_jitterentropy vfs_pipe ]; configFile = let diff --git a/packages/genodelabs/depot-targets.nix b/packages/genodelabs/depot-targets.nix index 7dc471a..6a02bcd 100644 --- a/packages/genodelabs/depot-targets.nix +++ b/packages/genodelabs/depot-targets.nix @@ -101,6 +101,10 @@ in { }; ipxe_nic_drv.portInputs = with ports; [ dde_ipxe ]; jbig2dec = { }; + jitter_sponge = { + portInputs = with ports; [ jitterentropy xkcp ]; + preConfigure = "cp -r ${self.worldSources} repos/world"; + }; jpeg = { }; lan9118_nic_drv = { }; libarchive = { }; diff --git a/packages/genodelabs/ports.nix b/packages/genodelabs/ports.nix index 8d8c2d8..be1d08e 100644 --- a/packages/genodelabs/ports.nix +++ b/packages/genodelabs/ports.nix @@ -64,5 +64,11 @@ with pkgs; nativeBuildInputs = [ iasl libxslt unzip yasm ]; }; x86emu.hash = "sha256-QY6OL+cDVjQ67JItP1rS4ufPRGZf43AZtWxwza/0q0w="; + xkcp = { + extraRepos = [ genodePackages.worldSources ]; + hash = "sha256-oB7oFikCFnEtB/ZlV7Gayw3wNa0BU/vi7O5gfzeFGLg="; + nativeBuildInputs = [ libxslt ]; + version = "cafc03"; + }; zlib.hash = "sha256-j3JXN0f8thrPCvLhYHIPjbGa0t3iynQ/gO7KMlgljq0="; }