summaryrefslogtreecommitdiff
path: root/scripts/runqemu-standalone
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-16 12:23:08 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-16 12:23:08 +0000
commit295818470acd4628df8c5de20a8843cb90171b5b (patch)
treeb4734ac58b2195b2b5e8399662df6fc953924533 /scripts/runqemu-standalone
parent5d4e6e72ccd5cf680c4924d10651745cf29b62ba (diff)
downloadopenembedded-core-295818470acd4628df8c5de20a8843cb90171b5b.tar.gz
openembedded-core-295818470acd4628df8c5de20a8843cb90171b5b.tar.bz2
openembedded-core-295818470acd4628df8c5de20a8843cb90171b5b.tar.xz
openembedded-core-295818470acd4628df8c5de20a8843cb90171b5b.zip
runqemu: Revamp scripts, splitting into a core internal script and two helpers, one for use within poky, one outside poky
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1144 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/runqemu-standalone')
-rwxr-xr-xscripts/runqemu-standalone44
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/runqemu-standalone b/scripts/runqemu-standalone
new file mode 100755
index 000000000..6e8218331
--- /dev/null
+++ b/scripts/runqemu-standalone
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Handle running Poky images standalone
+#
+# 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 -e "\nRun as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE"
+ 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)"
+ exit 1
+else
+ ZIMAGE=$1
+fi
+
+if [ "x$2" = "x" ]; then
+ TYPE="nfs"
+else
+ TYPE="ext2"
+ HDIMAGE=$2
+fi
+
+if [ "x$MACHINE" = "x" ]; then
+ MACHINE=`basename $ZIMAGE | sed -e 's#.*-\([a-z]*\)-*[0-9]*..*#\1#'`
+fi
+
+source $OEROOT/scripts/runqemu-internal
+