diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-03-06 08:28:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-06 08:28:43 +0000 |
commit | 70a84cbb382e10decc2b7670350fb2b466ed0c16 (patch) | |
tree | b2a8bfb674a1286a1db6b7b6b58d0c6ae5856d68 /nixos | |
parent | 6aa26c8623b5f91c5a7e9fd9c82ed08c3066b905 (diff) | |
parent | 0ebf63de087aba866c96b0e3b8eeb382f227b32c (diff) |
Merge pull request #115175 from r-burns/ppc64-qemu
nixos/qemu-flags: add ppc64
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/lib/qemu-flags.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index 0f0662458935..f786745ba324 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -18,13 +18,15 @@ rec { ]; qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" - else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" + else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0" else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu max"; armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; + powerpc64le-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv"; + powerpc64-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv"; x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } |