From 192e9f1b7bf4f16c0c80533f08f71d6f9110a620 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 1 Apr 2021 15:29:31 +0200 Subject: [PATCH] Use ISO9660 for the ERIS store --- nixos-modules/eris/rom-fs.nix | 2 +- nixos-modules/eris/rom-memory.nix | 1 + nixos-modules/genode-core.nix | 16 +++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/nixos-modules/eris/rom-fs.nix b/nixos-modules/eris/rom-fs.nix index 9e67697..249c7a6 100644 --- a/nixos-modules/eris/rom-fs.nix +++ b/nixos-modules/eris/rom-fs.nix @@ -19,7 +19,7 @@ ( VFS.vfs [ VFS.leafAttrs "plugin" - (toMap { load = "${vfsRump.cap}", fs = "ext2fs", ram = "12M" }) + (toMap { load = "${vfsRump.cap}", fs = "cd9660", ram = "12M", writeable="no" }) ] ) ''; diff --git a/nixos-modules/eris/rom-memory.nix b/nixos-modules/eris/rom-memory.nix index c8e7721..7c54e4e 100644 --- a/nixos-modules/eris/rom-memory.nix +++ b/nixos-modules/eris/rom-memory.nix @@ -12,6 +12,7 @@ let VFS = Sigil.VFS in ${./rom-vfs.dhall} + ${../partition-type} Sigil.Init.Resources::{=} ( VFS.vfs [ VFS.leafAttrs diff --git a/nixos-modules/genode-core.nix b/nixos-modules/genode-core.nix index 5fc8562..e3f7566 100644 --- a/nixos-modules/genode-core.nix +++ b/nixos-modules/genode-core.nix @@ -304,14 +304,20 @@ in { xmllint --noout $out ''; + system.build.storeFsImage = + pkgs.callPackage "${modulesPath}/../lib/make-iso9660-image.nix" { + contents = builtins.trace (builtins.toJSON erisContents) erisContents; + compressImage = true; + volumeID = "SIGIL"; + + }; + virtualisation.diskImage = let espImage = import ./lib/make-esp-fs.nix { inherit config pkgs; }; - storeFsImage = pkgs.callPackage ./lib/make-ext2-fs.nix { - inherit config lib pkgs; - contents = erisContents; - }; + inherit (config.system.build) storeFsImage; bootDriveImage = import ./lib/make-bootable-image.nix { - inherit config pkgs espImage storeFsImage; + inherit config pkgs espImage; + storeFsImage = "${config.system.build.storeFsImage}/iso/cd.iso.zst"; }; in lib.mkIf (config.genode.boot.storeBackend == "fs") bootDriveImage;