diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-02-13 11:02:08 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-15 16:28:43 +0000 |
commit | 2c3a009b2059099731f2855a72f4bdf50a8f59be (patch) | |
tree | 2a3909c280a53235e9c703ecef80259e38b22f26 /scripts | |
parent | 64d2f13d1a4633572c37895b4ba2db1e1c824c97 (diff) | |
download | poky-2c3a009b2059099731f2855a72f4bdf50a8f59be.tar.gz |
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)
(From OE-Core rev: dd42931bf99b8bbd4ad452b3941d957f41b81796)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 3 | ||||
-rwxr-xr-x | scripts/runqemu-internal | 16 |
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() { | |||
40 | echo "Examples:" | 40 | echo "Examples:" |
41 | echo " $MYNAME qemuarm" | 41 | echo " $MYNAME qemuarm" |
42 | echo " $MYNAME qemux86-64 core-image-sato ext4" | 42 | echo " $MYNAME qemux86-64 core-image-sato ext4" |
43 | echo " $MYNAME qemux86-64 wic-image-minimal wic" | ||
43 | echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" | 44 | echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial" |
44 | echo " $MYNAME qemux86 ramfs" | 45 | echo " $MYNAME qemux86 ramfs" |
45 | echo " $MYNAME qemux86 iso" | 46 | echo " $MYNAME qemux86 iso" |
@@ -116,7 +117,7 @@ while true; do | |||
116 | [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \ | 117 | [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \ |
117 | error "conflicting MACHINE types [$MACHINE] and [$arg]" | 118 | error "conflicting MACHINE types [$MACHINE] and [$arg]" |
118 | ;; | 119 | ;; |
119 | "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" ) | 120 | "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" | "wic" ) |
120 | [ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \ | 121 | [ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \ |
121 | error "conflicting FSTYPE types [$FSTYPE] and [$arg]" | 122 | error "conflicting FSTYPE types [$FSTYPE] and [$arg]" |
122 | ;; | 123 | ;; |
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 | |||
349 | export QEMU_AUDIO_DRV="none" | 349 | export QEMU_AUDIO_DRV="none" |
350 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | 350 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" |
351 | # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer" | 351 | # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer" |
352 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 352 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
353 | KERNCMDLINE="root=$DROOT rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off" | 353 | KERNCMDLINE="root=$DROOT rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off" |
354 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" | 354 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" |
355 | fi | 355 | fi |
@@ -383,7 +383,7 @@ if [ "$MACHINE" = "qemuarm64" ]; then | |||
383 | else | 383 | else |
384 | QEMU_UI_OPTIONS="" | 384 | QEMU_UI_OPTIONS="" |
385 | fi | 385 | fi |
386 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 386 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
387 | KERNCMDLINE="root=$DROOT rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD" | 387 | KERNCMDLINE="root=$DROOT rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD" |
388 | # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now | 388 | # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now |
389 | QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | 389 | QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" |
@@ -411,7 +411,7 @@ if [ "$MACHINE" = "qemux86" ]; then | |||
411 | else | 411 | else |
412 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" | 412 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" |
413 | fi | 413 | fi |
414 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 414 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
415 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" | 415 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" |
416 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | 416 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" |
417 | fi | 417 | fi |
@@ -449,7 +449,7 @@ if [ "$MACHINE" = "qemux86-64" ]; then | |||
449 | else | 449 | else |
450 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" | 450 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware" |
451 | fi | 451 | fi |
452 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 452 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
453 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" | 453 | KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD" |
454 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | 454 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" |
455 | fi | 455 | fi |
@@ -495,7 +495,7 @@ if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemum | |||
495 | esac | 495 | esac |
496 | MACHINE_SUBTYPE=malta | 496 | MACHINE_SUBTYPE=malta |
497 | QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS" | 497 | QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS" |
498 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 498 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
499 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 499 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
500 | KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 500 | KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
501 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" | 501 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" |
@@ -521,7 +521,7 @@ if [ "$MACHINE" = "qemuppc" ]; then | |||
521 | else | 521 | else |
522 | QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD" | 522 | QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD" |
523 | fi | 523 | fi |
524 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 524 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
525 | KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 525 | KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
526 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" | 526 | QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS" |
527 | fi | 527 | fi |
@@ -540,7 +540,7 @@ if [ "$MACHINE" = "qemush4" ]; then | |||
540 | QEMU=qemu-system-sh4 | 540 | QEMU=qemu-system-sh4 |
541 | MACHINE_SUBTYPE=r2d | 541 | MACHINE_SUBTYPE=r2d |
542 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | 542 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" |
543 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | 543 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then |
544 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 544 | #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
545 | KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" | 545 | KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY" |
546 | QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio" | 546 | 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..." | |||
726 | if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then | 726 | if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then |
727 | echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | 727 | echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT |
728 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | 728 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT |
729 | elif [ "$FSTYPE" = "iso" ]; then | 729 | elif [ "$FSTYPE" = "iso" -o "$FSTYPE" = "wic" ]; then |
730 | echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | 730 | echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT |
731 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT | 731 | LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT |
732 | else | 732 | else |