From c7455f7a21e364e15877886ece8752f08aeccd42 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 5 Mar 2020 23:06:29 +0100 Subject: [PATCH] pmb.qemu: drop vexpress (armv7) support (!1886) device-qemu-vexpress appears to be completely broken at the moment. I was not able to make it show anything, get a log or even just get any indication that it is actually doing something. In general, it does also not fit well to the other QEMU ports. The vexpress machine type in QEMU seems to be quite limited, e.g. it has no PCIe bus and therefore it is impossible to configure it with virtio-gpu. (Unlike already configured for x86_64 and aarch64). I had some success with a setup similar to aarch64 with -M virt,highmem=off but was unable to make it work in the end: - Alpine's virt kernel was missing some options preventing boot completely - Alpine's lts kernel was missing PCI support for virtio-gpu - Even after adding the options the VM usually freezed after boot Overall it does not quite seem worth the effort at the moment, compared to how well x86_64 and aarch64 are working. In any case, vexpress is too different (and broken) to continue maintaining it. --- pmb/qemu/run.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pmb/qemu/run.py b/pmb/qemu/run.py index e65b251e..974a28c6 100644 --- a/pmb/qemu/run.py +++ b/pmb/qemu/run.py @@ -113,6 +113,8 @@ def command_qemu(args, arch, img_path): command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor] command += ["-initrd", rootfs + "/boot/initramfs-" + flavor] command += ["-append", shlex.quote(cmdline)] + + command += ["-smp", str(os.cpu_count())] command += ["-m", str(args.memory)] command += ["-netdev", "user,id=net0," @@ -122,26 +124,12 @@ def command_qemu(args, arch, img_path): ] command += ["-show-cursor"] - if args.deviceinfo["dtb"] != "": - dtb_image = rootfs + "/usr/share/dtb/" + args.deviceinfo["dtb"] + ".dtb" - if not os.path.exists(dtb_image): - raise RuntimeError("DTB file not found: " + dtb_image) - command += ["-dtb", dtb_image] - - smp = os.cpu_count() - if arch == "x86_64": command += ["-vga", "virtio"] command += ["-serial", "stdio"] command += ["-drive", "file=" + img_path + ",format=raw"] command += ["-device", "e1000,netdev=net0"] - elif arch == "arm": - command += ["-M", "vexpress-a9"] - command += ["-sd", img_path] - command += ["-device", "virtio-net-device,netdev=net0"] - smp = min(smp, 4) - elif arch == "aarch64": command += ["-M", "virt"] command += ["-cpu", "cortex-a57"] @@ -157,8 +145,6 @@ def command_qemu(args, arch, img_path): else: raise RuntimeError("Architecture {} not supported by this command yet.".format(arch)) - command += ["-smp", str(smp)] - # Kernel Virtual Machine (KVM) support native = args.arch_native == args.deviceinfo["arch"] if native and os.path.exists("/dev/kvm"):