Setup COMPATIBLE_MACHINE for the device-tree recipe so that it is only
available to machines that have provided sources/device-trees.

The COMPATIBLE_MACHINE is defined by overrides to match any machine
('.*') which sets the targeted override. This allows for easy reuse of
sources across similar machines.

Signed-off-by: Nathan Rossi <nat...@nathanrossi.com>
---
 recipes-bsp/device-tree/device-tree.bb       | 2 ++
 recipes-bsp/device-tree/device-tree.bbappend | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/recipes-bsp/device-tree/device-tree.bb 
b/recipes-bsp/device-tree/device-tree.bb
index eb1a879220..8aa03f6ecf 100644
--- a/recipes-bsp/device-tree/device-tree.bb
+++ b/recipes-bsp/device-tree/device-tree.bb
@@ -14,6 +14,8 @@ inherit kernel-arch
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS += "dtc-native"
 
+COMPATIBLE_MACHINE ?= "^$"
+
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 FILES_${PN} = "/boot/devicetree/*.dtb /boot/devicetree/*.dtbo"
diff --git a/recipes-bsp/device-tree/device-tree.bbappend 
b/recipes-bsp/device-tree/device-tree.bbappend
index 4f46e358b5..e128e0e84a 100644
--- a/recipes-bsp/device-tree/device-tree.bbappend
+++ b/recipes-bsp/device-tree/device-tree.bbappend
@@ -5,14 +5,23 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 SRC_URI_append_zynq = " file://zynq-7000-qspi-dummy.dtsi"
 
 # device tree sources for the various machines
+COMPATIBLE_MACHINE_picozed-zynq7 = ".*"
 SRC_URI_append_picozed-zynq7 = " file://picozed-zynq7.dts"
+
+COMPATIBLE_MACHINE_microzed-zynq7 = ".*"
 SRC_URI_append_microzed-zynq7 = " file://microzed-zynq7.dts"
+
+COMPATIBLE_MACHINE_qemu-zynq7 = ".*"
 SRC_URI_append_qemu-zynq7 = " file://qemu-zynq7.dts"
+
+COMPATIBLE_MACHINE_zybo-linux-bd-zynq7 = ".*"
 SRC_URI_append_zybo-linux-bd-zynq7 = " \
                file://zybo-linux-bd-zynq7.dts \
                file://pcw.dtsi \
                file://pl.dtsi \
                "
+
+COMPATIBLE_MACHINE_kc705-microblazeel = ".*"
 SRC_URI_append_kc705-microblazeel = " \
                file://kc705-microblazeel.dts \
                file://pl.dtsi \
-- 
2.15.0


-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to