[U-Boot-Users] Proposal for patch to configure network parameters

Wolfgang Denk wd at denx.de
Fri Apr 20 22:47:05 CEST 2007


In message <024c01c78381$d7866f00$01c4af0a at 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

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I dislike companies that have a we-are-the-high-priests-of-hardware-
so-you'll-like-what-we-give-you attitude. I like commodity markets in
which iron-and-silicon hawkers know that they exist to  provide  fast
toys for software types like me to play with..."    - Eric S. Raymond




More information about the U-Boot mailing list