From 150c913a07ca9688282e133328dc1cddff244e24 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Sun, 10 Apr 2016 22:23:27 +1000 Subject: device-tree.bb: Add deprecation warning for 'zynq7-base.dtsi' 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 --- 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 95ca0f35..3311a6f7 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 -- cgit v1.2.3-54-g00ecf