diff options
author | Scott Garman <scott.a.garman@intel.com> | 2010-09-28 16:23:54 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-07 19:51:36 +0100 |
commit | fcbd67c047f02052cc87f2d0dcbfde83a23921bd (patch) | |
tree | 6ab238d5ff5e4a23ab585afb8cd89c5c0466e971 /scripts/poky-qemu | |
parent | c8a181e847660bb9d7faedad0bed7d05afbe8103 (diff) | |
download | poky-fcbd67c047f02052cc87f2d0dcbfde83a23921bd.tar.gz |
poky-qemu: integrate userspace nfsroot support
This is the first phase of some refactoring the poky-qemu control
scripts are getting. This integrates userspace nfsroot support into
poky-qemu, making runqemu-nfs obsolete.
This fixes [BUGID #295]
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'scripts/poky-qemu')
-rwxr-xr-x | scripts/poky-qemu | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu index 6fe6f5e99b..111aa15b70 100755 --- a/scripts/poky-qemu +++ b/scripts/poky-qemu | |||
@@ -20,40 +20,42 @@ | |||
20 | 20 | ||
21 | if [ "x$1" = "x" ]; then | 21 | if [ "x$1" = "x" ]; then |
22 | MYNAME=`basename $0` | 22 | MYNAME=`basename $0` |
23 | echo "Run as MACHINE=xyz $MYNAME ZIMAGE IMAGEFILE [OPTIONS]" | 23 | echo "Run as MACHINE=xyz $MYNAME KERNEL ROOTFS [OPTIONS]" |
24 | echo "where:" | 24 | echo "where:" |
25 | echo " ZIMAGE - the kernel image file to use" | 25 | echo " KERNEL - the kernel image file to use" |
26 | echo " IMAGEFILE - the image file/location to use" | 26 | echo " ROOTFS - the rootfs image file or nfsroot directory to use" |
27 | echo " (NFS booting assumed if IMAGEFILE not specified)" | 27 | # echo " (NFS booting assumed if ROOTFS not specified)" |
28 | echo " MACHINE=xyz - the machine name (optional, autodetected from ZIMAGE if unspecified)" | 28 | echo " MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)" |
29 | echo " OPTIONS - extra options to pass to QEMU" | 29 | echo " OPTIONS - extra options to pass to QEMU" |
30 | exit 1 | 30 | exit 1 |
31 | else | 31 | else |
32 | ZIMAGE=$1 | 32 | KERNEL=$1 |
33 | shift | 33 | shift |
34 | fi | 34 | fi |
35 | 35 | ||
36 | if [ "x$MACHINE" = "x" ]; then | 36 | if [ "x$MACHINE" = "x" ]; then |
37 | MACHINE=`basename $ZIMAGE | sed -r -e 's#.*-([a-z]+[0-9]*)-?[0-9]*..*#\1#'` | 37 | MACHINE=`basename $KERNEL | sed -r -e 's#.*-([a-z]+[0-9\-]*)-?[0-9]*..*#\1#'` |
38 | fi | 38 | fi |
39 | 39 | ||
40 | if [ "x$1" = "x" ]; then | 40 | if [ "x$1" = "x" ]; then |
41 | TYPE="nfs" | 41 | FSTYPE="nfs" |
42 | echo "Error: NFS booting without an explicit ROOTFS path is not yet supported" | ||
43 | exit 1 | ||
42 | else | 44 | else |
43 | TYPE="ext3" | 45 | ROOTFS=$1 |
44 | if [ "$MACHINE" = "akita" ]; then | 46 | |
45 | TYPE="jffs2" | 47 | if [ -d "$1" ]; then |
46 | fi | 48 | echo "$ROOTFS is a directory, assuming nfsroot" |
47 | if [ "$MACHINE" = "spitz" ]; then | 49 | FSTYPE="nfs" |
48 | TYPE="ext3" | 50 | else |
49 | fi | 51 | FSTYPE="ext3" |
50 | if [ "$MACHINE" = "nokia800" ]; then | 52 | EXT=${ROOTFS##.*} |
51 | TYPE="jffs2" | 53 | if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || |
52 | fi | 54 | "x$EXT" == "xjffs2" ]]; then |
53 | if [ "$MACHINE" = "nokia800-maemo" ]; then | 55 | FSTYPE=$EXT |
54 | TYPE="jffs2" | 56 | fi |
57 | echo "Using $FSTYPE as filesytem type for $ROOTFS" | ||
55 | fi | 58 | fi |
56 | HDIMAGE=$1 | ||
57 | shift | 59 | shift |
58 | fi | 60 | fi |
59 | 61 | ||