diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-02-13 11:02:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-15 16:28:22 +0000 |
commit | e6150971ea4eea49b802a12aea5ab733e894c92d (patch) | |
tree | 536a790a3e373cda90145155e930641a4780ecc6 /scripts/runqemu | |
parent | 35e776e00cce25f2c9c45500612fb66022ec4739 (diff) | |
download | openembedded-core-e6150971ea4eea49b802a12aea5ab733e894c92d.tar.gz openembedded-core-e6150971ea4eea49b802a12aea5ab733e894c92d.tar.bz2 openembedded-core-e6150971ea4eea49b802a12aea5ab733e894c92d.zip |
runqemu: support path/to/<image>-<machine>.wic
Supported providing wic image path to runqemu:
runquemu path/to/<image>-<machine>.wic
[YOCTO #8691]
(From OE-Core rev: 58a3bfb1e4b493200820cdf0bf3fc79e31e792de)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 10 |
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() { echo " $MYNAME qemux86 qemuparams=\"-m 256\"" echo " $MYNAME qemux86 bootparams=\"psplash=false\"" echo " $MYNAME path/to/<image>-<machine>.vmdk" + echo " $MYNAME path/to/<image>-<machine>.wic" exit 1 } @@ -88,7 +89,7 @@ process_filename() { [ -z "$KERNEL" ] && KERNEL=$filename || \ error "conflicting KERNEL args [$KERNEL] and [$filename]" ;; - /ext[234]/|/jffs2/|/btrfs/) + /ext[234]/|/jffs2/|/btrfs/|/wic/) # A file ending in a supportted fs type is a rootfs image if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then FSTYPE=$EXT @@ -235,7 +236,7 @@ elif [ ! -w /dev/net/tun ] ; then fi # Report errors for missing combinations of options -if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" ]; then +if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" -a "$FSTYPE" != "wic" ]; then error "you must specify at least a MACHINE, VM, or KERNEL argument" fi if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then @@ -243,8 +244,9 @@ if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then fi if [ -z "$MACHINE" ]; then - if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ]; then - MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` + if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ] || [ "x$FSTYPE" = "xwic" ]; then + [ "x$FSTYPE" = "xwic" ] && filename=$ROOTFS || filename=$VM + MACHINE=`basename $filename | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'` if [ -z "$MACHINE" ]; then error "Unable to set MACHINE from image filename [$VM]" fi |