[oe-commits] [openembedded-core] 04/18: device-tree.bbclass: Add support to compile overlays separately

git at git.openembedded.org git at git.openembedded.org
Sat Mar 9 09:29:24 UTC 2019

This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit f36cb2184dfb8464ef4a69dbb7dc0fc55fade867
Author: Jaewon Lee <jaewon.lee at xilinx.com>
AuthorDate: Fri Dec 14 09:54:00 2018 -0800

    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.
    Signed-off-by: Jaewon Lee <jaewon.lee at xilinx.com>
    Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr at xilinx.com>
    Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
 meta/classes/devicetree.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
index e1f3779..5c03e4b 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)

To stop receiving notification emails like this one, please contact
the administrator of this repository.

More information about the Openembedded-commits mailing list