support aarch64 in tftpboot test
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
{
|
||||
liminix
|
||||
}:
|
||||
let check = deviceName : ubootName :
|
||||
let derivation = (import liminix {
|
||||
device = import "${liminix}/devices/qemu-armv7l/";
|
||||
device = import "${liminix}/devices/${deviceName}/";
|
||||
liminix-config = ./configuration.nix;
|
||||
});
|
||||
img = derivation.outputs.tftpboot;
|
||||
pkgs = derivation.pkgs;
|
||||
pkgsBuild = pkgs.pkgsBuildBuild;
|
||||
uboot = derivation.pkgs.${ubootName};
|
||||
pkgsBuild = derivation.pkgs.pkgsBuildBuild;
|
||||
phram = 240 * 1024 * 1024;
|
||||
in pkgsBuild.runCommand "check" {
|
||||
nativeBuildInputs = with pkgsBuild; [
|
||||
expect
|
||||
@@ -17,15 +19,19 @@ in pkgsBuild.runCommand "check" {
|
||||
} ''
|
||||
mkdir vm
|
||||
ln -s ${img} result
|
||||
|
||||
run-liminix-vm \
|
||||
--background ./vm \
|
||||
--u-boot ${pkgs.ubootQemuArm}/u-boot.bin \
|
||||
--arch arm \
|
||||
--flag -S \
|
||||
--phram-address 0x40200000 \
|
||||
--u-boot ${uboot}/u-boot.bin \
|
||||
--arch ${derivation.pkgs.stdenv.hostPlatform.qemuArch} \
|
||||
--phram-address $(printf "0x%x" ${toString phram} ) \
|
||||
--lan "user,tftp=`pwd`" \
|
||||
--disk-image result/rootfs \
|
||||
result/uimage result/rootfs
|
||||
|
||||
expect ${./script.expect} 2>&1 |tee $out
|
||||
''
|
||||
'';
|
||||
in {
|
||||
arm = check "qemu-armv7l" "ubootQemuArm";
|
||||
aarch64 = check "qemu-aarch64" "ubootQemuAarch64";
|
||||
}
|
||||
|
Reference in New Issue
Block a user