[U-Boot-Users] [Fwd: [PPCBoot-users] DHCP updating environment???]

Steven Scholz steven.scholz at imc-berlin.de
Tue Nov 5 14:09:59 CET 2002


Wolfgang Denk wrote:

> > is there a reason why BootpCopyNetParams() in bootp.c does _not_ setenv the
> > ipaddr?
> 
> IIRC this was  requested  by  one  /  some  users  with  nobody  else
> complaining about this. [But this discussion may have happned about 2
> years ago, so I may be wrong.]
> 
> > If I set autoload=n I want to use the dhcp command just to get the IP address
> > from the server. But PPCBoot only sets the "bootfile" variable and nothing more!
> 
> No. With DHCP you cannot "just get the IP address"; you  will  always
> get  what the DHCP server has to offer, and you default configuration
> will most certainly ask for more than just the IP address.
> 
> > Wouldn't it make sense to set all the params we got from the DHCP server?
> 
> Maybe, maybe not. This depends on a lot of things.
> 
> For example: assume I manually set a parameter (maybe  ipaddr,  maybe
> gatewayip); in this case I probably want to make sure that my pre-set
> values   take   precedence   over   any  DHCP  supplied  (additional)
> information. But then, I cannot simply implement some code which sets
> the params gotten via DHCP if they are not present in the environment
> - I think I remember there was an argument that in such  a  situation
> you  would  not be able to get rid of a faulty setting suppllied once
> by a misconfigured DHCP server.

Fair enough!
That's why I mentioned CONFIG_BOOTP_MASK. This could be use to decide/filter
which setting supplied by a DHCP server to use.
If you have to deal with a faulty server and you don't want/can update PPCBoot,
maybe we can introduce an environment variable like "dhcp_mask" ...

> > Well, at least the ones we're interessted in (see CONFIG_BOOTP_MASK).
> 
> I understand what you mean, but I would like to  hear  more  feedback
> from others...
Yes please! :o)

Again: What's the use of setting autoload to "n"?
I thought it's to get the settings from a DHCP server without immediately
loading a file, so I can use the settings (IP, server ip etc) for something
else, e.g. tftp'ing an FPGA file or ppcboot (ehm sorry U-Boot) image.

Thanks,

Steven




More information about the U-Boot mailing list