]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu-internal: qemuarm enable usage of virtio devices
authorAníbal Limón <anibal.limon@linux.intel.com>
Tue, 29 Sep 2015 22:51:23 +0000 (17:51 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Oct 2015 06:40:37 +0000 (07:40 +0100)
We are experiencing occasional segfaults in scsi sym53c8xx driver
on qemuarm boot. There are some old discussions into the mailing
lists [1] about the scsi problem and seems to be isn't fixed.

We use virtio blk/net devices into qemuarm64 also are supported
into qemuarm so change to use it because virtio devices are the best
choice.

[YOCTO #8060]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8060#c10

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-internal

index 078545e9318a01112d7be037f7fd58eee4e8cae8..13840b30235b0ffd53eef4c88915451dd9254768 100755 (executable)
@@ -364,8 +364,18 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
     if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
-        KERNCMDLINE="root=/dev/sda rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -drive file=$ROOTFS,format=raw -no-reboot $QEMU_UI_OPTIONS"
+        if [ "$MACHINE" = "qemuarm" ]; then
+            QEMU_NETWORK_CMD="-net nic,model=virtio $QEMU_TAP_CMD"
+            DROOT="/dev/vda"
+            ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
+        else
+            QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD"
+            DROOT="/dev/sda"
+            ROOTFS_OPTIONS="-drive file=$ROOTFS,format=raw"
+        fi
+
+        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
     if [ "$FSTYPE" = "nfs" ]; then
         if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then