diff options
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 |