From patchwork Fri Jul 10 00:39:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 241172 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Thu, 9 Jul 2020 18:39:30 -0600 Subject: [PATCH v3 07/49] binman: Set a default toolpath In-Reply-To: <20200710004012.3016230-1-sjg@chromium.org> References: <20200710004012.3016230-1-sjg@chromium.org> Message-ID: <20200709183948.v3.7.Ia130d5b79b8e1ffb3caac27ef303a88c8d5d1723@changeid> When binman is run from 'make check' it is given a toolpath so that the latest tools (e.g. mkimage) are used. When run manually with no toolpath, it relies on the system mkimage. But this may be missing or old. Make some effort to find the built-from-soruce version by looking in the current directory and in the builds created by 'make check'. Signed-off-by: Simon Glass --- Changes in v3: - Set a default toolpath for ease of use tools/binman/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/binman/main.py b/tools/binman/main.py index a5793d5d23..e543a7d06a 100755 --- a/tools/binman/main.py +++ b/tools/binman/main.py @@ -113,6 +113,11 @@ def RunBinman(args): if not args.debug: sys.tracebacklimit = 0 + # Provide a default toolpath in the hope of finding a mkimage built from + # current source + if not args.toolpath: + args.toolpath = ['./tools', 'build-sandbox/tools'] + if args.cmd == 'test': if args.test_coverage: RunTestCoverage(args.toolpath)