diff options
author | Wade Fife <wade.fife@ettus.com> | 2024-03-11 11:40:50 -0500 |
---|---|---|
committer | Wade Fife <wade.fife@ettus.com> | 2024-03-15 20:07:28 -0500 |
commit | 1981e2c5488439344d3bfb15d1e3d47c81061971 (patch) | |
tree | 31f8ce613f669f072785cdff020b8e62cd595cf1 /host | |
parent | rfnoc: image builder: Add option to build IP only (diff) | |
download | uhd-1981e2c5488439344d3bfb15d1e3d47c81061971.tar.xz uhd-1981e2c5488439344d3bfb15d1e3d47c81061971.zip |
rfnoc: image builder: Add make jobs option
Diffstat (limited to 'host')
-rw-r--r-- | host/python/uhd/imgbuilder/image_builder.py | 3 | ||||
-rwxr-xr-x | host/utils/rfnoc_image_builder.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/host/python/uhd/imgbuilder/image_builder.py b/host/python/uhd/imgbuilder/image_builder.py index 7b19dabe2..0646bbe6e 100644 --- a/host/python/uhd/imgbuilder/image_builder.py +++ b/host/python/uhd/imgbuilder/image_builder.py @@ -958,6 +958,7 @@ def build(fpga_path, device, image_core_path, edge_file, **args): GUI: passed to Makefile save_project: passed to Makefile ip_only: passed to Makefile + num_jobs: Number of make jobs to use source: The source of the build (YAML or GRC file path) include_paths: List of paths to OOT modules extra_makefile_srcs: An additional list of paths to modules @@ -990,6 +991,8 @@ def build(fpga_path, device, image_core_path, edge_file, **args): make_cmd += f" IMAGE_CORE={image_core_path} EDGE_FILE={edge_file}" if makefile_src_paths: make_cmd += " RFNOC_OOT_MAKEFILE_SRCS=" + "\\ ".join(makefile_src_paths) + if "num_jobs" in args and args["num_jobs"]: + make_cmd = make_cmd + " --jobs " + args["num_jobs"] if "GUI" in args and args["GUI"]: make_cmd = make_cmd + " GUI=1" if "save_project" in args and args["save_project"]: diff --git a/host/utils/rfnoc_image_builder.py b/host/utils/rfnoc_image_builder.py index cf9e34696..f834960ae 100755 --- a/host/utils/rfnoc_image_builder.py +++ b/host/utils/rfnoc_image_builder.py @@ -105,6 +105,11 @@ def setup_parser(): help="Build only the required IPs", action="store_true") parser.add_argument( + "-j", "--jobs", + help="Number of parallel jobs to use with make", + required=False, + default=None) + parser.add_argument( "-c", "--clean-all", help="Cleans the IP before a new build", action="store_true") @@ -236,6 +241,7 @@ def main(): GUI=args.GUI, save_project=args.save_project, ip_only=args.ip_only, + num_jobs=args.jobs, source=source, source_hash=source_hash.hexdigest(), output_path=args.image_core_output, |