Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #@TYPE: Machine |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | #@NAME: QEMU ARMv8 machine |
| 3 | #@DESCRIPTION: Machine configuration for running an ARMv8 system on QEMU |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | require conf/machine/include/arm/arch-armv8a.inc |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | require conf/machine/include/qemu.inc |
| 7 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | KERNEL_IMAGETYPE = "Image" |
| 9 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 11 | |
| 12 | # For runqemu |
| 13 | QB_SYSTEM_NAME = "qemu-system-aarch64" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 14 | QB_MACHINE = "-machine virt" |
| 15 | QB_CPU = "-cpu cortex-a57" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 16 | QB_CPU_KVM = "-cpu host" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | # Standard Serial console |
| 18 | QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0" |
| 19 | # For graphics to work we need to define the VGA device as well as the necessary USB devices |
| 20 | QB_OPT_APPEND = "-show-cursor -device VGA,edid=on" |
| 21 | QB_OPT_APPEND += "-device qemu-xhci -device usb-tablet -device usb-kbd" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 22 | # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" |
| 24 | # Virtio Networking support |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 25 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" |
| 26 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | # Virtio block device |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 28 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | # Virtio serial console |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 30 | QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" |