summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2011-06-15 17:49:08 -0700
committerNick Foster <nick@ettus.com>2011-06-15 17:49:08 -0700
commit4b0c097cfa67560116ea5380b42c12c89d4d3d8f (patch)
treefa28a5ba49b2397217c85faa58361effd8711966
parent79079a342f98906fb897f66c9b32fe1a6bed0fb8 (diff)
downloaduhd-4b0c097cfa67560116ea5380b42c12c89d4d3d8f.tar.gz
uhd-4b0c097cfa67560116ea5380b42c12c89d4d3d8f.tar.bz2
uhd-4b0c097cfa67560116ea5380b42c12c89d4d3d8f.zip
fw_updater: add support for fictitious "rev 2" N2XX
-rwxr-xr-xhost/utils/usrp_n2xx_net_burner.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py
index 6be632735..1fe62671c 100755
--- a/host/utils/usrp_n2xx_net_burner.py
+++ b/host/utils/usrp_n2xx_net_burner.py
@@ -55,10 +55,10 @@ FLASH_IP_FMT = '!LLLL260x'
FLASH_HW_REV_FMT = '!LLLL260x'
n2xx_revs = {
- 0x0a00: "n200_r3",
- 0x0a01: "n200_r4",
- 0x0a01: "n210_r3",
- 0x0a11: "n210_r4"
+ 0x0a00: ["n200_r3", "n200_r2"],
+ 0x0a10: ["n200_r4"],
+ 0x0a01: ["n210_r3", "n210_r2"],
+ 0x0a11: ["n210_r4"]
}
class update_id_t:
@@ -179,13 +179,13 @@ class burner_socket(object):
(flash_size, sector_size) = self.get_flash_info()
hw_rev = self.get_hw_rev()
- if(hw_rev != 0): print "Hardware type: %s" % n2xx_revs[hw_rev]
+ if(hw_rev != 0): print "Hardware type: %s" % n2xx_revs[hw_rev][0]
print "Flash size: %i\nSector size: %i\n" % (flash_size, sector_size)
if fpga:
#validate fpga image name against hardware rev
- if(n2xx_revs[hw_rev] not in fpga and hw_rev != 0):
- raise Exception("Error: incorrect FPGA image version. Please use the correct image for device %s" % n2xx_revs[hw_rev])
+ if(hw_rev != 0 and not any(name in fpga for name in n2xx_revs[hw_rev])):
+ raise Exception("Error: incorrect FPGA image version. Please use the correct image for device %s" % n2xx_revs[hw_rev][0])
if safe: image_location = SAFE_FPGA_IMAGE_LOCATION_ADDR
else: image_location = PROD_FPGA_IMAGE_LOCATION_ADDR