diff options
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index d171c4f894..054037312b 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -74,6 +74,9 @@ of the following environment variables (in any order): | |||
74 | MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified) | 74 | MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified) |
75 | Simplified QEMU command-line options can be passed with: | 75 | Simplified QEMU command-line options can be passed with: |
76 | nographic - disable video console | 76 | nographic - disable video console |
77 | gl - enable virgl-based GL acceleration | ||
78 | gl-es - enable virgl-based GL acceleration, using OpenGL ES | ||
79 | egl-headless - enable headless EGL output; use vnc or spice to see it | ||
77 | serial - enable a serial console on /dev/ttyS0 | 80 | serial - enable a serial console on /dev/ttyS0 |
78 | serialstdio - enable a serial console on the console (regardless of graphics mode) | 81 | serialstdio - enable a serial console on the console (regardless of graphics mode) |
79 | slirp - enable user networking, no root privileges is required | 82 | slirp - enable user networking, no root privileges is required |
@@ -434,6 +437,26 @@ class BaseConfig(object): | |||
434 | elif arg == 'nographic': | 437 | elif arg == 'nographic': |
435 | self.qemu_opt_script += ' -nographic' | 438 | self.qemu_opt_script += ' -nographic' |
436 | self.kernel_cmdline_script += ' console=ttyS0' | 439 | self.kernel_cmdline_script += ' console=ttyS0' |
440 | elif arg == 'gl': | ||
441 | self.qemu_opt_script += ' -vga virtio -display gtk,gl=on' | ||
442 | elif arg == 'gl-es': | ||
443 | self.qemu_opt_script += ' -vga virtio -display gtk,gl=es' | ||
444 | elif arg == 'egl-headless': | ||
445 | self.qemu_opt_script += ' -vga virtio -display egl-headless' | ||
446 | # As runqemu can be run within bitbake (when using testimage, for example), | ||
447 | # we need to ensure that we run host pkg-config, and that it does not | ||
448 | # get mis-directed to native build paths set by bitbake. | ||
449 | try: | ||
450 | del os.environ['PKG_CONFIG_PATH'] | ||
451 | del os.environ['PKG_CONFIG_DIR'] | ||
452 | del os.environ['PKG_CONFIG_LIBDIR'] | ||
453 | except KeyError: | ||
454 | pass | ||
455 | try: | ||
456 | dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True) | ||
457 | except subprocess.CalledProcessError as e: | ||
458 | raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.") | ||
459 | os.environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip() | ||
437 | elif arg == 'serial': | 460 | elif arg == 'serial': |
438 | self.kernel_cmdline_script += ' console=ttyS0' | 461 | self.kernel_cmdline_script += ' console=ttyS0' |
439 | self.serialconsole = True | 462 | self.serialconsole = True |