summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2022-10-19 09:38:26 +0300
committerAdriana Kobylak <anoo@linux.ibm.com>2022-10-25 00:04:11 +0300
commit25cd59bcd0f4abc0fed470574aefe8b38a459884 (patch)
tree898d38a6c7599b32474310e4343078cc1ba1810a
parent44b66385ccf5f375a764e0b1e666ffaf1df63ffc (diff)
downloadopenbmc-25cd59bcd0f4abc0fed470574aefe8b38a459884.tar.xz
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>
-rw-r--r--meta-ibm/conf/machine/p10bmc.conf15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-ibm/conf/machine/p10bmc.conf b/meta-ibm/conf/machine/p10bmc.conf
index 165fa45a0d..98723ca77c 100644
--- a/meta-ibm/conf/machine/p10bmc.conf
+++ b/meta-ibm/conf/machine/p10bmc.conf
@@ -65,3 +65,18 @@ DEBUG_TRIGGERS = "kcs2"
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"