meta-ibm: p10bmc: Add rainier runqemu options

Qemu boots kernel+dtb directly, and mounts wic image (full filesystem)
as an emulated mmc device.

We add zImage as a KERNEL_IMAGETYPES (plural is important) so it is
copied to the deploy directory.

Currently there is only a wic.xz which cannot be booted directly. We add
wic.qcow2 so the wic image is exported as a usable image for Qemu. This
is a sparse image so empty space does not take up disk.

TODO:
  1. qemu requires the image size to be a power of two. Current
     workaround:

     qemu-img resize p10bmc/tmp/deploy/images/p10bmc/*.wic.qcow2 16G

  2. Boot via u-boot. Requires qemu mmc patches from Cédric's tree, and
     creating an image with the boot0/boot1 partitions in it.

Change-Id: Ic64023b2d7f9bce80a025a1d847228e90e0b72bd
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/meta-ibm/conf/machine/p10bmc.conf b/meta-ibm/conf/machine/p10bmc.conf
index 165fa45..98723ca 100644
--- a/meta-ibm/conf/machine/p10bmc.conf
+++ b/meta-ibm/conf/machine/p10bmc.conf
@@ -65,3 +65,18 @@
 PACKAGECONFIG:append:pn-debug-trigger = " triggers"
 
 PACKAGECONFIG:pn-opkg = "curl openssl ssl-curl"
+
+# Add zImage to images directory for Qemu
+KERNEL_IMAGETYPES +=" zImage "
+
+# Produce a .qcow2 of the wic for Qemu
+IMAGE_FSTYPES +=" wic.qcow2 "
+
+QB_ROOTFS_OPT:p10bmc="-drive file=@ROOTFS@,if=sd,format=qcow2,index=2"
+QB_MACHINE:p10bmc="-machine rainier-bmc"
+QB_DTB:p10bmc="aspeed-bmc-ibm-rainier.dtb"
+QB_MEM:p10bmc="-m 1024"
+QB_DEFAULT_FSTYPE:p10bmc="wic.qcow2"
+QB_FSINFO = "wic:no-kernel-in-fs"
+QB_DEFAULT_KERNEL:p10bmc="zImage"
+QB_KERNEL_ROOT:p10bmc="PARTLABEL=rofs-a"