From 5b85c5d0ffdbf3a24a4e6d63543593fbba06b5e0 Mon Sep 17 00:00:00 2001 From: Wade Fife Date: Wed, 6 Mar 2024 15:54:31 -0600 Subject: rfnoc: image builder: Add option to build IP only --- host/python/uhd/imgbuilder/image_builder.py | 4 ++++ host/utils/rfnoc_image_builder.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/host/python/uhd/imgbuilder/image_builder.py b/host/python/uhd/imgbuilder/image_builder.py index 9a743296e..7b19dabe2 100644 --- a/host/python/uhd/imgbuilder/image_builder.py +++ b/host/python/uhd/imgbuilder/image_builder.py @@ -957,6 +957,7 @@ def build(fpga_path, device, image_core_path, edge_file, **args): clean_all: passed to Makefile GUI: passed to Makefile save_project: passed to Makefile + ip_only: passed to Makefile 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 @@ -993,6 +994,8 @@ def build(fpga_path, device, image_core_path, edge_file, **args): make_cmd = make_cmd + " GUI=1" if "save_project" in args and args["save_project"]: make_cmd = make_cmd + " PROJECT=1" + if "ip_only" in args and args["ip_only"]: + make_cmd = make_cmd + " IP_ONLY=1" if args.get('generate_only'): logging.info("Skip build (generate only option given)") @@ -1101,6 +1104,7 @@ def build_image(config, fpga_path, config_path, device, **args): clean_all: passed to Makefile GUI: passed to Makefile save_project: passed to Makefile + ip_only: passed to Makefile include_paths: Paths to additional blocks :return: Exit result of build process or 0 if generate-only is given. """ diff --git a/host/utils/rfnoc_image_builder.py b/host/utils/rfnoc_image_builder.py index 09a26aeb7..cf9e34696 100755 --- a/host/utils/rfnoc_image_builder.py +++ b/host/utils/rfnoc_image_builder.py @@ -100,6 +100,10 @@ def setup_parser(): "-s", "--save-project", help="Save Vivado project to disk", action="store_true") + parser.add_argument( + "-P", "--ip-only", + help="Build only the required IPs", + action="store_true") parser.add_argument( "-c", "--clean-all", help="Cleans the IP before a new build", @@ -231,6 +235,7 @@ def main(): clean_all=args.clean_all, GUI=args.GUI, save_project=args.save_project, + ip_only=args.ip_only, source=source, source_hash=source_hash.hexdigest(), output_path=args.image_core_output, -- cgit v1.2.3-59-g8ed1b