aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-06 10:36:37 -0600
committerSimon Glass <sjg@chromium.org>2021-07-21 10:27:35 -0600
commitc69d19c8f829d3320db5224f9f28d13cfb16049e (patch)
treec13527b8a6aecf176f48ee6c0f8f657bb4dd303a /tools/binman/control.py
parent650ead1a4aac3010a029526d639682096c1d0469 (diff)
binman: Support multithreading for building images
Some images may take a while to build, e.g. if they are large and use slow compression. Support compiling sections in parallel to speed things up. Signed-off-by: Simon Glass <sjg@chromium.org> (fixed to use a separate test file to fix flakiness)
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index f57e34daaa..b2113b6e64 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -628,9 +628,13 @@ def Binman(args):
tools.PrepareOutputDir(args.outdir, args.preserve)
tools.SetToolPaths(args.toolpath)
state.SetEntryArgs(args.entry_arg)
+ state.SetThreads(args.threads)
images = PrepareImagesAndDtbs(dtb_fname, args.image,
args.update_fdt, use_expanded)
+ if args.test_section_timeout:
+ # Set the first image to timeout, used in testThreadTimeout()
+ images[list(images.keys())[0]].test_section_timeout = True
missing = False
for image in images.values():
missing |= ProcessImage(image, args.update_fdt, args.map,