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

Ulf Samuelsson ulf at atmel.com
Fri Apr 20 23:59:07 CEST 2007


> Ulf Samuelsson 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.
>
> I agree that these don't belong in the board config file.  In fact, I 
> don't see why they should be board-specific at all.  The U-Boot code in 
> denx.de should have a config.h somewhere that specifies these, but we 
> should probably not encourage board maintainers to have their own 
> versions.
>
>> 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.
>
> I don't think it makes sense to claim that the network properties are 
> somehow tied to a board.  Are there boards out there that have to have 
> certain IP addresses?
>

If you setup serverip to point at your PC for board test&manufacture then 
you can do:

setenv bootcmd     tftp 21000000 autoscript.myboard     ;     autoscr 
21000000

in your default (compile time) configuration.

Connect Ethernet
Power Up
autoscript is downloaded and executed
LED starts to blink when ready.
Power Down
Next board...

The autoscript.myboard is regenerated for every new board so they get a new 
"ethaddr"
and other custom features..

I really do not see the harm in this.


> -- 
> Timur Tabi
> Linux Kernel Developer @ Freescale
>


Best Regards
Ulf Samuelsson






More information about the U-Boot mailing list