Skip to content

Commit

Permalink
nixos/tests: Make simpleUefiGrub test work on AArch64
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Mar 18, 2018
1 parent 2765242 commit 4471faf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nixos/tests/installer.nix
Expand Up @@ -69,11 +69,17 @@ let
let
iface = if grubVersion == 1 then "ide" else "virtio";
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);

# FIXME don't duplicate the -enable-kvm etc. flags here yet again!
qemuFlags =
(if system == "x86_64-linux" then "-m 768 " else "-m 512 ") +
(optionalString (system == "x86_64-linux") "-cpu kvm64 ");
(optionalString (system == "x86_64-linux") "-cpu kvm64 ") +
(optionalString (system == "aarch64-linux") "-enable-kvm -machine virt,gic-version=host -cpu host ");

hdFlags = ''hda => "vm-state-machine/machine.qcow2", hdaInterface => "${iface}", ''
+ optionalString isEfi ''bios => "${pkgs.OVMF.fd}/FV/OVMF.fd", '';
+ optionalString isEfi (if pkgs.stdenv.isAarch64
then ''bios => "${pkgs.OVMF.fd}/FV/QEMU_EFI.fd", ''
else ''bios => "${pkgs.OVMF.fd}/FV/OVMF.fd", '');
in
''
$machine->start;
Expand Down

0 comments on commit 4471faf

Please sign in to comment.