diff options
author | misuzu <bakalolka@gmail.com> | 2021-05-25 21:13:29 +0300 |
---|---|---|
committer | misuzu <bakalolka@gmail.com> | 2021-07-14 12:47:12 +0300 |
commit | 930daac3457de208e032f684c461c9354457055b (patch) | |
tree | ec8c22768f6746e78b44f2aa33cee0acea75e77b /nixos | |
parent | 702a1c23a46bfe7f1463f4c51a9121cb7bf8d441 (diff) | |
download | nixpkgs-930daac3457de208e032f684c461c9354457055b.tar nixpkgs-930daac3457de208e032f684c461c9354457055b.tar.gz nixpkgs-930daac3457de208e032f684c461c9354457055b.tar.bz2 nixpkgs-930daac3457de208e032f684c461c9354457055b.tar.lz nixpkgs-930daac3457de208e032f684c461c9354457055b.tar.xz nixpkgs-930daac3457de208e032f684c461c9354457055b.tar.zst nixpkgs-930daac3457de208e032f684c461c9354457055b.zip |
nixos/boot: test on aarch64
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 2 | ||||
-rw-r--r-- | nixos/tests/boot.nix | 36 |
2 files changed, 23 insertions, 15 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2e4913dca47..76e5077f42d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -43,7 +43,7 @@ in bitcoind = handleTest ./bitcoind.nix {}; bittorrent = handleTest ./bittorrent.nix {}; blockbook-frontend = handleTest ./blockbook-frontend.nix {}; - boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64 + boot = handleTestOn ["x86_64-linux" "aarch64-linux"] ./boot.nix {}; boot-stage1 = handleTest ./boot-stage1.nix {}; borgbackup = handleTest ./borgbackup.nix {}; botamusique = handleTest ./botamusique.nix {}; diff --git a/nixos/tests/boot.nix b/nixos/tests/boot.nix index c5040f3b31f..bdae6341ec9 100644 --- a/nixos/tests/boot.nix +++ b/nixos/tests/boot.nix @@ -4,6 +4,7 @@ }: with import ../lib/testing-python.nix { inherit system pkgs; }; +with import ../lib/qemu-flags.nix { inherit pkgs; }; with pkgs.lib; let @@ -21,7 +22,10 @@ let makeBootTest = name: extraConfig: let - machineConfig = pythonDict ({ qemuFlags = "-m 768"; } // extraConfig); + machineConfig = pythonDict ({ + qemuBinary = qemuBinary pkgs.qemu_test; + qemuFlags = "-m 768"; + } // extraConfig); in makeTest { inherit iso; @@ -61,6 +65,7 @@ let ]; }; machineConfig = pythonDict ({ + qemuBinary = qemuBinary pkgs.qemu_test; qemuFlags = "-boot order=n -m 2000"; netBackendArgs = "tftp=${ipxeBootDir},bootfile=netboot.ipxe"; } // extraConfig); @@ -75,31 +80,34 @@ let machine.shutdown() ''; }; + uefiBinary = { + x86_64-linux = "${pkgs.OVMF.fd}/FV/OVMF.fd"; + aarch64-linux = "${pkgs.OVMF.fd}/FV/QEMU_EFI.fd"; + }.${pkgs.stdenv.hostPlatform.system}; in { - - biosCdrom = makeBootTest "bios-cdrom" { + uefiCdrom = makeBootTest "uefi-cdrom" { cdrom = "${iso}/iso/${iso.isoName}"; + bios = uefiBinary; }; - biosUsb = makeBootTest "bios-usb" { + uefiUsb = makeBootTest "uefi-usb" { usb = "${iso}/iso/${iso.isoName}"; + bios = uefiBinary; }; - uefiCdrom = makeBootTest "uefi-cdrom" { + uefiNetboot = makeNetbootTest "uefi" { + bios = uefiBinary; + # Custom ROM is needed for EFI PXE boot. I failed to understand exactly why, because QEMU should still use iPXE for EFI. + netFrontendArgs = "romfile=${pkgs.ipxe}/ipxe.efirom"; + }; +} // optionalAttrs (pkgs.stdenv.hostPlatform.system == "x86_64-linux") { + biosCdrom = makeBootTest "bios-cdrom" { cdrom = "${iso}/iso/${iso.isoName}"; - bios = "${pkgs.OVMF.fd}/FV/OVMF.fd"; }; - uefiUsb = makeBootTest "uefi-usb" { + biosUsb = makeBootTest "bios-usb" { usb = "${iso}/iso/${iso.isoName}"; - bios = "${pkgs.OVMF.fd}/FV/OVMF.fd"; }; biosNetboot = makeNetbootTest "bios" {}; - - uefiNetboot = makeNetbootTest "uefi" { - bios = "${pkgs.OVMF.fd}/FV/OVMF.fd"; - # Custom ROM is needed for EFI PXE boot. I failed to understand exactly why, because QEMU should still use iPXE for EFI. - netFrontendArgs = "romfile=${pkgs.ipxe}/ipxe.efirom"; - }; } |