summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-02-22 15:33:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 11:44:57 +0000
commitc39f1d15072c152840af5dfa86f04490ee80053a (patch)
tree31ee967c740d813e297d215050a6589bc3c7d781
parentb253fcb592791b3da4dc3b4245e0dfb2a5facb8b (diff)
downloadpoky-c39f1d15072c152840af5dfa86f04490ee80053a.tar.gz
runqemu: do not check for GL libraries
qemu has been using libepoxy for a long time, and libepoxy loads GL via dlopen() only when instructed to. (From OE-Core rev: d974e0e9a290d66b702e5ca1d01873282763437b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu35
1 files changed, 0 insertions, 35 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 054037312b..ec6188ba4a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -118,39 +118,6 @@ def check_tun():
118 if not os.access(dev_tun, os.W_OK): 118 if not os.access(dev_tun, os.W_OK):
119 raise RunQemuError("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun)) 119 raise RunQemuError("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
120 120
121def check_libgl(qemu_bin):
122 cmd = ('ldd', qemu_bin)
123 logger.debug('Running %s...' % str(cmd))
124 need_gl = subprocess.check_output(cmd).decode('utf-8')
125 if re.search('libGLU', need_gl):
126 # We can't run without a libGL.so
127 libgl = False
128 check_files = (('/usr/lib/libGL.so', '/usr/lib/libGLU.so'), \
129 ('/usr/lib64/libGL.so', '/usr/lib64/libGLU.so'), \
130 ('/usr/lib/*-linux-gnu/libGL.so', '/usr/lib/*-linux-gnu/libGLU.so'))
131
132 for (f1, f2) in check_files:
133 if re.search('\*', f1):
134 for g1 in glob.glob(f1):
135 if libgl:
136 break
137 if os.path.exists(g1):
138 for g2 in glob.glob(f2):
139 if os.path.exists(g2):
140 libgl = True
141 break
142 if libgl:
143 break
144 else:
145 if os.path.exists(f1) and os.path.exists(f2):
146 libgl = True
147 break
148 if not libgl:
149 logger.error("You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.")
150 logger.error("Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.")
151 logger.error("Fedora package names are: mesa-libGL-devel mesa-libGLU-devel.")
152 raise RunQemuError('%s requires libGLU, but not found' % qemu_bin)
153
154def get_first_file(cmds): 121def get_first_file(cmds):
155 """Return first file found in wildcard cmds""" 122 """Return first file found in wildcard cmds"""
156 for cmd in cmds: 123 for cmd in cmds:
@@ -1194,8 +1161,6 @@ class BaseConfig(object):
1194 if not os.access(qemu_bin, os.X_OK): 1161 if not os.access(qemu_bin, os.X_OK):
1195 raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin) 1162 raise OEPathError("No QEMU binary '%s' could be found" % qemu_bin)
1196 1163
1197 check_libgl(qemu_bin)
1198
1199 self.qemu_opt = "%s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND')) 1164 self.qemu_opt = "%s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'))
1200 1165
1201 for ovmf in self.ovmf_bios: 1166 for ovmf in self.ovmf_bios: