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/runqemu-internal | |
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/runqemu-internal')
-rwxr-xr-x | scripts/runqemu-internal | 16 |
1 files changed, 8 insertions, 8 deletions
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 |