From c69d19c8f829d3320db5224f9f28d13cfb16049e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 6 Jul 2021 10:36:37 -0600 Subject: 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 (fixed to use a separate test file to fix flakiness) --- tools/binman/control.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/binman/control.py') 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, -- cgit v1.2.3