diff options
author | Bertrand Marquis <bertrand.marquis@arm.com> | 2022-05-10 16:35:14 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-05-18 13:52:14 -0400 |
commit | 8bf2e182347d10fad4039ad0e6b4048375f02106 (patch) | |
tree | bf7eaba43d381696cab5f153f4bba84b95812e02 /classes | |
parent | 3e6c50b794eb42fb996fc50a8e6397a3c8cde265 (diff) | |
download | meta-virtualization-8bf2e182347d10fad4039ad0e6b4048375f02106.tar.gz |
qemuboot: Fix command line and enable other machines
Fix qemuboot-xen-dtb to properly add dom0 bootargs by using a parameter
instead of directly using the QB_XEN_DOM0_BOOTARGS inside the function.
When not done, the variable is empty and dom0 bootargs are wrong in the
device tree.
Use QB_MACHINE to generate a device tree with qemu instead of always
using the armv8 machine. This will allow this class to be used for other
machines later.
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-dtb.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/classes/qemuboot-xen-dtb.bbclass b/classes/qemuboot-xen-dtb.bbclass index 6fe31642..d43d23a3 100644 --- a/classes/qemuboot-xen-dtb.bbclass +++ b/classes/qemuboot-xen-dtb.bbclass | |||
@@ -29,6 +29,7 @@ | |||
29 | # See also: Other QB_ variables as defined by the qemuboot.bbclass. | 29 | # See also: Other QB_ variables as defined by the qemuboot.bbclass. |
30 | 30 | ||
31 | write_lops_xen_section() { | 31 | write_lops_xen_section() { |
32 | DOM0_BOOTARGS="$2" | ||
32 | cat <<EOF >"$1" | 33 | cat <<EOF >"$1" |
33 | /dts-v1/; | 34 | /dts-v1/; |
34 | / { | 35 | / { |
@@ -47,7 +48,7 @@ write_lops_xen_section() { | |||
47 | }; | 48 | }; |
48 | lop_2 { | 49 | lop_2 { |
49 | compatible = "system-device-tree-v1,lop,modify"; | 50 | compatible = "system-device-tree-v1,lop,modify"; |
50 | modify = "/chosen:xen,dom0-bootargs:${QB_XEN_DOM0_BOOTARGS}"; | 51 | modify = "/chosen:xen,dom0-bootargs:${DOM0_BOOTARGS}"; |
51 | }; | 52 | }; |
52 | lop_3 { | 53 | lop_3 { |
53 | compatible = "system-device-tree-v1,lop,modify"; | 54 | compatible = "system-device-tree-v1,lop,modify"; |
@@ -118,8 +119,7 @@ generate_xen_qemuboot_dtb() { | |||
118 | -device qemu-xhci \ | 119 | -device qemu-xhci \ |
119 | -device usb-tablet \ | 120 | -device usb-tablet \ |
120 | -device usb-kbd \ | 121 | -device usb-kbd \ |
121 | -machine virt,gic-version=3 \ | 122 | ${QB_MACHINE} \ |
122 | -machine virtualization=true \ | ||
123 | ${QB_CPU} \ | 123 | ${QB_CPU} \ |
124 | ${QB_SMP} \ | 124 | ${QB_SMP} \ |
125 | ${QB_MEM} \ | 125 | ${QB_MEM} \ |
@@ -129,7 +129,8 @@ generate_xen_qemuboot_dtb() { | |||
129 | 129 | ||
130 | # Lopper generates temporary files in cwd, so run it within ${B} | 130 | # Lopper generates temporary files in cwd, so run it within ${B} |
131 | cd "${B}" | 131 | cd "${B}" |
132 | write_lops_xen_section "${B}/lop-insert-xen-section.dts" | 132 | write_lops_xen_section "${B}/lop-insert-xen-section.dts" \ |
133 | "${QB_XEN_DOM0_BOOTARGS}" | ||
133 | 134 | ||
134 | write_lop_add_to_xen_cmdline "${B}/lop-xen-cmdline.dts" \ | 135 | write_lop_add_to_xen_cmdline "${B}/lop-xen-cmdline.dts" \ |
135 | "${QB_XEN_CMDLINE_EXTRA}" | 136 | "${QB_XEN_CMDLINE_EXTRA}" |