aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/uhd_images_downloader.py.in
Commit message (Collapse)AuthorAgeFilesLines
* utils: specify the downloader's Python executableBrent Stapleton2018-11-261-1/+1
| | | | | | | | | | Change the uhd_images_downloader's first line to execute with a runtime Python interpreter, as determined at UHD build time. Users can still use an arbitrary Python executable by calling `python uhd_images_downloader` This will fix our embedded products by ensuring that we call Python3 when running uhd_images_downloader in embedded mode.
* utils: uhd_images_downloader: Add --http-proxy optionMartin Braun2018-11-161-2/+11
| | | | | | | | | | | | This lets the user specify a HTTP proxy. The environment variable HTTP_PROXY is still usable, but --http-proxy will override it. Example: $ uhd_images_downloader \ --http-proxy http://user:pass@10.20.30.40:3128 \ -t x310 Here, the tool will download all the images matching 'x310' using a proxy at 10.20.30.40.
* utils: Fix downloader return value for main()Martin Braun2018-11-131-7/+11
| | | | | | This is effectively a refactoring: The main() function now returns True on success. This fixes a bug where one branch would simply return (None) instead of returning a value.
* utils: Downloader stall on error for Windows usersMartin Braun2018-11-131-2/+30
| | | | | | | | | If platform.system() is 'Windows', the Python script will stall on error before terminating, e.g., when an import is missing or when an unexpected Exception occurred during the execution. The rationale is that many Windows users run this script directly, without a shell, and wouldn't have a way to see error messages from the script in that case.
* utils: uhd_images_downloader: Remove archive typeMartin Braun2018-11-131-28/+22
| | | | | | | Since the uhd_images_downloader is so tightly integrated into our infrastructure, we've dropped support for .tar.gz and .tar.xz file for this particular purpose. Note that UHD releases still receive images in all three formats.
* utils: uhd_images_downloader: Refactor the toolMartin Braun2018-11-131-115/+153
| | | | | No functional changes. The main effort was to reduce the length of main() and reduce the number of Pylint warnings.
* utils: Allow downloader to ship non-zip filesMartin Braun2018-11-131-5/+13
| | | | | | Note: All archives shipped using this tool are zip files. However, this allows us to ship other types of files, which will be downloaded and sorted into the images directory as-is.
* utils: uhd_images_downloader: Add download limitMartin Braun2018-11-131-1/+25
| | | | | | | | | | | | | | This download limit prevents users from accidentally downloading really large files. The default limit is 100 MiB. When a file is selected for download that exceeds this size, the user is prompted if she really wants to download that file. By specifying --yes (or -y), this can can be bypassed. Example: $ uhd_images_downloader --yes -t sdimg Will match all files that match 'sdimg', which are typically larger than 100 MiB, without interaction.
* utils: uhd_images_downloader: Add --yes optionMartin Braun2018-11-131-0/+25
| | | | | | | | | This will answer 'yes' to all questions that are asked and allows to script the downloader. Example: $ uhd_images_downloader -t sdimg -y Any interaction that the script will have with the user will be skipped.
* utils: add downloader printing fetchable URLsMartin Braun2018-11-131-12/+24
| | | | | | | | | | | | | | Running $ uhd_images_downloader -l will now print the full URL of the target. By specifying $ uhd_images_downloader -l --url-only It will *only* print the URLs, nothing else, making this suitable for scripting. The list will always go to stdout, whereas the logging is going to stderr and thus can easily be siphoned off.
* utils: Make uhd_images_downloader log to stderrMartin Braun2018-11-131-2/+2
|
* uhd: utils: Add Zip test to downloaderBrent Stapleton2018-08-281-2/+15
| | | | | Users can supply the --test/-T option to test the downloaded archive before extracting it, using the Python zipfile.testzip() function.
* uhd: utils: Downloader logs no targets selectedBrent Stapleton2018-08-281-0/+5
| | | | | uhd_images_downloader: Adding INFO message when there is no target selected to download, as when the user misspells a target name.
* utils: fixup for downloader inventory managementBrent Stapleton2018-08-211-12/+19
| | | | | | | | uhd_images_downloader was mismanaging the image inventory- image packages entries were not being deleted when the images were overwritten. Now, each target is saved as a single entry in the inventory, which is overwritten when a new image package is downloaded.
* utils: downloader supports multiple RegExsBrent Stapleton2018-03-161-6/+9
| | | | | | | | | | | | uhd_images_downloader now accepts multiple '--types' options, each of which is a RegEx. Targets which match to all of the provided `types` are downloaded. Example usage: `uhd_images_downloader -t n3xx -t fpga` will match the following targets: - n3xx_n310_fpga_default - n3xx_n310_fpga_aurora - n3xx_n300_fpga_default
* utils: Adding option to skip SHA in downloaderBrent Stapleton2018-03-161-7/+12
| | | | | | Targets in the manifest with SHA256 values of '0' will not be verified. This will allow us to skip the verification for certain image packages (ie. the filesystem).
* utils: fixup for downloader SHA256 checkBrent Stapleton2018-03-161-2/+7
| | | | The image package is not unzipped or kept if the SHA256 checksum fails
* utils: Skip progress bars for non-tty outputsMartin Braun2018-03-011-1/+5
|
* utils: Reenable UHD_IMAGES_DIR env var for uhd_images_downloaderMartin Braun2018-03-011-3/+11
| | | | | | This was forgotten in the transition to the new downloader. The command line options --install-location will still override the env variable if it exists.
* utils: Increase verbosity on uhd_images_downloaderMartin Braun2018-03-011-6/+4
|
* uhd: Update license headersMartin Braun2018-02-191-1/+1
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* utils: images downloader: adding SHA256 supportBrent Stapleton2018-02-151-6/+15
| | | | | Adding SHA256 checking for downloaded image archives. The expected SHA is read from the manifest, and checked after the download completes.
* utils: images downloader: adding --keep supportBrent Stapleton2018-02-151-4/+6
| | | | | When users supply the --keep argument, image archives are saved in the images directory alongside the image files.
* utils: images downloader: default download printBrent Stapleton2018-02-071-3/+5
| | | | | | | | Adding a message at the INFO log level (the default) to tell users that downloads have begun. Also added the filename being downloaded to the progress bars. Reviewed-by: Martin Braun <martin.braun@ettus.com>
* utils: images downloader: adding dry run optionBrent Stapleton2018-02-031-17/+23
| | | | | | Command line argument --dry-run is now available. This runs through the downloader without actually downloading any files or editing the inventory file.
* utils: refactor uhd_images_downloaderBrent Stapleton2018-01-231-333/+324
| | | | | | | | | | | | | | | | | Changing structure of the files.ettus.com images directory, and updating uhd_images_downloader correspondingly. The images downloader now downloads a number of smaller archives of images, instead of one large archive containing all of our images. Furthermore, the images downloader maintains an inventory of currently installed images, so that images are not redownloaded unnecessarily. When called with no arguments, behavior should not change. CMake variables are used to populate a number of fields in the images downloader, including the contents of the manifest file. Reviewed-by: Martin Braun <martin.braun@ettus.com> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* utils: Added warnings and checks to images downloaderDerek Kozel2017-07-171-0/+14
|
* utils: use vt100 terminal codes in uhd_images_downloaderAndrej Rode2017-01-031-1/+5
|
* utils: Added pre-API change python request compatibilityMarcus Müller2015-10-191-1/+5
| | | | | | Affects the uhd_images_downloader utility. Older versions of requests didn't know the "stream" kwarg. Added a compatibility fallback.
* utils: Made uhd_images_downloader Python3-compatibleMartin Braun2015-07-151-84/+77
|
* imgs_downloader: Copy pkg to temp dir even if it is localAshish Chaudhari2015-03-181-3/+4
|
* utils: Minor fixes in images downloader and packaging scriptsAshish Chaudhari2014-10-271-0/+3
|
* Adding explicit positional arguments to .format strings for compatibility ↵Patrick Sisterhen2014-10-161-6/+6
| | | | with older Pythons
* utils: Small fix to uhd_images_downloader, less warningsMartin Braun2014-10-131-2/+1
|
* uhd: uhd_images_downloader now respects $UHD_IMAGES_BASE_URLMartin Braun2014-10-061-115/+126
|
* uhd: re-wrote uhd_images_downloader (OO, new options, hopefully much more ↵Balint Seeber2013-11-221-119/+316
| | | | robust and user-friendly)
* uhd_images_downloader: more descriptive error when MD5 check failsNicholas Corgan2013-11-191-0/+2
|
* uhd_images_downloader: redundancy fixes, better error handlingNicholas Corgan2013-11-131-12/+14
|
* uhd_images_downloader: more improvements/fixesNicholas Corgan2013-11-081-14/+24
| | | | | * Better error handling * Improved default download location logic
* uhd_images_downloader fixes/improvementsNicholas Corgan2013-11-041-4/+17
| | | | | * Permissions checking leads to clearer errors when user doesn't have write permissions * Relative paths work
* Made uhd_images_downloader more robust to match Debian's uhd_firmware_installerNicholas Corgan2013-05-031-23/+46
| | | | | * Uses custom User Agent * Compares md5sum of downloaded zip file to stored value
* utils: images downloader defaults to UHD_IMAGES_DIR instead of ↵Nicholas Corgan2012-11-161-1/+3
| | | | CMAKE_INSTALL_PREFIX
* utils: fixed Windows images downloader bugNicholas Corgan2012-11-101-53/+58
|
* utils: fixed images downloader Mac incompatibility issueNicholas Corgan2012-11-081-5/+13
|
* utils: minor uhd_images_downloader cleanupNicholas Corgan2012-08-141-2/+1
|
* utils: added .in extension to images downloader sourceJosh Blum2012-07-011-0/+95
There seems to be confusion that this file can be used w/o building. The images downloader has been renamed to prevent execution b4 configure.