[OE-core] [RESEND][PATCH 2/3] scripts/runqemu: factor out some qemuarm configuration options
Dmitry Eremin-Solenikov
dmitry_eremin at mentor.com
Mon May 11 19:52:55 UTC 2015
In preparation of adding qemuarma9 support to runqemu scripts, factor
out some qemuarm-related options to be handled in a more generic way.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin at mentor.com>
---
scripts/runqemu-internal | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index bc2a355..f17bb05 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -124,6 +124,10 @@ if [ "$SLIRP_ENABLED" = "yes" ]; then
QEMU_NETWORK_CMD=""
DROOT="/dev/vda"
ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
+ elif [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
+ QEMU_NETWORK_CMD=""
+ DROOT="/dev/sda"
+ ROOTFS_OPTIONS="-hda $ROOTFS"
else
QEMU_NETWORK_CMD=""
DROOT="/dev/hda"
@@ -267,6 +271,11 @@ else
DROOT="/dev/hda"
ROOTFS_OPTIONS="-hda $ROOTFS"
fi
+ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
+ QEMU_NETWORK_CMD="-net nic,vlan=0 $QEMU_TAP_CMD"
+ DROOT="/dev/sda"
+ ROOTFS_OPTIONS="-hda $ROOTFS"
+ fi
if [ "$MACHINE" = "qemuarm64" ]; then
QEMU_NETWORK_CMD="-netdev tap,id=net0,ifname=$TAP,script=no,downscript=no -device virtio-net-device,netdev=net0 "
DROOT="/dev/vda"
@@ -359,8 +368,8 @@ 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} -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
+ 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
--
2.1.4
More information about the Openembedded-core
mailing list