diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-10-22 14:49:05 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | 2a7e69d862f661075b98bab19e58d958c28a9af8 (patch) | |
tree | f0e5c7733ca330f85fd567be82244d2a1efab501 /host/utils/rfnoc | |
parent | 1cd874911db0d4c0463264edd0d46067d072eccb (diff) | |
download | uhd-2a7e69d862f661075b98bab19e58d958c28a9af8.tar.gz uhd-2a7e69d862f661075b98bab19e58d958c28a9af8.tar.bz2 uhd-2a7e69d862f661075b98bab19e58d958c28a9af8.zip |
rfnoc: image_builder: Fix -I, allow devices/targets to bet set in YAML
- The -I switch now allows pointing to an OOT
- The image core file may now contain keys 'device' and
'default_target', which the image builder can use as default values.
Command line switches --device and --target are still honoured.
Diffstat (limited to 'host/utils/rfnoc')
-rwxr-xr-x | host/utils/rfnoc/image_builder.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/utils/rfnoc/image_builder.py b/host/utils/rfnoc/image_builder.py index 92d8a909d..965b2d454 100755 --- a/host/utils/rfnoc/image_builder.py +++ b/host/utils/rfnoc/image_builder.py @@ -461,16 +461,15 @@ def convert_to_image_config(grc, grc_config_path): return result -def collect_module_paths(config_path): +def collect_module_paths(config_path, include_paths): """ - Create a list of directorties that contain noc block configuration files. + Create a list of directories that contain noc block configuration files. :param config_path: root path holding configuration files :return: list of noc block directories """ # rfnoc blocks - result = [os.path.join(config_path, 'rfnoc', 'blocks')] - # additional OOT blocks - # TODO parse modules from external includes as well + result = [os.path.join(config_path, 'rfnoc', 'blocks')] + \ + [os.path.join(x, 'blocks') for x in include_paths] return result @@ -732,6 +731,7 @@ def build_image(config, fpga_path, config_path, device, **args): generate_only: Do not build the code after generation. clean_all: passed to Makefile GUI: passed to Makefile + include_paths: Paths to additional blocks :return: Exit result of build process or 0 if generate-only is given. """ logging.info("Selected device %s", device) @@ -749,7 +749,7 @@ def build_image(config, fpga_path, config_path, device, **args): device_conf = IOConfig(device_config(core_config_path, device), signatures_conf) - block_paths = collect_module_paths(config_path) + block_paths = collect_module_paths(config_path, args.get('include_paths')) logging.debug("Looking for block descriptors in:") for path in block_paths: logging.debug(" %s", os.path.normpath(path)) |