We need some libraries installed to run the built qemu, check for their existence before trying to run the program. Fixes [BUGID #201] Signed-off-by: Joshua Lock <josh@linux.intel.com>
2.1 KiB
Executable File
#!/bin/bash
Handle running Poky images standalone with QEMU
Copyright (C) 2006-2007 OpenedHand Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
if [ "x$1" = "x" ]; then
MYNAME=basename $0
echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE [OPTIONS]"
echo "where:"
echo " ZIMAGE - the kernel image file to use"
echo " IMAGEFILE - the image file/location to use"
echo " (NFS booting assumed if IMAGEFILE not specified)"
echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)"
echo " OPTIONS - extra options to pass to QEMU"
exit 1
else
ZIMAGE=$1
shift
fi
if [ "x$MACHINE" = "x" ]; then
MACHINE=basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'
fi
if [ "x$1" = "x" ]; then TYPE="nfs" else TYPE="ext3" if [ "$MACHINE" = "akita" ]; then TYPE="jffs2" fi if [ "$MACHINE" = "spitz" ]; then TYPE="ext3" fi if [ "$MACHINE" = "nokia800" ]; then TYPE="jffs2" fi if [ "$MACHINE" = "nokia800-maemo" ]; then TYPE="jffs2" fi HDIMAGE=$1 shift fi
We can't run without a libGL.so
libgl='no'
test -e /usr/lib/libGL.so -a -e /usr/lib/libGLU.so && libgl='yes' test -e /usr/lib64/libGL.so -a -e /usr/lib64/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." exit 1; fi
INTERNAL_SCRIPT=which poky-qemu-internal
. $INTERNAL_SCRIPT