diff options
Diffstat (limited to 'conf/machine/include/machine-xilinx-qemu.inc')
-rw-r--r-- | conf/machine/include/machine-xilinx-qemu.inc | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/conf/machine/include/machine-xilinx-qemu.inc b/conf/machine/include/machine-xilinx-qemu.inc index 2701df20..938d76d4 100644 --- a/conf/machine/include/machine-xilinx-qemu.inc +++ b/conf/machine/include/machine-xilinx-qemu.inc | |||
@@ -1,4 +1,8 @@ | |||
1 | EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" | 1 | # This include is used to setup default QEMU and qemuboot config for meta-xilinx |
2 | # machines. | ||
3 | |||
4 | # depend on qemu-helper-native, which will depend on QEMU | ||
5 | EXTRA_IMAGEDEPENDS += "qemu-helper-native" | ||
2 | 6 | ||
3 | def qemu_default_dtb(d): | 7 | def qemu_default_dtb(d): |
4 | if d.getVar("IMAGE_BOOT_FILES", True): | 8 | if d.getVar("IMAGE_BOOT_FILES", True): |
@@ -30,42 +34,11 @@ def qemu_target_binary(d): | |||
30 | ta = "microblaze" | 34 | ta = "microblaze" |
31 | elif ta == "arm": | 35 | elif ta == "arm": |
32 | ta = "aarch64" | 36 | ta = "aarch64" |
33 | if qemuboot_xilinx_enabled(d): | ||
34 | return "qemu-xilinx/qemu-system-%s" % ta | ||
35 | return "qemu-system-%s" % ta | 37 | return "qemu-system-%s" % ta |
36 | 38 | ||
37 | def qemuboot_xilinx_enabled(d): | 39 | # For qemuboot, default setup across all machines in meta-xilinx |
38 | if bb.utils.contains("MACHINE_FEATURES", "qemu-system-xilinx", True, False, d): | ||
39 | if d.getVar("XILINX_QEMUBOOT", True) == "1": | ||
40 | return True | ||
41 | return False | ||
42 | |||
43 | # For runqemu, default setup across all machines in meta-xilinx | ||
44 | IMAGE_CLASSES += "qemuboot" | ||
45 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" | 40 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" |
46 | QB_DEFAULT_FSTYPE ?= "cpio" | 41 | QB_DEFAULT_FSTYPE ?= "cpio" |
47 | |||
48 | XILINX_QEMUBOOT[doc] = "Set this variable to '1' to enable the generation of qemuboot.conf which uses the Xilinx QEMU." | ||
49 | XILINX_QEMUBOOT ??= "" | ||
50 | |||
51 | # Dependencies for native Xilinx QEMU | ||
52 | XILINX_QEMU_DEPENDS ?= "qemu-xilinx-native" | ||
53 | # If the machine supports the Xilinx QEMU, add the dependencies | ||
54 | EXTRA_IMAGEDEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-system-xilinx', '${XILINX_QEMU_DEPENDS}', '', d)}" | ||
55 | |||
56 | # Add an override for when booting with the Xilinx QEMU | ||
57 | MACHINEOVERRIDES .= "${@':qemuboot-xilinx' if qemuboot_xilinx_enabled(d) else ''}" | ||
58 | |||
59 | # This is ignored if using Xilinx's QEMU fork | ||
60 | QB_DTB ?= "${@qemu_default_dtb(d)}" | 42 | QB_DTB ?= "${@qemu_default_dtb(d)}" |
61 | |||
62 | # ZynqMP machines need special "-hw-dtb" device trees for the Xilinx QEMU | ||
63 | XILINX_QEMU_DEPENDS_append_zynqmp = " qemu-devicetrees" | ||
64 | |||
65 | QB_DEFAULT_KERNEL_qemuboot-xilinx = "none" | ||
66 | QB_KERNEL_CMDLINE_APPEND ?= "${@qemu_default_serial(d)}" | 43 | QB_KERNEL_CMDLINE_APPEND ?= "${@qemu_default_serial(d)}" |
67 | 44 | ||
68 | # Default machine targets for Xilinx QEMU (FDT Generic) | ||
69 | QB_MACHINE_qemuboot-xilinx_aarch64 = "-machine arm-generic-fdt" | ||
70 | QB_MACHINE_qemuboot-xilinx_arm = "-machine arm-generic-fdt-plnx" | ||
71 | QB_MACHINE_qemuboot-xilinx_microblaze = "-machine microblaze-generic-fdt" | ||