[U-Boot] [PATCH] fsl: board EEPROM has the CRC in the wrong location

Wolfgang Denk wd at denx.de
Fri Jul 13 06:30:25 CEST 2012


Dear York,

In message <9F5356FB-8CA2-44DE-9089-64ABD82CA733 at freescale.com> you wrote:
> 
> That patch itself is OK. But the comment is incorrect. We keep
> adding more mac addresses to this data structure. The CRC was at the
> end. The offset 0xCC was correct.

This is a totally broken design then, when you have a growing data
structure where vital information fields get shifted.  In such case,
the CRC should have been at the beginning, so it never changes
location. Or even better, you should not have used a binary data
structure at all (guess why the environment in U-Boot has been
implemented the way it is).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"May your future be limited only by your dreams."
- Christa McAuliffe


More information about the U-Boot mailing list