From 4b0c097cfa67560116ea5380b42c12c89d4d3d8f Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 15 Jun 2011 17:49:08 -0700 Subject: fw_updater: add support for fictitious "rev 2" N2XX --- host/utils/usrp_n2xx_net_burner.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'host/utils') 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 -- cgit v1.2.3