diff options
Diffstat (limited to 'scripts/runqemu-standalone')
| -rwxr-xr-x | scripts/runqemu-standalone | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/runqemu-standalone b/scripts/runqemu-standalone new file mode 100755 index 0000000000..6e8218331e --- /dev/null +++ b/scripts/runqemu-standalone | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # Handle running Poky images standalone | ||
| 4 | # | ||
| 5 | # This program is free software; you can redistribute it and/or modify | ||
| 6 | # it under the terms of the GNU General Public License version 2 as | ||
| 7 | # published by the Free Software Foundation. | ||
| 8 | # | ||
| 9 | # This program is distributed in the hope that it will be useful, | ||
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | # GNU General Public License for more details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License along | ||
| 15 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 17 | # | ||
| 18 | |||
| 19 | if [ "x$1" = "x" ]; then | ||
| 20 | MYNAME=`basename $0` | ||
| 21 | echo -e "\nRun as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE" | ||
| 22 | echo "where:" | ||
| 23 | echo " ZIMAGE - the kernel image file to use" | ||
| 24 | echo " IMAGEFILE - the image file/location to use" | ||
| 25 | echo " (NFS booting assumed if IMAGEFILE not specified)" | ||
| 26 | echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" | ||
| 27 | exit 1 | ||
| 28 | else | ||
| 29 | ZIMAGE=$1 | ||
| 30 | fi | ||
| 31 | |||
| 32 | if [ "x$2" = "x" ]; then | ||
| 33 | TYPE="nfs" | ||
| 34 | else | ||
| 35 | TYPE="ext2" | ||
| 36 | HDIMAGE=$2 | ||
| 37 | fi | ||
| 38 | |||
| 39 | if [ "x$MACHINE" = "x" ]; then | ||
| 40 | MACHINE=`basename $ZIMAGE | sed -e 's#.*-\([a-z]*\)-*[0-9]*..*#\1#'` | ||
| 41 | fi | ||
| 42 | |||
| 43 | source $OEROOT/scripts/runqemu-internal | ||
| 44 | |||
