Commit f8a6afef authored by Matthieu Cattin's avatar Matthieu Cattin

test23: Erase eeprom before writing the new content.

parent 052d64d9
......@@ -106,6 +106,7 @@ def main (default_directory='.'):
calibr_data.append(0xFF & int(line, 16))
calibr_data.append(0xFF & (int(line, 16) >> 8))
f_calibr.close()
#print "Raw calibration data:"
#for data in calibr_data:
# print "0x%02X" % (data)
......@@ -143,7 +144,7 @@ def main (default_directory='.'):
eeprom_data = open(EEPROM_BIN_FILENAME, "rb").read()
mfg_date = ipmi_get_mfg_date(eeprom_data)
# No manufacturiing date present in EEPROM, put the current date
# No manufacturing date present in EEPROM, put the current date
if(mfg_date == 0):
print "No manufacturing date found in the EEPROM, taking current date: %d" % current_date
mfg_date = current_date
......@@ -203,9 +204,9 @@ def main (default_directory='.'):
byte = f_ipmi.read(1) # reads one byte
f_ipmi.close()
#print "Raw EEPROM data:"
#for data in ipmi_data:
# print "0x%02X" % (data)
#print "Raw IPMI data:"
#for add, data in enumerate(ipmi_data):
# print "0x%02X(%3d): 0x%02X" % (add, add, data)
#==================================================
# Generate eeprom image with gensdbfs
......@@ -221,6 +222,12 @@ def main (default_directory='.'):
byte = f_bin_eeprom.read(1) # reads one byte
f_bin_eeprom.close()
#==================================================
# Erase EEPROM content
print "Erase EEPROM content.\n"
eeprom_data = [0x0] * EEPROM_SIZE
fmc.sys_i2c_eeprom_write(eeprom_data)
#==================================================
# Write content to EEPROM via I2C
print "Write EEPROM content.\n"
......
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