[U-Boot-Users] ether mac auto override.

Wolfgang Denk wd at denx.de
Wed Jun 18 21:06:49 CEST 2003

In message <FD2AC9A020DDD51194710008C7089B20053D4C8E at dlee17.itg.ti.com> you wrote:
> Yes.  I've read that and inspected many of the drivers and I've yet to find
> one which implements the whole specification, especially as it relates to
> validating the mac address.  Is there a good example which you can point to?

See for example drivers/cs8900.c

> The 91c111 can run with our with out an eeprom.  Just because you have an
> eeprom there is no guarantee the mac is correct, just like there is nothing

If there is an EEPROM it has a checksum.

> which say the user inputted it correctly.  I recall working with some code

You cannot prevent against operator error.

> a couple of the drivers do is a checksum over the eeprom this gives you some
> confidence but its not a validation.

It is IMHO not a task for a boot loader to  validate  user  input  on
this level.

> Its sort of picky to worry about it at this level, but it would be nice to
> find something good.  I'll likely end up throwing in a simple check,

I may decide not to accept it because of inefficient memory footprint
vs. benefits ration.

> followed by setting the local address to what the env asked for or ... If
> none, what in the rom, if none, the default which is there already.

The code in drivers/cs8900.c is very simple  (and  small)  and  works
pretty well for me.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
This cultural mystique surrounding the  biological  function  --  you
realize humans are overly preoccupied with the subject.
	-- Kelinda the Kelvan, "By Any Other Name", stardate 4658.9

More information about the U-Boot mailing list