summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-07-10 10:07:49 -0700
committerSaul Wold <sgw@linux.intel.com>2012-07-16 08:36:57 -0700
commit6612873dc59054e6d37fa7488226218bfb759127 (patch)
tree1691b8bebd772b45286e5456fabcad95c4cc7e21
parentcfd201ecda95d00bc5d70aa5045c649b98ffe8b8 (diff)
downloadopenembedded-core-6612873dc59054e6d37fa7488226218bfb759127.tar.gz
openembedded-core-6612873dc59054e6d37fa7488226218bfb759127.tar.bz2
openembedded-core-6612873dc59054e6d37fa7488226218bfb759127.zip
runqemu: Fix running qemu when build without gl
When gl is disabled in PACKAGECONFIG then we dont need to check for supporting libs to be present before running qemu. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rwxr-xr-xscripts/runqemu14
-rwxr-xr-xscripts/runqemu-internal17
2 files changed, 17 insertions, 14 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 650d1df806..7454dd4a16 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -387,20 +387,6 @@ echo "FSTYPE: [$FSTYPE]"
setup_sysroot
# OECORE_NATIVE_SYSROOT is now set for all cases
-# We can't run without a libGL.so
-libgl='no'
-
-[ -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so ] && libgl='yes'
-[ -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so ] && libgl='yes'
-[ -e /usr/lib/*-linux-gnu/libGL.so -a -e /usr/lib/*-linux-gnu/libGLU.so ] && libgl='yes'
-
-if [ "$libgl" != 'yes' ]; then
- echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.
- Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.
- Fedora package names are: mesa-libGL-devel mesa-libGLU-devel."
- exit 1;
-fi
-
INTERNAL_SCRIPT="$0-internal"
if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
INTERNAL_SCRIPT=`which runqemu-internal`
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index a21ea93c9b..eeadb24ebe 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -468,6 +468,23 @@ if [ ! -x "$QEMUBIN" ]; then
return
fi
+NEED_GL=`ldd $QEMUBIN/$QEMU 2>&1 | grep libGLU`
+# We can't run without a libGL.so
+if [ "$NEED_GL" != "" ]; then
+ libgl='no'
+
+ [ -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so ] && libgl='yes'
+ [ -e /usr/lib64/libGL.so -a -e /usr/lib64/libGLU.so ] && libgl='yes'
+ [ -e /usr/lib/*-linux-gnu/libGL.so -a -e /usr/lib/*-linux-gnu/libGLU.so ] && libgl='yes'
+
+ if [ "$libgl" != 'yes' ]; then
+ echo "You need libGL.so and libGLU.so to exist in your library path to run the QEMU emulator.
+ Ubuntu package names are: libgl1-mesa-dev and libglu1-mesa-dev.
+ Fedora package names are: mesa-libGL-devel mesa-libGLU-devel."
+ exit 1;
+ fi
+fi
+
do_quit() {
if [ -n "$PIDFILE" ]; then
#echo kill `cat $PIDFILE`