diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2017-11-10 17:34:24 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:43 -0800 |
commit | a2029b0439e6474b25c189c3f1741caac8006c11 (patch) | |
tree | 1f4e558f714b6ee3bf9f08528ecd387e45dbc065 /mpm/python/usrp_mpm/periph_manager/n310.py | |
parent | 61774a09613eed51a42496f8689b707417b360f2 (diff) | |
download | uhd-a2029b0439e6474b25c189c3f1741caac8006c11.tar.gz uhd-a2029b0439e6474b25c189c3f1741caac8006c11.tar.bz2 uhd-a2029b0439e6474b25c189c3f1741caac8006c11.zip |
fpga load: Atomic updating of multiple components
- The MPM function update_component now accepts multiple components to
be updated in one RPC call.
- Updated the property tree and image loader to match this change.
- Also added DTS loading to the image loader.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/n310.py')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n310.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py index 84ab3ae7e..1dab1b572 100644 --- a/mpm/python/usrp_mpm/periph_manager/n310.py +++ b/mpm/python/usrp_mpm/periph_manager/n310.py @@ -472,11 +472,15 @@ class n310(PeriphManagerBase): # dboard, etc. The host is responsible for providing a compatible image # for the N310's current setup. binfile_path = '/lib/firmware/n310.bin' + dts_path = '/lib/firmware/n310.dts' # Override the list of updateable components updateable_components = { 'fpga': { 'callback': "update_fpga", }, + 'dts': { + 'callback': "update_dts", + }, } def __init__(self, args): @@ -913,3 +917,16 @@ class n310(PeriphManagerBase): raise RuntimeError("Invalid N310 FPGA bitfile") # TODO: Implement reload procedure return True + + @no_rpc + def update_dts(self, filepath, metadata): + """ + Update the DTS image in the filesystem + :param filepath: path to new DTS image + :param metadata: Dictionary of strings containing metadata + """ + self.log.trace("Updating DTS with image at {}" + .format(filepath)) + shutil.copy(filepath, self.dts_path) + # TODO: Compile the new dts file into a usable dtbo + return True |