summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 083090165b..48b7551464 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -47,6 +47,7 @@ usage() {
47 echo " $MYNAME qemux86 qemuparams=\"-m 256\"" 47 echo " $MYNAME qemux86 qemuparams=\"-m 256\""
48 echo " $MYNAME qemux86 bootparams=\"psplash=false\"" 48 echo " $MYNAME qemux86 bootparams=\"psplash=false\""
49 echo " $MYNAME path/to/<image>-<machine>.vmdk" 49 echo " $MYNAME path/to/<image>-<machine>.vmdk"
50 echo " $MYNAME path/to/<image>-<machine>.wic"
50 exit 1 51 exit 1
51} 52}
52 53
@@ -88,7 +89,7 @@ process_filename() {
88 [ -z "$KERNEL" ] && KERNEL=$filename || \ 89 [ -z "$KERNEL" ] && KERNEL=$filename || \
89 error "conflicting KERNEL args [$KERNEL] and [$filename]" 90 error "conflicting KERNEL args [$KERNEL] and [$filename]"
90 ;; 91 ;;
91 /ext[234]/|/jffs2/|/btrfs/) 92 /ext[234]/|/jffs2/|/btrfs/|/wic/)
92 # A file ending in a supportted fs type is a rootfs image 93 # A file ending in a supportted fs type is a rootfs image
93 if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then 94 if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then
94 FSTYPE=$EXT 95 FSTYPE=$EXT
@@ -235,7 +236,7 @@ elif [ ! -w /dev/net/tun ] ; then
235fi 236fi
236 237
237# Report errors for missing combinations of options 238# Report errors for missing combinations of options
238if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" ]; then 239if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" -a "$FSTYPE" != "wic" ]; then
239 error "you must specify at least a MACHINE, VM, or KERNEL argument" 240 error "you must specify at least a MACHINE, VM, or KERNEL argument"
240fi 241fi
241if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then 242if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
@@ -243,8 +244,9 @@ if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
243fi 244fi
244 245
245if [ -z "$MACHINE" ]; then 246if [ -z "$MACHINE" ]; then
246 if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ]; then 247 if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ] || [ "x$FSTYPE" = "xwic" ]; then
247 MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` 248 [ "x$FSTYPE" = "xwic" ] && filename=$ROOTFS || filename=$VM
249 MACHINE=`basename $filename | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
248 if [ -z "$MACHINE" ]; then 250 if [ -z "$MACHINE" ]; then
249 error "Unable to set MACHINE from image filename [$VM]" 251 error "Unable to set MACHINE from image filename [$VM]"
250 fi 252 fi