Commit 2886afb2 authored by Denia Bouhired-Ferrag's avatar Denia Bouhired-Ferrag

Removes version numbers from code. adds board name to log file name

parent 0f6d213f
......@@ -82,8 +82,8 @@ CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS = 22
# Target version
gwvers_target = 4.1
gwvers_gold_target = 0.3
gwvers_target = 0.0 # Add release version here Eg: gwvers_target = 1.0
gwvers_gold_target = 0.0 # Add golden version here Eg: gwvers_gold_target = 0.2
##-------------------------------------------------------------------------------------------------
## Method to check hardware and gateware version
......
......@@ -84,8 +84,8 @@ CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS = 22
# Target version
gwvers_target = 4.1
gwvers_gold_target = 0.3
gwvers_target = 0.0 # Add release version here Eg: gwvers_target = 1.0
gwvers_gold_target = 0.0 # Add golden version here Eg: gwvers_gold_target = 0.2
#gateware to write
#gw_file="golden-v"+str(gwvers_gold_target)+".bin"
......@@ -141,11 +141,6 @@ if __name__ == "__main__":
gw_path="./gw-blo/"
elif (bid == "T485"):
gw_path="./gw-rs485/"
# if (gwvers == 0xff):
# baseaddr = 0x300
# elif ((gwvers >= 0x10) and (gwvers <= 0x22)) or \
# (((gwvers & 0xf0) == 0x00) and (gwvers < 0x02)):
# baseaddr = 0x040
if upgrade==True:
print("Upgrade file is %s \n" % gw_path+gw_file)
mb = XilMultiboot(ELMA_I2C_MULTIBOOT, elma, slot, baseaddr, "")
......@@ -156,11 +151,6 @@ if __name__ == "__main__":
mb.iprog(multiboot_addr)
# Turn off the VME crate
#ret = subprocess.call("snmpset -v2c -c "+ pwd +" "+ ip +" 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 1", shell=True, stdout=None, stderr=None)
# Turn on the VME crate
#ret = subprocess.call("snmpset -v2c -c "+ pwd +" "+ ip +" 1.3.6.1.4.1.37968.1.1.7.2.1.3.1 i 0", shell=True, stdout=None, stderr=None)
time.sleep(10)
(hwvers_new, gwvers_new) = gw_hw_version()
......@@ -190,7 +180,7 @@ if __name__ == "__main__":
#Generate log file
# Generate output file named according to current time
fname = time.strftime("remote-gw-upgrade-%Y-%m-%d", time.localtime()) + ".txt"
fname = time.strftime("remote-gwupgrade-%s-%Y-%m-%d", bid, time.localtime()) + ".txt"
ret = subprocess.call(["ls ./log | grep " + fname], shell=True, stdout=None, stderr=None)
print ("%d" % ret)
if (ret != 0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment