aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-02-22 15:27:51 -0800
committerMartin Braun <martin.braun@ettus.com>2018-03-05 13:53:17 -0800
commit988b6ecab417dc8e5ac225e112b33c2b2f6193ad (patch)
tree82c895bec7bdb5039c108f70c36ce81f3264ab2b /host/utils
parentb553be8e07b99fca73d32546ea13f92d84cc47e3 (diff)
downloaduhd-988b6ecab417dc8e5ac225e112b33c2b2f6193ad.tar.gz
uhd-988b6ecab417dc8e5ac225e112b33c2b2f6193ad.tar.bz2
uhd-988b6ecab417dc8e5ac225e112b33c2b2f6193ad.zip
utils: Removed deprecated utilities
This removes all the tools that have been declared deprecated for a while. No functionality is removed, all utilities have a separate equivalent, e.g., with uhd_image_loader.
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/CMakeLists.txt33
-rw-r--r--host/utils/octoclock_firmware_burner.cpp51
-rwxr-xr-xhost/utils/usrp_n2xx_net_burner.py87
-rw-r--r--host/utils/usrp_n2xx_simple_net_burner.cpp93
-rw-r--r--host/utils/usrp_x3xx_fpga_burner.cpp99
5 files changed, 1 insertions, 362 deletions
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index 5f8309587..769314f33 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -2,7 +2,7 @@
# Copyright 2010-2015 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
#
-# SPDX-License-Identifier: GPL-3.0
+# SPDX-License-Identifier: GPL-3.0-or-later
#
########################################################################
@@ -16,12 +16,6 @@ SET(util_runtime_sources
uhd_cal_rx_iq_balance.cpp
uhd_cal_tx_dc_offset.cpp
uhd_cal_tx_iq_balance.cpp
- usrp_n2xx_simple_net_burner.cpp
-)
-
-SET(x3xx_burner_sources
- usrp_x3xx_fpga_burner.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../lib/usrp/x300/cdecode.c
)
find_package(UDev)
@@ -39,13 +33,6 @@ FOREACH(util_source ${util_runtime_sources})
UHD_INSTALL(TARGETS ${util_name} RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
ENDFOREACH(util_source)
-IF(ENABLE_X300)
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp/x300)
- ADD_EXECUTABLE(usrp_x3xx_fpga_burner ${x3xx_burner_sources})
- TARGET_LINK_LIBRARIES(usrp_x3xx_fpga_burner uhd ${Boost_LIBRARIES})
- UHD_INSTALL(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
-ENDIF(ENABLE_X300)
-
########################################################################
# Utilities that get installed into the share path
########################################################################
@@ -79,16 +66,6 @@ IF(ENABLE_OCTOCLOCK)
LIST(APPEND util_share_sources
octoclock_burn_eeprom.cpp
)
-
- SET(octoclock_burner_sources
- octoclock_firmware_burner.cpp
- ${CMAKE_SOURCE_DIR}/lib/utils/ihex.cpp
- )
-
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp_clock/octoclock)
- ADD_EXECUTABLE(octoclock_firmware_burner ${octoclock_burner_sources})
- TARGET_LINK_LIBRARIES(octoclock_firmware_burner uhd ${Boost_LIBRARIES})
- UHD_INSTALL(TARGETS octoclock_firmware_burner RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT utilities)
ENDIF(ENABLE_OCTOCLOCK)
IF(LINUX AND ENABLE_USB)
@@ -114,13 +91,6 @@ FOREACH(util_source ${util_share_sources_py})
)
ENDFOREACH(util_source)
-IF(ENABLE_USRP2)
- UHD_INSTALL(TARGETS usrp_n2xx_simple_net_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
-ENDIF(ENABLE_USRP2)
-IF(ENABLE_X300)
- UHD_INSTALL(TARGETS usrp_x3xx_fpga_burner RUNTIME DESTINATION ${PKG_LIB_DIR}/utils COMPONENT utilities)
-ENDIF(ENABLE_X300)
-
#UHD images downloader configuration
FILE(READ ${CMAKE_CURRENT_SOURCE_DIR}/../../images/manifest.txt CMAKE_MANIFEST_CONTENTS)
CONFIGURE_FILE(
@@ -155,7 +125,6 @@ ENDIF(NOT HAVE_PYTHON_MODULE_REQUESTS)
IF(ENABLE_USRP2)
SET(burners
usrp2_card_burner.py
- usrp_n2xx_net_burner.py
)
IF(WIN32 AND UHD_RELEASE_MODE) #include dd.exe
diff --git a/host/utils/octoclock_firmware_burner.cpp b/host/utils/octoclock_firmware_burner.cpp
deleted file mode 100644
index da84daac0..000000000
--- a/host/utils/octoclock_firmware_burner.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// Copyright 2014-2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#include <boost/program_options.hpp>
-#include <boost/format.hpp>
-#include <iostream>
-
-namespace po = boost::program_options;
-
-void print_image_loader_warning(const std::string &fw_path, const po::variables_map &vm){
- // Newline + indent
- #ifdef UHD_PLATFORM_WIN32
- const std::string nl = " ^\n ";
- #else
- const std::string nl = " \\\n ";
- #endif
-
- std::string uhd_image_loader = str(boost::format("uhd_image_loader --args=\"type=octoclock,addr=%s\""
- "%s --fw-path=%s")
- % vm["addr"].as<std::string>() % nl % fw_path);
- std::cout << "************************************************************************************************" << std::endl
- << "ERROR: This utility has been removed in this version of UHD. Use this command:" << std::endl
- << std::endl
- << uhd_image_loader << std::endl
- << std::endl
- << "************************************************************************************************" << std::endl
- << std::endl;
-}
-
-int main(int argc, const char *argv[])
-{
- std::string ip_addr, firmware_path;
- po::options_description desc("Allowed options");
- desc.add_options()
- ("help", "Display this help message.")
- ("addr", po::value<std::string>(&ip_addr)->default_value("addr=1.2.3.4"), "Specify an IP address.")
- ("fw-path", po::value<std::string>(&firmware_path)->default_value("path/to/firmware"), "Specify a custom firmware path.")
- ("list", "List all available OctoClock devices.")
- ;
- po::variables_map vm;
- po::store(po::parse_command_line(argc, argv, desc), vm);
- po::notify(vm);
-
- print_image_loader_warning(firmware_path, vm);
-
- return EXIT_FAILURE;
-}
diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py
deleted file mode 100755
index a291f6d60..000000000
--- a/host/utils/usrp_n2xx_net_burner.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2010-2011,2015 Ettus Research LLC
-# Copyright 2018 Ettus Research, a National Instruments Company
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-
-import optparse
-import math
-import os
-import re
-import struct
-import socket
-import sys
-import time
-import platform
-import subprocess
-
-def print_image_loader_warning(fw, fpga, reset, safe, addr):
- # Newline + indent
- if platform.system() == "Windows":
- nl = " ^\n "
- else:
- nl = " \\\n "
-
- # Generate uhd_image_loader command based on given arguments
- uhd_image_loader = "uhd_image_loader --args=\"type=usrp2,addr={0}".format(addr)
- if reset:
- uhd_image_loader += ",reset"
- if safe:
- uhd_image_loader += ",overwrite-safe"
- uhd_image_loader += "\""
-
- if fw:
- uhd_image_loader += "{0}--fw-path=\"{1}\"".format(nl, fw)
- else:
- uhd_image_loader += "{0}--no-fw".format(nl)
-
- if fpga:
- uhd_image_loader += "{0}--fpga-path=\"{1}\"".format(nl, fpga)
- else:
- uhd_image_loader += "{0}--no-fpga".format(nl)
-
- print("")
- print("************************************************************************************************")
- print("ERROR: This utility has been removed in this version of UHD. Use this command:")
- print("")
- print(uhd_image_loader)
- print("")
- print("************************************************************************************************")
- print("")
-
-########################################################################
-# Burner class, holds a socket and send/recv routines
-########################################################################
-class burner_socket(object):
- def __init__(self, addr):
- self._addr = addr
-
- def burn_fw(self, fw, fpga, reset, safe, check_rev=True):
- " Just a dummy lol "
- print_image_loader_warning(fw, fpga, reset, safe, self._addr)
-
-########################################################################
-# command line options
-########################################################################
-def get_options():
- parser = optparse.OptionParser()
- parser.add_option("--addr", type="string", help="USRP-N2XX device address", default='')
- parser.add_option("--fw", type="string", help="firmware image path (optional)", default='')
- parser.add_option("--fpga", type="string", help="fpga image path (optional)", default='')
- parser.add_option("--reset", action="store_true", help="reset the device after writing", default=False)
- parser.add_option("--read", action="store_true", help="read to file instead of write from file", default=False)
- parser.add_option("--overwrite-safe", action="store_true", help="never ever use this option", default=False)
- parser.add_option("--dont-check-rev", action="store_true", help="disable revision checks", default=False)
- parser.add_option("--list", action="store_true", help="list possible network devices", default=False)
- (options, args) = parser.parse_args()
-
- return options
-
-########################################################################
-# main
-########################################################################
-if __name__=='__main__':
- options = get_options()
- burner_socket(options.addr).burn_fw(fw=options.fw, fpga=options.fpga, reset=options.reset, safe=options.overwrite_safe, check_rev=not options.dont_check_rev)
diff --git a/host/utils/usrp_n2xx_simple_net_burner.cpp b/host/utils/usrp_n2xx_simple_net_burner.cpp
deleted file mode 100644
index 3d018091f..000000000
--- a/host/utils/usrp_n2xx_simple_net_burner.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// Copyright 2012-2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#include <boost/program_options.hpp>
-#include <boost/format.hpp>
-#include <iostream>
-
-namespace po = boost::program_options;
-
-/***********************************************************************
- * Find USRP N2XX with specified IP address and return type
- **********************************************************************/
-void print_image_loader_warning(const std::string &fw_path,
- const std::string &fpga_path,
- const po::variables_map &vm){
-
- // Newline + indent
- #ifdef UHD_PLATFORM_WIN32
- const std::string nl = " ^\n ";
- #else
- const std::string nl = " \\\n ";
- #endif
-
- std::string uhd_image_loader = str(boost::format("uhd_image_loader --args=\"type=usrp2,addr=%s")
- % vm["addr"].as<std::string>());
- if(vm.count("auto-reboot") > 0)
- uhd_image_loader += ",reset";
- if(vm.count("overwrite-safe") > 0)
- uhd_image_loader += ",overwrite-safe";
- if(vm.count("dont-check-rev") > 0)
- uhd_image_loader += ",dont-check-rev";
-
- uhd_image_loader += "\"";
-
- if(vm.count("no-fw") == 0){
- uhd_image_loader += str(boost::format("%s--fw-path=\"%s\"")
- % nl % fw_path);
- }
- else{
- uhd_image_loader += str(boost::format("%s--no-fw")
- % nl);
- }
-
- if(vm.count("no-fpga") == 0){
- uhd_image_loader += str(boost::format("%s--fpga-path=\"%s\"")
- % nl % fpga_path);
- }
- else{
- uhd_image_loader += str(boost::format("%s--no-fpga")
- % nl);
- }
-
- std::cout << "************************************************************************************************" << std::endl
- << "ERROR: This utility has been removed in this version of UHD. Use this command:" << std::endl
- << std::endl
- << uhd_image_loader << std::endl
- << std::endl
- << "************************************************************************************************" << std::endl
- << std::endl;
-}
-
-int main(int argc, char *argv[])
-{
- //Establish user options
- std::string fw_path;
- std::string ip_addr;
- std::string fpga_path;
-
- po::options_description desc("Allowed options:");
- desc.add_options()
- ("help", "Display this help message.")
- ("addr", po::value<std::string>(&ip_addr)->default_value("192.168.10.2"), "Specify an IP address.")
- ("fw", po::value<std::string>(&fw_path), "Specify a filepath for a custom firmware image.")
- ("fpga", po::value<std::string>(&fpga_path), "Specify a filepath for a custom FPGA image.")
- ("no-fw", "Do not burn a firmware image.")
- ("no-fpga", "Do not burn an FPGA image.")
- ("overwrite-safe", "Overwrite safe images (not recommended).")
- ("dont-check-rev", "Don't verify images are for correct model before burning.")
- ("auto-reboot", "Automatically reboot N2XX without prompting.")
- ("list", "List available N2XX USRP devices.")
- ;
- po::variables_map vm;
- po::store(po::parse_command_line(argc, argv, desc), vm);
- po::notify(vm);
-
- print_image_loader_warning(fw_path, fpga_path, vm);
-
- return EXIT_FAILURE;
-}
diff --git a/host/utils/usrp_x3xx_fpga_burner.cpp b/host/utils/usrp_x3xx_fpga_burner.cpp
deleted file mode 100644
index 98e6113d5..000000000
--- a/host/utils/usrp_x3xx_fpga_burner.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// Copyright 2013-2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#include <iostream>
-#include <boost/program_options.hpp>
-#include <boost/format.hpp>
-
-namespace po = boost::program_options;
-
-void print_image_loader_warning(const std::string &fpga_path, const po::variables_map &vm)
-{
- // Newline + indent
- #ifdef UHD_PLATFORM_WIN32
- const std::string nl = " ^\n ";
- #else
- const std::string nl = " \\\n ";
- #endif
-
- // Generate equivalent uhd_image_loader command
- std::string uhd_image_loader = "uhd_image_loader --args=\"type=x300";
-
- if(vm.count("addr") > 0){
- uhd_image_loader += str(boost::format(",addr=%s")
- % vm["addr"].as<std::string>());
- if(vm.count("configure") > 0){
- uhd_image_loader += ",configure";
- }
- if(vm.count("verify") > 0){
- uhd_image_loader += ",verify";
- }
- }
- else{
- uhd_image_loader += str(boost::format(",resource=%s")
- % vm["resource"].as<std::string>());
-
- /*
- * Since we have a default value, vm.count("rpc-port") will
- * always be > 0, so only add the option if a different port
- * is given.
- */
- if(vm["rpc-port"].as<std::string>() != "5444"){
- uhd_image_loader += str(boost::format(",rpc-port=%s")
- % vm["rpc-port"].as<std::string>());
- }
- }
-
- if(vm.count("type") > 0){
- uhd_image_loader += str(boost::format(",fpga=%s")
- % vm["type"].as<std::string>());
- }
-
- uhd_image_loader += "\"";
-
- /*
- * The --type option overrides any given path, so only add an FPGA path
- * if there was no --type argument.
- */
- if(vm.count("type") == 0){
- uhd_image_loader += str(boost::format("%s--fpga-path=\"%s\"")
- % nl % fpga_path);
- }
-
- std::cout << "************************************************************************************************" << std::endl
- << "ERROR: This utility has been removed in this version of UHD. Use this command:" << std::endl
- << std::endl
- << uhd_image_loader << std::endl
- << std::endl
- << "************************************************************************************************" << std::endl
- << std::endl;
-}
-
-int main(int argc, char *argv[]){
- std::string ip_addr, resource, fpga_path, image_type, rpc_port;
-
- po::options_description desc("Allowed options");
- desc.add_options()
- ("help", "Display this help message.")
- ("addr", po::value<std::string>(&ip_addr)->default_value("1.2.3.4"), "Specify an IP address.")
- ("resource", po::value<std::string>(&resource), "Specify an NI-RIO resource.")
- ("rpc-port", po::value<std::string>(&rpc_port)->default_value("5444"), "Specify a port to communicate with the RPC server.")
- ("type", po::value<std::string>(&image_type)->default_value("HG"), "Specify an image type (1G, HG, XG), leave blank for current type.")
- ("fpga-path", po::value<std::string>(&fpga_path)->default_value("/path/to/fpga-image.bit"), "Specify an FPGA path (overrides --type option).")
- ("configure", "Initialize FPGA with image currently burned to flash (Ethernet only).")
- ("verify", "Verify data downloaded to flash (Ethernet only, download will take much longer)")
- ("list", "List all available X3x0 devices.")
- ;
- po::variables_map vm;
- po::store(po::parse_command_line(argc, argv, desc), vm);
- po::notify(vm);
-
- print_image_loader_warning(fpga_path, vm);
-
- return EXIT_FAILURE;
-}
-