5 # Copyright 2020 Linaro
8 # Robert Foley <robert.foley@linaro.org>
9 # Originally based on ubuntu.i386 Fam Zheng <famz@redhat.com>
11 # This code is licensed under the GPL version 2 or later. See
12 # the COPYING file in the top-level directory.
22 'machine' : "virt,gic-version=3",
23 'install_cmds' : "apt-get update,"\
24 "apt-get build-dep -y --arch-only qemu,"\
25 "apt-get install -y libfdt-dev pkg-config language-pack-en ninja-build",
26 # We increase beyond the default time since during boot
27 # it can take some time (many seconds) to log into the VM
28 # especially using softmmu.
32 class UbuntuAarch64VM(ubuntuvm.UbuntuVM):
33 name = "ubuntu.aarch64"
35 image_name = "ubuntu-18.04-server-cloudimg-arm64.img"
36 image_link = "https://cloud-images.ubuntu.com/releases/18.04/release/" + image_name
37 image_sha256="0fdcba761965735a8a903d8b88df8e47f156f48715c00508e4315c506d7d3cb1"
41 sudo chmod a+r /dev/vdb;
42 tar --checkpoint=.10 -xf /dev/vdb;
43 ./configure {configure_opts};
44 make --output-sync {target} -j{jobs} {verbose};
46 def boot(self, img, extra_args=None):
47 aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64)
48 default_args = aarch64vm.get_pflash_args(self._tmpdir)
50 extra_args.extend(default_args)
52 extra_args = default_args
53 # We always add these performance tweaks
54 # because without them, we boot so slowly that we
55 # can time out finding the boot efi device.
56 if '-smp' not in extra_args and \
57 '-smp' not in self._config['extra_args'] and \
58 '-smp' not in self._args:
59 # Only add if not already there to give caller option to change it.
60 extra_args.extend(["-smp", "8"])
62 # We have overridden boot() since aarch64 has additional parameters.
63 # Call down to the base class method.
64 super(UbuntuAarch64VM, self).boot(img, extra_args=extra_args)
66 if __name__ == "__main__":
67 defaults = aarch64vm.get_config_defaults(UbuntuAarch64VM, DEFAULT_CONFIG)
68 sys.exit(basevm.main(UbuntuAarch64VM, defaults))