nixos/boot: test on aarch64
This commit is contained in:
parent
702a1c23a4
commit
930daac345
2 changed files with 26 additions and 18 deletions
|
@ -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 {};
|
||||
|
|
|
@ -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,8 +80,27 @@ 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 {
|
||||
uefiCdrom = makeBootTest "uefi-cdrom" {
|
||||
cdrom = "${iso}/iso/${iso.isoName}";
|
||||
bios = uefiBinary;
|
||||
};
|
||||
|
||||
uefiUsb = makeBootTest "uefi-usb" {
|
||||
usb = "${iso}/iso/${iso.isoName}";
|
||||
bios = uefiBinary;
|
||||
};
|
||||
|
||||
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}";
|
||||
};
|
||||
|
@ -85,21 +109,5 @@ in {
|
|||
usb = "${iso}/iso/${iso.isoName}";
|
||||
};
|
||||
|
||||
uefiCdrom = makeBootTest "uefi-cdrom" {
|
||||
cdrom = "${iso}/iso/${iso.isoName}";
|
||||
bios = "${pkgs.OVMF.fd}/FV/OVMF.fd";
|
||||
};
|
||||
|
||||
uefiUsb = makeBootTest "uefi-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";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue