summaryrefslogtreecommitdiffstats
path: root/meta/classes/devicetree.bbclass
diff options
context:
space:
mode:
authorJaewon Lee <jaewon.lee@xilinx.com>2018-12-14 09:54:00 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-09 14:43:10 +0000
commit58dbd3bfb92b39a754f9b69f61f98719af6d3b43 (patch)
tree52f87480708b4e66b2b7254202633e6735105940 /meta/classes/devicetree.bbclass
parent2841ac9d1f899a7e947af3791599e7e0a816db09 (diff)
downloadopenembedded-core-contrib-58dbd3bfb92b39a754f9b69f61f98719af6d3b43.tar.gz
device-tree.bbclass: Add support to compile overlays separately
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. (From OE-Core rev: bb1629820443bfedc72378a7c88f0656a2f3f7f1) 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>
Diffstat (limited to 'meta/classes/devicetree.bbclass')
-rw-r--r--meta/classes/devicetree.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
index e1f377911d..5c03e4b0fd 100644
--- a/meta/classes/devicetree.bbclass
+++ b/meta/classes/devicetree.bbclass
@@ -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)
}