summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-02-13 11:02:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:22 +0000
commitdd42931bf99b8bbd4ad452b3941d957f41b81796 (patch)
tree885ea89afce4b497a31d4c73911ed9adb62e04f8
parentc712529030c71b45bb8ae647c17319c2647aedff (diff)
downloadopenembedded-core-contrib-dd42931bf99b8bbd4ad452b3941d957f41b81796.tar.gz
openembedded-core-contrib-dd42931bf99b8bbd4ad452b3941d957f41b81796.tar.bz2
openembedded-core-contrib-dd42931bf99b8bbd4ad452b3941d957f41b81796.zip
runqemu: add support for wic images
Quemu should be able to run wic images this way: runqemu <machine> <image recipe> wic Tested with 'runqemu qemux86-64 wic-image-minimal wic' (From OE-Core rev: 8716be799949cb8bde7fa49cbea61312a3a93bb7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu3
-rwxr-xr-xscripts/runqemu-internal16
2 files changed, 10 insertions, 9 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 46918e2af5..4bb3bb61ec 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -40,6 +40,7 @@ usage() {
echo "Examples:"
echo " $MYNAME qemuarm"
echo " $MYNAME qemux86-64 core-image-sato ext4"
+ echo " $MYNAME qemux86-64 wic-image-minimal wic"
echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
echo " $MYNAME qemux86 ramfs"
echo " $MYNAME qemux86 iso"
@@ -116,7 +117,7 @@ while true; do
[ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \
error "conflicting MACHINE types [$MACHINE] and [$arg]"
;;
- "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" )
+ "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" | "wic" )
[ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \
error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
;;
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index fb98a6ef1c..2926024e3f 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -349,7 +349,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
export QEMU_AUDIO_DRV="none"
QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
# QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
KERNCMDLINE="root=$DROOT rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
fi
@@ -383,7 +383,7 @@ if [ "$MACHINE" = "qemuarm64" ]; then
else
QEMU_UI_OPTIONS=""
fi
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
KERNCMDLINE="root=$DROOT rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD"
# qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now
QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
@@ -411,7 +411,7 @@ if [ "$MACHINE" = "qemux86" ]; then
else
QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
fi
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
fi
@@ -449,7 +449,7 @@ if [ "$MACHINE" = "qemux86-64" ]; then
else
QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
fi
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
fi
@@ -495,7 +495,7 @@ if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemum
esac
MACHINE_SUBTYPE=malta
QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
#KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
@@ -521,7 +521,7 @@ if [ "$MACHINE" = "qemuppc" ]; then
else
QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD"
fi
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
fi
@@ -540,7 +540,7 @@ if [ "$MACHINE" = "qemush4" ]; then
QEMU=qemu-system-sh4
MACHINE_SUBTYPE=r2d
QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
- if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
#KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
@@ -726,7 +726,7 @@ echo "Running $QEMU..."
if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
-elif [ "$FSTYPE" = "iso" ]; then
+elif [ "$FSTYPE" = "iso" -o "$FSTYPE" = "wic" ]; then
echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
else