]> code.ossystems Code Review - openembedded-core.git/commitdiff
device-tree.bbclass: Add support to compile overlays separately
authorJaewon Lee <jaewon.lee@xilinx.com>
Fri, 14 Dec 2018 17:54:00 +0000 (09:54 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Mar 2019 14:41:20 +0000 (14:41 +0000)
Currently only dts files are considered when looping through files to
compile. Modifying the loop to compile other files that are overlays.
Also surrounding this check with a try block as the function to find
overlays parses the file for a '/plugin/' tag, and there may be files in
the DT_FILES_PATH directory that are not parseable.

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/devicetree.bbclass

index e1f377911d3ee5c6d0cad8eb7fc091947bc70b6f..5c03e4b0fd1072f72d5a34cbea5d053af787a66a 100644 (file)
@@ -122,9 +122,12 @@ python devicetree_do_compile() {
     includes = expand_includes("DT_INCLUDE", d)
     listpath = d.getVar("DT_FILES_PATH")
     for dts in os.listdir(listpath):
-        if not dts.endswith(".dts"):
-            continue # skip non-.dts files
         dtspath = os.path.join(listpath, dts)
+        try:
+            if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)):
+                continue # skip non-.dts files and non-overlay files
+        except:
+            continue # skip if can't determine if overlay
         devicetree_compile(dtspath, includes, d)
 }