summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorBertrand Marquis <bertrand.marquis@arm.com>2022-05-10 16:35:15 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-05-18 13:52:14 -0400
commitb5b3fcf492922ed1261f9c93ed2b9aead7183803 (patch)
treedad6e418cc3c18a257f2bd958c16f0dd2b1cd591 /classes
parent8bf2e182347d10fad4039ad0e6b4048375f02106 (diff)
downloadmeta-virtualization-b5b3fcf492922ed1261f9c93ed2b9aead7183803.tar.gz
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>
Diffstat (limited to 'classes')
-rw-r--r--classes/qemuboot-xen-defaults.bbclass20
1 files changed, 15 insertions, 5 deletions
diff --git a/classes/qemuboot-xen-defaults.bbclass b/classes/qemuboot-xen-defaults.bbclass
index c7e74c3e..f1550ccc 100644
--- a/classes/qemuboot-xen-defaults.bbclass
+++ b/classes/qemuboot-xen-defaults.bbclass
@@ -10,15 +10,21 @@ DOM0_KERNEL ??= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
10DOM0_KERNEL_LOAD_ADDR ??= "0x45000000" 10DOM0_KERNEL_LOAD_ADDR ??= "0x45000000"
11QB_XEN_DOMAIN_MODULES ??= "${DOM0_KERNEL}:${DOM0_KERNEL_LOAD_ADDR}:multiboot,kernel" 11QB_XEN_DOMAIN_MODULES ??= "${DOM0_KERNEL}:${DOM0_KERNEL_LOAD_ADDR}:multiboot,kernel"
12 12
13# Qemuboot for 64-bit Arm uses the QB_DEFAULT_KERNEL method to load Xen 13# Qemuboot for Arm uses the QB_DEFAULT_KERNEL method to load Xen
14# and the device loader option for the dom0 kernel: 14# and the device loader option for the dom0 kernel:
15QB_OPT_APPEND:append:aarch64 = " \ 15QB_OPT_APPEND:append:aarch64 = " \
16 -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \ 16 -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
17 " 17 "
18QB_DEFAULT_KERNEL:aarch64 = "xen-${MACHINE}" 18QB_OPT_APPEND:append:qemuarm = " \
19 -device loader,file=${DOM0_KERNEL},addr=${DOM0_KERNEL_LOAD_ADDR} \
20 "
21QB_DEFAULT_KERNEL:qemuarm64 = "xen-${MACHINE}"
22QB_DEFAULT_KERNEL:qemuarm = "xen-${MACHINE}"
19 23
20# 64-bit Arm: gic version 3 24# 64-bit Arm: gic version 3
21QB_MACHINE:aarch64 = "-machine virt,gic-version=3 -machine virtualization=true" 25QB_MACHINE:qemuarm64 = "-machine virt,gic-version=3 -machine virtualization=true"
26# 32-bit Arm
27QB_MACHINE:qemuarm = "-machine virt -machine virtualization=true"
22 28
23# Increase the default qemu memory allocation to allow for the hypervisor. 29# Increase the default qemu memory allocation to allow for the hypervisor.
24# Use a weak assignment to allow for change of default and override elsewhere. 30# Use a weak assignment to allow for change of default and override elsewhere.
@@ -26,5 +32,9 @@ QB_MEM_VALUE ??= "512"
26QB_MEM = "-m ${QB_MEM_VALUE}" 32QB_MEM = "-m ${QB_MEM_VALUE}"
27 33
28# 64-bit Arm: qemuboot with a device tree binary 34# 64-bit Arm: qemuboot with a device tree binary
29QB_DTB:aarch64 = "${IMAGE_NAME}.qemuboot.dtb" 35QB_DTB:qemuarm64 = "${IMAGE_NAME}.qemuboot.dtb"
30QB_DTB_LINK:aarch64 = "${IMAGE_LINK_NAME}.qemuboot.dtb" 36QB_DTB_LINK:qemuarm64 = "${IMAGE_LINK_NAME}.qemuboot.dtb"
37
38# 32-bit Arm: qemuboot with a device tree binary
39QB_DTB:qemuarm = "${IMAGE_NAME}.qemuboot.dtb"
40QB_DTB_LINK:qemuarm = "${IMAGE_LINK_NAME}.qemuboot.dtb"