[U-Boot] [RFC] Preventing overriding of serverip when set in environment by user

Wolfgang Denk wd at denx.de
Wed Apr 18 21:14:13 CEST 2012


Dear Peter Barada,

In message <4F8EE1E1.1060201 at logicpd.com> you wrote:
>
> > What exactly _are_ you trying to fix?  What is wrong with using the
> > DHCP server supplied address?  If it is incorrect, you should fix your
> > DHCP server configuration.
> I have the same type of problem.
> 
> In my case our company controls the DHCP server that hands out addresses
> for the network, but I want to use a *local* TFTP server (the one on my
> development machine).  I can't modify the DHCP server so if I use "dhcp"
> to get and address u-boot also overwrites serverip.  At home my FiOS

If you know the DHCP server provides an address you don;t want to use,
and if you know the address that you want to use, then why don't you
just use it?

Something like:

	=> setenv tftpserverip 192.168.12.34
	=> setenv autoload no
	=> dhcp
	=> setenv ipaddr ${tftpserverip}
	=> tftp ...

?

> Would an option to dhcp (i.e. one that tells it to *only* modify ipaddr)
> suffice? Or would it be better to provide an entirely a new command that
> optionally updates the variables in the environment be better? Then
> users have the option of using "dhcp" as is, or for environments like
> mine (and apparently Chase) can just get an IP address and go from there...

Why make it complicated when a few simple commands are sufficient?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Where would we be without rhetorical questions?


More information about the U-Boot mailing list