summaryrefslogtreecommitdiff
path: root/scripts/poky-qemu
blob: caac03c254da2aeec01a60b7b82fe9c0185c7ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 -r -e 's#.*-([a-z]+)-?[0-9]*..*#\1#'`
fi

INTERNAL_SCRIPT=`which poky-qemu-internal`
. $INTERNAL_SCRIPT