From patchwork Sun Dec 24 19:12:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 852742 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="dKtuVQMr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z4X2n46RMz9s03 for ; Mon, 25 Dec 2017 06:13:21 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3B3BBC21E11; Sun, 24 Dec 2017 19:12:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EBA95C21C29; Sun, 24 Dec 2017 19:12:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 86E43C21C29; Sun, 24 Dec 2017 19:12:15 +0000 (UTC) Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by lists.denx.de (Postfix) with ESMTPS id 43101C21C34 for ; Sun, 24 Dec 2017 19:12:14 +0000 (UTC) Received: by mail-io0-f193.google.com with SMTP id k202so21033948ioe.10 for ; Sun, 24 Dec 2017 11:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WMIGP7QERe+AXfZtjTdGkAE0/jAJ4hYk0pvCAlrsZ88=; b=dKtuVQMr/JJId0CXq0ASponCyqMjDmB57XuqpeCJh9+gsPn7rYQ4R3gX26+4w9EZ08 j64YOsfO9SdDSj5YSg8/7wX0biKQIQJuvmu0XneKYu38MB9EoQtHPgbD3qf/Yji22SBd VidArEQXKksogTk5z89YYZfvO1rGtzb8qD5p4yJpSeQnB4kbJX0qOj1i2layVDWgR4AN TepsrOf5W7Gj4yx4QujA2yijqzcmoF+goD9ROzmXo9scVgVGYHxtXKKe+8vpjl2QFtMr BUWoVqoTMXiBcGX3umiISGcZCoQF+QerWufM0UYXqEBOWaDysbCQMHlnMdhMXcqCK6h8 zo/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=WMIGP7QERe+AXfZtjTdGkAE0/jAJ4hYk0pvCAlrsZ88=; b=s7XEJo87uLlCcLt1/VB/zXvzCb16YZDaxEyB1uIaO9XgfRuZHkCpZ3UK46BbihCUmq 14BKmyEVt5CH+zIhXdHxDWxLDYmtMbPbWyFKuOX0au4YkXT6Yg4GFJ8MU6oZtaP0U3Tz dGa9QtQO2H/3IJTe8aN5lpaBjCAKlRh783K5jCLYxYvbR1E3xaBWNhueET5yrlH5kFYE t7IVwIQH46tcUj4OJcnudArczwncjPpCPZrQjnz/zWWWK9YyEkXxOMC8/3GULuu4lftC B/jhchTtfNyeHuatLX9wGdmDYrwl5S3XxRNX17zsB57U/foSwNMLfJkbLKY1BNdZlQdA 0e0Q== X-Gm-Message-State: AKGB3mLgs38OX/YKh9FUoD5Y9mb8LfB3AoJgv3n9V9ka50VnmiuJiu8i c0kiS8TgjAVnZKorUDLifNRxYQ== X-Google-Smtp-Source: ACJfBov7UBB5UaV6zNzQVQy4S8+LN3rACvIOjQviYJgMCPYHlUbQu4e0JmgR2OU5Ikk3iaq3PATp5w== X-Received: by 10.107.101.26 with SMTP id z26mr8228653iob.41.1514142732842; Sun, 24 Dec 2017 11:12:12 -0800 (PST) Received: from kiwi.bld.corp.google.com ([100.67.80.24]) by smtp.gmail.com with ESMTPSA id v65sm7752176itb.30.2017.12.24.11.12.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Dec 2017 11:12:12 -0800 (PST) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 8FA541416B7; Sun, 24 Dec 2017 12:12:10 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 24 Dec 2017 12:12:07 -0700 Message-Id: <20171224191208.210868-2-sjg@chromium.org> X-Mailer: git-send-email 2.15.1.620.gb9897f4670-goog In-Reply-To: <20171224191208.210868-1-sjg@chromium.org> References: <20171224191208.210868-1-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 1/2] dtoc: Allow DTC environment variable to provide path to dtc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- tools/binman/README | 4 ++++ tools/dtoc/fdt_util.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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):