
In message 1190149063.4516.9.camel@aeglos.sweden.atmel.com you wrote:
It is a terrible bad idea to set the IP address and especially the MAC address of your board in the config file, as then all your boards will share the same address, which will cause only trouble.
DO NOT DO THIS!!!
Unless you use this functionality to simplify factory programming of the device.
It's still a very stupid thing to do, as you buy your own convenience at the cost of your customers - it's they who will have the problems, not you, obviously. And it's trivial to set up a production envrionment where each and every board has it's own specific serial number, MAC address atf. in the U-Boot environment.
Don't tell me it could not be done, or would be too complicated. It's all there, just use it.
By having a compile time setup of ethaddr/ipaddr/serverip, you can easily connect to a production PC using a twisted cable.
It is NOT necessary to do this at compile time.
If this "feature" is used, it must be possible to reconfigure the ethaddr/ipaddr combination to something unique. You do not want to ship this to end customers.
Then you have to make ethaddr and serial# unprotected, which IMHO is a bad idea either. I don't want to have users messing around with the serial number. If you intend for such a setup, you should at least use the CONFIG_OVERWRITE_ETHADDR_ONCE feature.
An autoscript at the production PC can do this as part of the production programming.
There are much easier ways which don't require console access or booting the system. See "board/tqm8xx/load_sernum_ethaddr.c" for one example wher ethis information can be written by the same programming sequence that programs the U-Boot image - it just programs some small data block in a second step.
it is probably advisable to disallow booting the linux kernel if the ethaddr/ipaddr has not changed.
Too complicated, and not necessary.
Best regards,
Wolfgang Denk