* [PATCH] device-tree.bbclass: Add support to compile overlays separately
@ 2018-12-13 22:17 Jaewon Lee
2018-12-14 4:56 ` Nathan Rossi
0 siblings, 1 reply; 2+ messages in thread
From: Jaewon Lee @ 2018-12-13 22:17 UTC (permalink / raw)
To: openembedded-core, nathan, manjukum, alejandr
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>
---
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 8fe5a5e..db10b86 100644
--- a/meta/classes/devicetree.bbclass
+++ b/meta/classes/devicetree.bbclass
@@ -120,9 +120,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)
}
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] device-tree.bbclass: Add support to compile overlays separately
2018-12-13 22:17 [PATCH] device-tree.bbclass: Add support to compile overlays separately Jaewon Lee
@ 2018-12-14 4:56 ` Nathan Rossi
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Rossi @ 2018-12-14 4:56 UTC (permalink / raw)
To: jaewon.lee; +Cc: openembedded-core
On Fri, 14 Dec 2018 at 08:18, Jaewon Lee <jaewon.lee@xilinx.com> wrote:
>
> 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>
> ---
> 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 8fe5a5e..db10b86 100644
> --- a/meta/classes/devicetree.bbclass
> +++ b/meta/classes/devicetree.bbclass
> @@ -120,9 +120,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)
This is missing the trailing "):". Otherwise looks good.
Regards,
Nathan
> + continue # skip non-.dts files and non-overlay files
> + except:
> + continue # skip if can't determine if overlay
> devicetree_compile(dtspath, includes, d)
> }
>
> --
> 2.7.5
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-14 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 22:17 [PATCH] device-tree.bbclass: Add support to compile overlays separately Jaewon Lee
2018-12-14 4:56 ` Nathan Rossi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.