diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/runqemu | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index cedf4f62ad..58b0c191e1 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -1366,6 +1366,15 @@ class BaseConfig(object): | |||
| 1366 | raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!") | 1366 | raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!") |
| 1367 | self.qemu_system = qemu_system | 1367 | self.qemu_system = qemu_system |
| 1368 | 1368 | ||
| 1369 | def check_render_nodes(self): | ||
| 1370 | render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer.""" | ||
| 1371 | try: | ||
| 1372 | content = os.listdir("/dev/dri") | ||
| 1373 | if len([i for i in content if i.startswith('render')]) == 0: | ||
| 1374 | raise RunQemuError("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) | ||
| 1375 | except FileNotFoundError: | ||
| 1376 | raise RunQemuError("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) | ||
| 1377 | |||
| 1369 | def setup_vga(self): | 1378 | def setup_vga(self): |
| 1370 | if self.nographic == True: | 1379 | if self.nographic == True: |
| 1371 | if self.sdl == True: | 1380 | if self.sdl == True: |
| @@ -1403,6 +1412,7 @@ class BaseConfig(object): | |||
| 1403 | 1412 | ||
| 1404 | self.qemu_opt += ' -display ' | 1413 | self.qemu_opt += ' -display ' |
| 1405 | if self.egl_headless == True: | 1414 | if self.egl_headless == True: |
| 1415 | self.check_render_nodes() | ||
| 1406 | self.set_dri_path() | 1416 | self.set_dri_path() |
| 1407 | self.qemu_opt += 'egl-headless,' | 1417 | self.qemu_opt += 'egl-headless,' |
| 1408 | else: | 1418 | else: |
