[U-Boot-Users] DHCP/BOOTP with CONFIG_NET_MULTI

Wolfgang Denk wd at denx.de
Thu Jul 29 10:50:04 CEST 2004


Dear Enzo,

in message <000e01c47541$604e1330$4a50848a at settimo.italtel.it> you wrote:
> 
> I'm using u-boot 1.1.0 and I need to boot Linux using DHCP; in my board
> there is more than one eth line available.

OK. Ummm... which type of board is this?

> Until now I have been using TFTP with CONFIG_NET_MULTI defined and all was
> good, but looking the dhcp code for this step I see that dhcp doesn't
> support more than one eth line (get mac address only from the first).

You write "looking the dhcp code" -- did you actually try it out?

The assignment of the current MAC address when  switching  to  a  new
network interface happens in "net.c":

    ...
    289 restart:
    290 #ifdef CONFIG_NET_MULTI
    291         memcpy (NetOurEther, eth_get_dev()->enetaddr, 6);
    292 #else
    293         memcpy (NetOurEther, bd->bi_enetaddr, 6);
    294 #endif
    ...

The BOOTP/DHCP code just uses the value stored in  the  "NetOurEther"
variable. To me this looks OK.

> Is there any reason for this or is a bug ?

I'm not sure I understand what you mean. Are  you  perhaps  confusing
this with the random delay code (CONFIG_BOOTP_RANDOM_DELAY) where the
computation  of  the  initial  random delay is based on the "ethaddr"
value? This is definitely not a problem...

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
How many hardware guys does it take to change a light bulb? "Well the
diagnostics say it's fine buddy, so it's a software problem."




More information about the U-Boot mailing list