diff options
authorBertrand Marquis <bertrand.marquis@arm.com>2022-05-10 16:35:15 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-05-18 13:56:43 -0400
commitedd6b20c6a1c79007a0abc90d96da1d014b79e2f (patch)
parent11ac2d467156cf388fc8bcc871835f61d726ccad (diff)
xen: enable qemuboot for arm32
Add required variables to generate a qemuboot devicetree for qemuarm. With this change, Xen and dom0 can be started using runqemu. Xen is started using qemu kernel argument and the devicetree is modified to properly boot dom0 (which is loaded in memory). This is using the same system as qemuarm64. At this stage dom0 is hanging on PCI device scanning. This patch is also using qemuarm64 as machine for arm64 bit instead of aarch64 to allow adding support for other machine (an example a Xilinx board that can be emulated with using an other xen machine). Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
1 files changed, 15 insertions, 5 deletions
diff --git a/classes/qemuboot-xen-defaults.bbclass b/classes/qemuboot-xen-defaults.bbclass
index c7e74c3..f1550cc 100644
--- a/classes/qemuboot-xen-defaults.bbclass
+++ b/classes/qemuboot-xen-defaults.bbclass
@@ -10,15 +10,21 @@ DOM0_KERNEL ??= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
DOM0_KERNEL_LOAD_ADDR ??= "0x45000000"
-# Qemuboot for 64-bit Arm uses the QB_DEFAULT_KERNEL method to load Xen
+# Qemuboot for Arm uses the QB_DEFAULT_KERNEL method to load Xen
# and the device loader option for the dom0 kernel:
QB_OPT_APPEND:append:aarch64 = " \
-device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
-QB_DEFAULT_KERNEL:aarch64 = "xen-${MACHINE}"
+QB_OPT_APPEND:append:qemuarm = " \
+ -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
+ "
+QB_DEFAULT_KERNEL:qemuarm64 = "xen-${MACHINE}"
+QB_DEFAULT_KERNEL:qemuarm = "xen-${MACHINE}"
# 64-bit Arm: gic version 3
-QB_MACHINE:aarch64 = "-machine virt,gic-version=3 -machine virtualization=true"
+QB_MACHINE:qemuarm64 = "-machine virt,gic-version=3 -machine virtualization=true"
+# 32-bit Arm
+QB_MACHINE:qemuarm = "-machine virt -machine virtualization=true"
# Increase the default qemu memory allocation to allow for the hypervisor.
# Use a weak assignment to allow for change of default and override elsewhere.
@@ -26,5 +32,9 @@ QB_MEM_VALUE ??= "512"
# 64-bit Arm: qemuboot with a device tree binary
-QB_DTB:aarch64 = "${IMAGE_NAME}.qemuboot.dtb"
-QB_DTB_LINK:aarch64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
+QB_DTB:qemuarm64 = "${IMAGE_NAME}.qemuboot.dtb"
+QB_DTB_LINK:qemuarm64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
+# 32-bit Arm: qemuboot with a device tree binary
+QB_DTB:qemuarm = "${IMAGE_NAME}.qemuboot.dtb"
+QB_DTB_LINK:qemuarm = "${IMAGE_LINK_NAME}.qemuboot.dtb"