diff options
author | Malte Voos <git@mal.tc> | 2024-04-04 21:20:17 +0200 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-04-04 21:20:17 +0200 |
commit | d5265ef4c16f784311c1d0803aa5c4d4631b9bfc (patch) | |
tree | 304a4e4b34245722a419fa3fa496cb3c19f1d89b /flake.nix | |
parent | 726cc6f8ae68760e1848a57c87f970998ee0201f (diff) | |
download | reMder-d5265ef4c16f784311c1d0803aa5c4d4631b9bfc.tar.gz reMder-d5265ef4c16f784311c1d0803aa5c4d4631b9bfc.zip |
enable KVM for BLAZING FAST performance on a raspberry pi
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/flake.nix b/flake.nix index 2a92482..837cb0b 100644 --- a/flake.nix +++ b/flake.nix @@ -59,17 +59,6 @@ installFlags = [ "DESTDIR=${placeholder "out"}" ]; }; - ext4Rootfs = pkgs.runCommand "rm-rootfs.ext4" - { - nativeBuildInputs = with pkgs; [ - (python3.withPackages (pypkgs: [ pypkgs.protobuf ])) - qemu - libguestfs-with-appliance - ]; - } '' - python3 ${ddvk-stuff}/extractor/extractor.py ${updateArchive} $out - ''; - rootfs = pkgs.runCommand "rm-rootfs.qcow2" { nativeBuildInputs = with pkgs; [ @@ -125,13 +114,7 @@ EOF ''; - kernel = pkgs.pkgsCross.armv7l-hf-multiplatform.linux_5_4.override { - # structuredExtraConfig = with pkgs.lib.kernel; { - # PCI = yes; - # VIRTIO_PCI = yes; - # PCI_HOST_GENERIC = yes; - # }; - }; + kernel = pkgs.pkgsCross.armv7l-hf-multiplatform.linux_5_4; server = pkgs.writeShellApplication { name = "reMder-server"; @@ -141,9 +124,10 @@ text = '' qemu-img create -b ${rootfs} -F qcow2 -f qcow2 ./reMder.qcow2 - # TODO switch to pci virtio devices? (uncomment kernel config above) - qemu-system-arm \ + qemu-system-aarch64 \ + -enable-kvm \ -machine virt \ + -cpu host,aarch64=off \ -m 2048 \ -kernel ${kernel}/zImage \ -drive if=none,file=./reMder.qcow2,format=qcow2,id=hd \ @@ -193,7 +177,7 @@ in { packages = { - inherit reMder fakefbdev ext4Rootfs; + inherit reMder fakefbdev; }; defaultPackage = reMder; |