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): From patchwork Sun Dec 24 19:12:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 852743 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="RlUb+W4q"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z4X2y2r5Bz9s03 for ; Mon, 25 Dec 2017 06:13:30 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 16B12C21E48; Sun, 24 Dec 2017 19:12:55 +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_H3, RCVD_IN_MSPIKE_WL, 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 D30C2C21DE8; Sun, 24 Dec 2017 19:12:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 29899C21C29; Sun, 24 Dec 2017 19:12:16 +0000 (UTC) Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by lists.denx.de (Postfix) with ESMTPS id 56D2CC21C41 for ; Sun, 24 Dec 2017 19:12:15 +0000 (UTC) Received: by mail-it0-f68.google.com with SMTP id r6so19489994itr.3 for ; Sun, 24 Dec 2017 11:12:15 -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=N9nvvJeFWEyGjYdYZMtw8Rmkfz9LYmoNAu1ZksTENVw=; b=RlUb+W4qUrIqMtxjJAAmY1GJ3kCBmTl+T+HfR1UJH9kVrJk6DXZ0fSnu5rC5gxegZM pHu8EGhuTb2ynvoDm/GFUhLYHm87vGWQR/Wrk6inCaBz5SvQ6mtxhxQvxgIFRO7HMfOY pCK6wC9N/px3o9u0ZmF2Ovna0tjoA+sCcNlsBfWi4hCrn7qzBC7iAmIo6Nav+QBnXBbJ pk8ITMK/ymaCtZGV5yuYTBFfdVcNWEVO+UckshcV0mpfm+hay3xFpFluH4gOO+3UcHwu eo77/eq0RL3KNIsexHCaTJ/C02QPJ7kT7Tm8ZiINQHn3QcMbDa2fKnmdgjA7lPP1cKdN C6KA== 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=N9nvvJeFWEyGjYdYZMtw8Rmkfz9LYmoNAu1ZksTENVw=; b=figSG/E9m6pOnvqwzhAN5s2agUxWebTd75vzPYI6LJ+0urDS7PJT+R8Q5LTRlUhYkm bbPgR9Gs/z3zsWIyChx/m4d+UmlaASAXFoXHTiSRS2IMd5UgPbagpzsBzRVBEHApOylP F/KDrCPYj4/MYcvp9QciXNdhZr1xwinlVzZpOvI+3tbaclhjUpqc0OG2zOnuscVhDPZ3 oBrLxU25eaYf2gsj3td1PNmx8Z11t3TSZAx7Ldg4bJ+HmHRTWh0YBvuIGCMOYPD7875f 1jyxZtkToJrOO/1UFyDVN34UEzZqkd8q/w2Utp35hv2f6AQEusMz3vgv3oI7Lc7PtKFq LZeA== X-Gm-Message-State: AKGB3mLGTCcsXmqmNCAq45E3ZdoSvKFEHw1qcIWv9/eMiSlcMQRLKqfw 2kWxpSps1Th6JRirUeh2THjPzw== X-Google-Smtp-Source: ACJfBosRrMW9cOVpZtu4stlaFYx0PjItSm0oqLsxFGitXZpcQ1Y5GnUiUy/+XSWkixbnjs7130iVsg== X-Received: by 10.36.124.15 with SMTP id a15mr28029704itd.135.1514142733603; Sun, 24 Dec 2017 11:12:13 -0800 (PST) Received: from kiwi.bld.corp.google.com ([100.67.80.24]) by smtp.gmail.com with ESMTPSA id i17sm5367786ioa.82.2017.12.24.11.12.12 (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 BC795141890; Sun, 24 Dec 2017 12:12:11 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 24 Dec 2017 12:12:08 -0700 Message-Id: <20171224191208.210868-3-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 2/2] test: Set the DTC environment variable 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" Set this to our own device-tree compiler since we know it is new enough to run the tests. Signed-off-by: Simon Glass --- test/run | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/run b/test/run index d5631b802a..b2d24e3f8e 100755 --- a/test/run +++ b/test/run @@ -17,17 +17,19 @@ run_test ./test/py/test.py --bd sandbox_spl --build -k \ # Run tests for the flat DT version of sandbox ./test/py/test.py --bd sandbox_flattree --build -PYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test \ +DTC_DIR=build-sandbox_spl/scripts/dtc + +PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ ./tools/binman/binman -t run_test ./tools/patman/patman --test run_test ./tools/buildman/buildman -t -PYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test ./tools/dtoc/dtoc -t +PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test ./tools/dtoc/dtoc -t # This needs you to set up Python test coverage tools. # To enable Python test coverage on Debian-type distributions (e.g. Ubuntu): # $ sudo apt-get install python-pip python-pytest # $ sudo pip install coverage -PYTHONPATH=build-sandbox_spl/scripts/dtc/pylibfdt run_test \ +PYTHONPATH=${DTC_DIR}/pylibfdt DTC=${DTC_DIR}/dtc run_test \ ./tools/binman/binman -T if [ $result == 0 ]; then