From: Simon Glass Date: Sun, 24 Dec 2017 19:12:07 +0000 (-0700) Subject: dtoc: Allow DTC environment variable to provide path to dtc X-Git-Tag: v2018.03-rc1~174^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3ed0de31b48baf03efa3981035a41bc080f56f35;p=u-boot 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: Simon Glass --- diff --git a/tools/binman/README b/tools/binman/README index 08c3e56bde..7f558ec6a9 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -536,6 +536,10 @@ entry contents. Most of the time such essoteric behaviour is not needed, but it can be 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 ----------------- diff --git a/tools/dtoc/fdt_util.py b/tools/dtoc/fdt_util.py index ba0b6cc381..ad06245b42 100644 --- a/tools/dtoc/fdt_util.py +++ b/tools/dtoc/fdt_util.py @@ -79,7 +79,8 @@ def EnsureCompiled(fname): '-W', 'no-unit_address_vs_reg'] args.extend(search_list) args.append(dts_input) - command.Run('dtc', *args) + dtc = os.environ.get('DTC') or 'dtc' + command.Run(dtc, *args) return dtb_output def GetInt(node, propname, default=None):