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() { | |||
108 | while true; do | 108 | while true; do |
109 | arg=${1} | 109 | arg=${1} |
110 | case "$arg" in | 110 | case "$arg" in |
111 | "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \ | 111 | "qemux86" | "qemux86-64" | "qemuarm" | "qemuarm64" | "qemumips" | "qemumipsel" | \ |
112 | "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") | 112 | "qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq") |
113 | [ -z "$MACHINE" ] && MACHINE=$arg || \ | 113 | [ -z "$MACHINE" ] && MACHINE=$arg || \ |
114 | error "conflicting MACHINE types [$MACHINE] and [$arg]" | 114 | error "conflicting MACHINE types [$MACHINE] and [$arg]" |
@@ -301,6 +301,9 @@ QEMUX86_64_DEFAULT_FSTYPE=ext3 | |||
301 | QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin | 301 | QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin |
302 | QEMUARM_DEFAULT_FSTYPE=ext3 | 302 | QEMUARM_DEFAULT_FSTYPE=ext3 |
303 | 303 | ||
304 | QEMUARM64_DEFAULT_KERNEL=Image-qemuarm64.bin | ||
305 | QEMUARM64_DEFAULT_FSTYPE=ext3 | ||
306 | |||
304 | QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin | 307 | QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin |
305 | QEMUMIPS_DEFAULT_FSTYPE=ext3 | 308 | QEMUMIPS_DEFAULT_FSTYPE=ext3 |
306 | 309 | ||
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 | |||
50 | "qemuarm") | 50 | "qemuarm") |
51 | mem_size=128 | 51 | mem_size=128 |
52 | ;; | 52 | ;; |
53 | "qemuarm64") | ||
54 | mem_size=128 | ||
55 | ;; | ||
53 | "qemumicroblaze") | 56 | "qemumicroblaze") |
54 | mem_size=64 | 57 | mem_size=64 |
55 | ;; | 58 | ;; |
@@ -260,8 +263,17 @@ else | |||
260 | DROOT="/dev/hda" | 263 | DROOT="/dev/hda" |
261 | ROOTFS_OPTIONS="-hda $ROOTFS" | 264 | ROOTFS_OPTIONS="-hda $ROOTFS" |
262 | fi | 265 | fi |
266 | if [ "$MACHINE" = "qemuarm64" ]; then | ||
267 | QEMU_NETWORK_CMD="-netdev user,id=net0 -device virtio-net-device,netdev=net0" | ||
268 | DROOT="/dev/vda" | ||
269 | ROOTFS_OPTIONS="-drive id=disk0,file=$ROOTFS -device virtio-blk-device,drive=disk0" | ||
270 | fi | ||
271 | |||
263 | KERNCMDLINE="mem=$QEMU_MEMORY" | 272 | KERNCMDLINE="mem=$QEMU_MEMORY" |
264 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" | 273 | QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet" |
274 | if [ $MACHINE = 'qemuarm64' ]; then | ||
275 | QEMU_UI_OPTIONS="-nographic" | ||
276 | fi | ||
265 | 277 | ||
266 | NFS_INSTANCE=`echo $TAP | sed 's/tap//'` | 278 | NFS_INSTANCE=`echo $TAP | sed 's/tap//'` |
267 | export NFS_INSTANCE | 279 | export NFS_INSTANCE |
@@ -274,6 +286,7 @@ fi | |||
274 | 286 | ||
275 | case "$MACHINE" in | 287 | case "$MACHINE" in |
276 | "qemuarm") ;; | 288 | "qemuarm") ;; |
289 | "qemuarm64") ;; | ||
277 | "qemumicroblaze") ;; | 290 | "qemumicroblaze") ;; |
278 | "qemumips") ;; | 291 | "qemumips") ;; |
279 | "qemumipsel") ;; | 292 | "qemumipsel") ;; |
@@ -362,6 +375,19 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm | |||
362 | fi | 375 | fi |
363 | fi | 376 | fi |
364 | 377 | ||
378 | if [ "$MACHINE" = "qemuarm64" ]; then | ||
379 | QEMU=qemu-system-aarch64 | ||
380 | |||
381 | export QEMU_AUDIO_DRV="none" | ||
382 | QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS" | ||
383 | if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then | ||
384 | KERNCMDLINE="root=/dev/vda rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off" | ||
385 | # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now | ||
386 | QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS" | ||
387 | fi | ||
388 | fi | ||
389 | |||
390 | |||
365 | if [ "$MACHINE" = "qemux86" ]; then | 391 | if [ "$MACHINE" = "qemux86" ]; then |
366 | QEMU=qemu-system-i386 | 392 | QEMU=qemu-system-i386 |
367 | if [ "$KVM_ACTIVE" = "yes" ]; then | 393 | if [ "$KVM_ACTIVE" = "yes" ]; then |