
Dear Ladislav,
in message 20040826205439.GA2670@umax645sx you wrote:
I'm getting clueless now. You don't like new command approach and you also don't like setenv ethaddr approach. I think there are people, who are solving similar problem. If there is no way to add this feature into official U-Boot, just say it directly and I'm fine with keeping patches localy.
I'm not against this feature, I just see no sense in adding a new command. Either you can script this using existing "i2c" or "eeprom" or "mm" commands, or you can use a separate standalone application as done for the 82559 and eepro100 cards.
- MAC adress lives in EEPROM connected to SMC ethernet chip. This address comes from purchased range.
OK, then there is no need to change it, right?
- User is able to change it in enviroment, but is unable to save it together with other enviroment variables and he is also unable to store it into serial EEPROM. Think about MAC as a board id.
If I was to configure such a system, the user is NOT able to change the MAC address.
If you allow to overwrite the "ethaddr" variable this of course gets saved together with the other enviroment variables.
If you want to allow the user to modify the hardware ID (in the SROM), then provide a separate tool for it.
And yes, I do think about the MAC as a board ID. This is why I recommend to make it NOT changable by the user.
It is posible that board dies (it is hit by flash, etc). In that case servician comes to replace it and stores the MAC used by dead board to new one, not breaking customers setup and to save MAC addresses from purchased range.
This is NEW board, so it has a new board ID - obviously. Sorry, but I feel this is a constructed example, and not a real problem. You can be lucky that U-Boot provides the flexibility to do such things, but this is not a free ticket for misuing it. Just assume the bootloader does not allow changing the MAC address. This is actually the case with _most_ boot loaders.
Best regards,
Wolfgang Denk