aspeed: Support runqemu

 $ runqemu nographic slirp

We require nographic instead of setting -nographic through QB_OPT_APPEND
in order to avoid the serial port being sent to a character device:

   self.qemu_opt += " -serial mon:vc"

We require slirp instead of setting QB_SLIRP_OPT as we are happy with
the default spirp options, we just want to enable slirp instead of the
other networking options that require root access.

Change-Id: I2ad8a8237ad1a0f5fa888991f7f58a6266a58caf
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/meta-aspeed/conf/machine/include/aspeed.inc b/meta-aspeed/conf/machine/include/aspeed.inc
index fdc60fd..9f5891c 100644
--- a/meta-aspeed/conf/machine/include/aspeed.inc
+++ b/meta-aspeed/conf/machine/include/aspeed.inc
@@ -35,3 +35,23 @@
 UBOOT_LOADADDRESS:aspeed-g4 ?= "0x40001000"
 UBOOT_LOADADDRESS:aspeed-g5 ?= "0x80001000"
 UBOOT_LOADADDRESS:aspeed-g6 ?= "0x80001000"
+
+# runqemu support
+EXTRA_IMAGEDEPENDS += "qemu-helper-native"
+IMAGE_CLASSES += "qemuboot"
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_ROOTFS_OPT = "-drive file=@ROOTFS@,if=mtd,format=raw"
+QB_DEFAULT_FSTYPE = "static.mtd"
+# Disable virtio-pci device
+QB_RNG = ""
+QB_NETWORK_DEVICE = "-net nic"
+# Boot from drive
+QB_DEFAULT_KERNEL = "none"
+# runqemu overrides default memory size
+QB_MEM = "-m 512"
+
+QB_MACHINE:aspeed-g4 = "-machine palmetto-bmc"
+QB_MACHINE:aspeed-g5 = "-machine ast2500-evb"
+QB_MACHINE:aspeed-g6 = "-machine ast2600-evb"
+QB_MEM:aspeed-g5 = "-m 1G"
+QB_MEM:aspeed-g6 = "-m 1G"