summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-10 03:39:30 +0300
committerSimon Glass <sjg@chromium.org>2020-07-20 20:37:47 +0300
commitce774e94de7009be0039ee02ca75f93d33a285a9 (patch)
treece45ea20766b6b6ef503db8d99a4d7d3929af9cb
parent92dee5fcc53186eb06a22c347ad8323618ca683b (diff)
downloadu-boot-ce774e94de7009be0039ee02ca75f93d33a285a9.tar.xz
binman: Set a default toolpath
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 <sjg@chromium.org>
-rwxr-xr-xtools/binman/main.py5
1 files changed, 5 insertions, 0 deletions
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)