diff options
| author | Malte Voos <git@mal.tc> | 2026-10-13 12:43:24 +0200 |
|---|---|---|
| committer | Malte Voos <git@mal.tc> | 2026-10-13 12:43:24 +0200 |
| commit | 2b423e82a420cafd406e32334fffa61ad0ef8555 (patch) | |
| tree | be737a55e5bcc5b2d20e54ed2c33d279e97aa321 | |
| parent | 64c1fd77c5d8d99607a00b151a71a1fee2d1b0c3 (diff) | |
| download | reMder-main.tar.gz reMder-main.zip | |
| -rw-r--r-- | server.nix | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -134,11 +134,17 @@ writeShellApplication { runtimeInputs = [ qemu ]; text = '' - rm -f ./reMder.qcow2 - qemu-img create -b ${diskImage} -F qcow2 -f qcow2 ./reMder.qcow2 + # check if we're on an aarch64 system with support for aarch32 at EL1 + if echo quit | qemu-system-aarch64 -machine virt -accel kvm -cpu host,aarch64=off \ + -display none -nodefaults -S -monitor stdio >/dev/null 2>&1; then + qemu="qemu-system-aarch64" + accel_opts=(-accel kvm -cpu "host,aarch64=off") + else + qemu="qemu-system-arm" + accel_opts=() + fi - qemu-system-arm \ - -machine virt \ + exec "$qemu" -machine virt "''${accel_opts[@]}" \ -m 2048 \ -kernel ${kernel}/zImage \ -snapshot \ |