summaryrefslogtreecommitdiff
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2014-12-18 16:51:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-22 10:53:55 +0000
commit2f020b53bdb8c262e432bc4df35101fa990c460c (patch)
tree702c5e821055574c64c2e97f3d38b28a2fb295fd /scripts/runqemu-internal
parent07cdb1b6583a6cf379de769bdf392c90b49692db (diff)
downloadopenembedded-core-2f020b53bdb8c262e432bc4df35101fa990c460c.tar.gz
openembedded-core-2f020b53bdb8c262e432bc4df35101fa990c460c.tar.bz2
openembedded-core-2f020b53bdb8c262e432bc4df35101fa990c460c.zip
runqemu: add qemuarm64 support.
Update scripts runqemu and runqemu-internal to support to boot qemuarm64. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 38745dd126..c219419014 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -50,6 +50,9 @@ else
"qemuarm")
mem_size=128
;;
+ "qemuarm64")
+ mem_size=128
+ ;;
"qemumicroblaze")
mem_size=64
;;
@@ -260,8 +263,17 @@ else
DROOT="/dev/hda"
ROOTFS_OPTIONS="-hda $ROOTFS"
fi
+ if [ "$MACHINE" = "qemuarm64" ]; then
+ QEMU_NETWORK_CMD="-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+ DROOT="/dev/vda"
+ ROOTFS_OPTIONS="-drive id=disk0,file=$ROOTFS -device virtio-blk-device,drive=disk0"
+ fi
+
KERNCMDLINE="mem=$QEMU_MEMORY"
QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
+ if [ $MACHINE = 'qemuarm64' ]; then
+ QEMU_UI_OPTIONS="-nographic"
+ fi
NFS_INSTANCE=`echo $TAP | sed 's/tap//'`
export NFS_INSTANCE
@@ -274,6 +286,7 @@ fi
case "$MACHINE" in
"qemuarm") ;;
+ "qemuarm64") ;;
"qemumicroblaze") ;;
"qemumips") ;;
"qemumipsel") ;;
@@ -362,6 +375,19 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
fi
fi
+if [ "$MACHINE" = "qemuarm64" ]; then
+ QEMU=qemu-system-aarch64
+
+ export QEMU_AUDIO_DRV="none"
+ QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ KERNCMDLINE="root=/dev/vda rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off"
+ # 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"
+ fi
+fi
+
+
if [ "$MACHINE" = "qemux86" ]; then
QEMU=qemu-system-i386
if [ "$KVM_ACTIVE" = "yes" ]; then