From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Samuelsson Date: Fri, 20 Apr 2007 23:59:07 +0200 Subject: [U-Boot-Users] Proposal for patch to configure network parameters References: <024c01c78381$d7866f00$01c4af0a@Glamdring> <46292528.80907@freescale.com> Message-ID: <02b301c78397$9909dfd0$01c4af0a@Glamdring> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > 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/.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