[meta-xilinx] [PATCH 3/3] device-tree.bb: Add deprecation warning for 'zynq7-base.dtsi'

Nathan Rossi nathan at nathanrossi.com
Tue Apr 12 06:38:25 PDT 2016


The zynq7-base.dtsi include is deprecated and will be removed in the
future. This informs users of its deprecation, in order to encourage
users to move to the 'zynq-7000.dtsi' include.

This include is deprecated in favour of the 'zynq-7000.dtsi' include
which is available and kept up to date in kernel releases as well as the
linux-xlnx vendor tree releases. The device-tree recipe automatically
provides this include (and dependent includes) to allow for custom
device-trees to be built without needing to embed or patch the kernel
source.

Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
---
 recipes-bsp/device-tree/device-tree.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/recipes-bsp/device-tree/device-tree.bb b/recipes-bsp/device-tree/device-tree.bb
index 95ca0f3..3311a6f 100644
--- a/recipes-bsp/device-tree/device-tree.bb
+++ b/recipes-bsp/device-tree/device-tree.bb
@@ -44,6 +44,18 @@ python () {
             " ".join([d.getVarFlag("do_compile", "depends", True) or "", "virtual/kernel:do_shared_workdir"]))
 }
 
+python do_deprecation_check() {
+    # check for use of 'zynq7-base.dtsi'
+    import re
+    for i in d.getVar('MACHINE_DEVICETREE', True).split():
+        filepath = os.path.join(d.getVar("WORKDIR", True), i)
+        if os.path.exists(filepath):
+            with open(filepath, 'rb') as f:
+                if re.search("/include/ \"zynq7-base.dtsi\"", f.read()):
+                    bb.warn("%s includes 'zynq7-base.dtsi', this include is deprecated." % i)
+}
+addtask do_deprecation_check after do_unpack
+
 do_compile() {
 	if test -n "${MACHINE_DEVICETREE}"; then
 		mkdir -p ${WORKDIR}/devicetree
-- 
2.8.0.rc3




More information about the meta-xilinx mailing list