diff --git a/pmb/config/__init__.py b/pmb/config/__init__.py index 54eb4b61..9aeb100a 100644 --- a/pmb/config/__init__.py +++ b/pmb/config/__init__.py @@ -39,8 +39,7 @@ required_programs = ["git", "openssl", "ps"] # Keys saved in the config file (mostly what we ask in 'pmbootstrap init') config_keys = ["ccache_size", "device", "extra_packages", "hostname", "jobs", "kernel", "keymap", "nonfree_firmware", "nonfree_userland", - "qemu_native_mesa_driver", "ssh_keys", "timezone", "ui", "user", - "work", "aports"] + "ssh_keys", "timezone", "ui", "user", "work", "aports"] # Config file/commandline default values # $WORK gets replaced with the actual value for args.work (which may be @@ -70,7 +69,6 @@ defaults = { "nonfree_firmware": True, "nonfree_userland": False, "port_distccd": "33632", - "qemu_native_mesa_driver": "dri-virtio", "ssh_keys": False, "timezone": "GMT", "ui": "weston", @@ -458,11 +456,6 @@ aportgen = { } } -# -# QEMU -# -qemu_native_mesa_drivers = ["dri-swrast", "dri-virtio"] - # # NEWAPKBUILD # Options passed through to the "newapkbuild" command from Alpine Linux. They diff --git a/pmb/config/init.py b/pmb/config/init.py index 77b9d643..093757ab 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -284,26 +284,6 @@ def ask_for_device(args): return (device, device_exists, kernel, nonfree) -def ask_for_qemu_native_mesa_driver(args, device, arch_native): - # Native QEMU device selected? (e.g. qemu-amd64 on x86_64) - if not pmb.parse.arch.qemu_check_device(device, arch_native): - return None - - drivers = pmb.config.qemu_native_mesa_drivers - logging.info("Which mesa driver do you prefer for your native QEMU device?" - " Only select something other than the default if you are" - " having graphical problems (such as glitches).") - while True: - ret = pmb.helpers.cli.ask(args, "Mesa driver", drivers, - args.qemu_native_mesa_driver, True, - complete=drivers) - if ret in drivers: - return ret - logging.fatal("ERROR: Please specify a driver from the list. To change" - " it, see qemu_native_mesa_drivers in" - " pmb/config/__init__.py.") - - def ask_for_build_options(args, cfg): # Allow to skip build options logging.info("Build options: Parallel jobs: " + args.jobs + @@ -376,12 +356,6 @@ def frontend(args): cfg["pmbootstrap"]["nonfree_firmware"] = str(nonfree["firmware"]) cfg["pmbootstrap"]["nonfree_userland"] = str(nonfree["userland"]) - # QEMU mesa driver - if cfg["pmbootstrap"]["device"].startswith("qemu-"): - driver = ask_for_qemu_native_mesa_driver(args, device, args.arch_native) - if driver: - cfg["pmbootstrap"]["qemu_native_mesa_driver"] = driver - # Device keymap if device_exists: cfg["pmbootstrap"]["keymap"] = ask_for_keymaps(args, device) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index abc268d3..cf54db12 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -513,8 +513,6 @@ def install(args): install_packages += args.extra_packages.split(",") if args.add: install_packages += args.add.split(",") - if args.device.startswith("qemu-"): - install_packages += ["mesa-" + args.qemu_native_mesa_driver] for pkgname in install_packages: pmb.build.package(args, pkgname, args.deviceinfo["arch"]) diff --git a/pmb/parse/arch.py b/pmb/parse/arch.py index 84cc92d8..77f1f014 100644 --- a/pmb/parse/arch.py +++ b/pmb/parse/arch.py @@ -152,16 +152,3 @@ def qemu_to_pmos_device(arch): raise ValueError("Can not map QEMU value '" + arch + "'" " to the right postmarketOS device") - - -def qemu_check_device(device, arch): - """ - Check whether a device has a specific architecture. - - Examples: - qemu_check_device("qemu-amd64", "x86_64") is True - qemu_check_device("qemu-vexpress", "armel") is True - qemu_check_device("qemu-vexpress", "aarch64") is False - """ - arch_qemu = uname_to_qemu(arch) - return device == qemu_to_pmos_device(arch_qemu) diff --git a/pmb/qemu/run.py b/pmb/qemu/run.py index db8ef844..79cc2c58 100644 --- a/pmb/qemu/run.py +++ b/pmb/qemu/run.py @@ -177,7 +177,7 @@ def command_qemu(args, arch, device, img_path): logging.info("WARNING: QEMU is not using KVM and will run slower!") # 2D acceleration support via virtio - if native and args.qemu_native_mesa_driver == "dri-virtio": + if native: command += ["-vga", "virtio"] command += ["-display", args.qemu_display] diff --git a/test/test_qemu_running_processes.py b/test/test_qemu_running_processes.py index 480452e8..757af87f 100644 --- a/test/test_qemu_running_processes.py +++ b/test/test_qemu_running_processes.py @@ -84,7 +84,6 @@ class QEMU(object): pmbootstrap_run(args, config, ["config", "extra_packages", "none"]) pmbootstrap_run(args, config, ["config", "user", "testuser"]) pmbootstrap_run(args, config, ["config", "ui", ui]) - pmbootstrap_run(args, config, ["config", "qemu_native_mesa_driver", "dri-swrast"]) # Prepare native chroot pmbootstrap_run(args, config, ["-y", "zap"]) diff --git a/test/test_questions.py b/test/test_questions.py index 7dcde17c..3218adc3 100644 --- a/test/test_questions.py +++ b/test/test_questions.py @@ -213,13 +213,6 @@ def test_questions_keymaps(args, monkeypatch): assert func(args, "lg-mako") == "" -def test_questions_qemu_native_mesa(args, monkeypatch): - func = pmb.config.init.ask_for_qemu_native_mesa_driver - fake_answers(monkeypatch, ["invalid_driver", "dri-swrast"]) - assert func(args, "qemu-amd64", "x86_64") == "dri-swrast" - assert func(args, "qemu-aarch64", "x86_64") is None - - def test_questions_ui(args, monkeypatch): fake_answers(monkeypatch, ["invalid_UI", "weston"]) assert pmb.config.init.ask_for_ui(args) == "weston"