summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 86124a4a6a..3d77046972 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -468,9 +468,11 @@ class BaseConfig(object):
468 self.set("IMAGE_LINK_NAME", image_link_name) 468 self.set("IMAGE_LINK_NAME", image_link_name)
469 logger.debug('Using IMAGE_LINK_NAME = "%s"' % image_link_name) 469 logger.debug('Using IMAGE_LINK_NAME = "%s"' % image_link_name)
470 470
471 def set_dri_path(self): 471 def set_mesa_paths(self):
472 drivers_path = os.path.join(self.bindir_native, '../lib/dri') 472 drivers_path = os.path.join(self.bindir_native, '../lib/dri')
473 if not os.path.exists(drivers_path) or not os.listdir(drivers_path): 473 gbm_path = os.path.join(self.bindir_native, '../lib/gbm')
474 if not os.path.exists(drivers_path) or not os.listdir(drivers_path) \
475 or not os.path.exists(gbm_path) or not os.listdir(gbm_path):
474 raise RunQemuError(""" 476 raise RunQemuError("""
475qemu has been built without opengl support and accelerated graphics support is not available. 477qemu has been built without opengl support and accelerated graphics support is not available.
476To enable it, add: 478To enable it, add:
@@ -479,6 +481,7 @@ DISTRO_FEATURES_NATIVESDK:append = " opengl"
479to your build configuration. 481to your build configuration.
480""") 482""")
481 self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path 483 self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
484 self.qemu_environ['GBM_BACKENDS_PATH'] = gbm_path
482 485
483 def check_args(self): 486 def check_args(self):
484 for debug in ("-d", "--debug"): 487 for debug in ("-d", "--debug"):
@@ -1461,7 +1464,7 @@ to your build configuration.
1461 self.qemu_opt += ' -display ' 1464 self.qemu_opt += ' -display '
1462 if self.egl_headless == True: 1465 if self.egl_headless == True:
1463 self.check_render_nodes() 1466 self.check_render_nodes()
1464 self.set_dri_path() 1467 self.set_mesa_paths()
1465 self.qemu_opt += 'egl-headless,' 1468 self.qemu_opt += 'egl-headless,'
1466 else: 1469 else:
1467 if self.sdl == True: 1470 if self.sdl == True:
@@ -1471,10 +1474,10 @@ to your build configuration.
1471 self.qemu_opt += 'gtk,' 1474 self.qemu_opt += 'gtk,'
1472 1475
1473 if self.gl == True: 1476 if self.gl == True:
1474 self.set_dri_path() 1477 self.set_mesa_paths()
1475 self.qemu_opt += 'gl=on,' 1478 self.qemu_opt += 'gl=on,'
1476 elif self.gl_es == True: 1479 elif self.gl_es == True:
1477 self.set_dri_path() 1480 self.set_mesa_paths()
1478 self.qemu_opt += 'gl=es,' 1481 self.qemu_opt += 'gl=es,'
1479 self.qemu_opt += 'show-cursor=on' 1482 self.qemu_opt += 'show-cursor=on'
1480 1483