diff options
-rwxr-xr-x | scripts/runqemu | 5 | ||||
-rwxr-xr-x | scripts/runqemu-internal | 26 |
2 files changed, 30 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index ff64a1d4c2..da35bb80d2 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -108,7 +108,7 @@ process_filename() { while true; do arg=${1} case "$arg" in - "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \ + "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") [ -z "$MACHINE" ] && MACHINE=$arg || \ error "conflicting MACHINE types [$MACHINE] and [$arg]" @@ -301,6 +301,9 @@ QEMUX86_64_DEFAULT_FSTYPE=ext3 QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin QEMUARM_DEFAULT_FSTYPE=ext3 +QEMUARM64_DEFAULT_KERNEL=Image-qemuarm64.bin +QEMUARM64_DEFAULT_FSTYPE=ext3 + QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin QEMUMIPS_DEFAULT_FSTYPE=ext3 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 |