What is the checksum algorithm for EEPROM (olinuxino lime)

Started by anverx, September 09, 2024, 05:02:40 PM

Previous topic - Next topic

anverx

We have accidentally overidden the contents of EEPROM on many of our Limes.  Now we are trying to restore them.  The critical field is the MAC and we have those written down (before we messed up the EEPROM).  We can take a image of EEPROM from a fresh  device, fill in correct MAC and write it back.  The new (old) MAC isn't taken into use most likely because the checksum fails. The document(https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-eeprom-contents/Olimex-A20-EEPROM-October-2019.pdf) doesn't mention anything about checksum computation.  We tried crc32 of the first 256 bytes, but that didn't seem to match.  So how do we generate a valid checksum and get our original MAC to take effect?

anverx

It is crc32 of the first 252 bytes. Once the CRC endianness is swapped and writen the right MAC is picked up.  Solved.