
In message 024c01c78381$d7866f00$01c4af0a@Glamdring you wrote:
U-Boot has a number of network parameters like
CONFIG_HOSTNAME CONFIG_IPADDR CONFIG_GATEWAYIP CONFIG_NETMASK etc.
While these can be defined in an "include/configs/<board>.h", it would be nice to be able to define this in a separate file since they are really not board specific.
Actually these parameters (and more, like MAC addresses) should *never* be set at all in the U-Boot configuration. They exist for (1) hysterical reasons I'm not going to explain, and (2) because some (paying!) customer insisted on having such a feature.
Normally, you should use other methods to customize your system - the U-Boot binary image for a board should always be independent of such settings.
Such a file I.E: "include/custom.h", would get included by the automatically generated "config.h", after the board specific file is included, to allow it to override any values.
In the normal distribution, this file would be empty so it will not affect any current boards.
I think I'm going to resist such a change. By making it easier to use this stuff, more people will use it, i. e. evil will spread.
This would allow you to automatically analyse your machine to find out your host ipaddress, and add an appropriate ipaddr, netmask, gatewayip etc and overwrite the file with a custom default network configuration before you build.
There are other, better ways to implement what you want to do. For example, you can put such information in a separate location in flashand make U-Boot to auto-initialize these variable from these default settings in case the environment does not contain any other settings yet, etc.
If the idea seems acceptable, I will go ahead and generate the real patches.
Please don't.
Best regards,
Wolfgang Denk