]> code.ossystems Code Review - openembedded-core.git/commit
devicetree.bbclass: Combine stderr into stdout to see actual dtc error
authorJaewon Lee <jaewon.lee@xilinx.com>
Wed, 12 Jun 2019 23:29:01 +0000 (16:29 -0700)
committerArmin Kuster <akuster808@gmail.com>
Thu, 27 Jun 2019 13:56:20 +0000 (06:56 -0700)
commita0b7fe6a79932a27d1b6ef4b9122609b9c266676
tree5620a189a6c92d93cb693b1c9bbb85291e8e6f57
parentba4e54609e80abe12939bc01871d78d1914fdbaf
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

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/devicetree.bbclass