Skip to content
Snippets Groups Projects
Commit 3ed0de31 authored by Simon Glass's avatar Simon Glass
Browse files

dtoc: Allow DTC environment variable to provide path to dtc


The system device-tree compiler may not be new enough to run the tests we
use in U-Boot (e.g. with binman). Allow use of a DTC environment variable
to point to the correct dtc. If not defined, the dtc on the default PATH
is used.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 4d4db83d
No related branches found
No related tags found
No related merge requests found
...@@ -536,6 +536,10 @@ entry contents. ...@@ -536,6 +536,10 @@ entry contents.
Most of the time such essoteric behaviour is not needed, but it can be Most of the time such essoteric behaviour is not needed, but it can be
essential for complex images. essential for complex images.
If you need to specify a particular device-tree compiler to use, you can define
the DTC environment variable. This can be useful when the system dtc is too
old.
History / Credits History / Credits
----------------- -----------------
......
...@@ -79,7 +79,8 @@ def EnsureCompiled(fname): ...@@ -79,7 +79,8 @@ def EnsureCompiled(fname):
'-W', 'no-unit_address_vs_reg'] '-W', 'no-unit_address_vs_reg']
args.extend(search_list) args.extend(search_list)
args.append(dts_input) args.append(dts_input)
command.Run('dtc', *args) dtc = os.environ.get('DTC') or 'dtc'
command.Run(dtc, *args)
return dtb_output return dtb_output
def GetInt(node, propname, default=None): def GetInt(node, propname, default=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment