summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaewon Lee <jaewon.lee@xilinx.com>2019-06-12 16:29:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-14 22:48:22 +0100
commit68d6682398fd4c44aece04bf24dede1f645637e2 (patch)
treee8926deff35d0c6ea7f2f2558b992b601a1db83f
parent2938210267f8f30db6e217207e2ad75e70ee81aa (diff)
downloadpoky-68d6682398fd4c44aece04bf24dede1f645637e2.tar.gz
devicetree.bbclass: Combine stderr into stdout to see actual dtc error
Previously the subprocess command to run dtc was not properly displaying the error on console. Combining stderr into stdout for the dtc subprocess so the actual error can be seen on console without having to open the do_compile log. For example, previously on a dtc error, just the following stack trace and dtc command was being shown on console: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devicetree_do_compile(d) 0003: File: function: devicetree_do_compile 0127: if not(os.path.isfile(dtspath)) or not(dts.endswith(".dts") or devicetree_source_is_overlay(dtspath)): 0128: continue # skip non-.dts files and non-overlay files 0129: except: 0130: continue # skip if can't determine if overlay *** 0131: devicetree_compile(dtspath, includes, d) ... Exception: subprocess.CalledProcessError: Command '['dtc', '-R', '8', '-b', '0', '-p', '0x1000', '-i', '${INCLUDES}, '-o', 'system-top.dtb', '-I', 'dts', '-O', 'dtb', 'system-top.dts.pp']' returned non-zero exit status 1 with this patch, the actual error from the dtc command will be appended like the following: Subprocess output: Error: Label or path not found FATAL ERROR: Syntax error parsing input tree (From OE-Core rev: 1da43a558ffd5040a1b5aaebfc1c5118f5e59c01) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/devicetree.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
index 5c03e4b0fd..d8779c7943 100644
--- a/meta/classes/devicetree.bbclass
+++ b/meta/classes/devicetree.bbclass
@@ -116,7 +116,7 @@ def devicetree_compile(dtspath, includes, d):
116 dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")] 116 dtcargs += ["-o", "{0}.{1}".format(dtname, "dtbo" if isoverlay else "dtb")]
117 dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)] 117 dtcargs += ["-I", "dts", "-O", "dtb", "{0}.pp".format(dts)]
118 bb.note("Running {0}".format(" ".join(dtcargs))) 118 bb.note("Running {0}".format(" ".join(dtcargs)))
119 subprocess.run(dtcargs, check = True) 119 subprocess.run(dtcargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
120 120
121python devicetree_do_compile() { 121python devicetree_do_compile() {
122 includes = expand_includes("DT_INCLUDE", d) 122 includes = expand_includes("DT_INCLUDE", d)