U-Boot net-boot confuses serverip...

Hi,

My LAN topology is as follows:

Fritz!Box (192.168.178.1)

(----- switch ----------)

                     >
                     >

PC Beaglebone
(192.168.178.21) (192.168.178.25)

I am trying to boot the linux kernel and the rootfs via
LAN from my Linux PC.
I boot into the U-Boot-prompt and with printenv I get
(beside other things):

   net_boot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}

Executing this with

   run net_boot

executes dhcp which in turn figured out, that the serverip (where
atftp) runs is 192.168.178.1...the Fritz!Box, my DSL modem.

The atftpd runs on my PC instead.

After setenv serverip 192.168.179.25 and executing the commands above
manually step by step boots the Beaglebone via LAN.

But...how can I convince the dhcp command of the U-Boot to either
determine my Linux PC's IP as serverip or to accept the contents
of my uEnv.txt, which is found, read and forgotten?

Best regards,
mcc

You replied only to me and did not CC the Beagle list. I am replying
to you and to the Beagle list.

Andrew Bradford <andrew@bradfordembedded.com> [12-10-23 23:08]:
>
> > My LAN topology is as follows:
> >
> > Fritz!Box (192.168.178.1)
> > >
> > >
> > (----- switch ----------)
> > > >
> > > >
> > PC Beaglebone
> > (192.168.178.21) (192.168.178.25)
> >
> >
> >
> > I am trying to boot the linux kernel and the rootfs via
> > LAN from my Linux PC.
> > I boot into the U-Boot-prompt and with printenv I get
> > (beside other things):
> >
> > net_boot=echo Booting from network ...; setenv autoload no;
> > dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm
> > ${kloadaddr}
> >
> > Executing this with
> >
> > run net_boot
> >
> > executes dhcp which in turn figured out, that the serverip (where
> > atftp) runs is 192.168.178.1...the Fritz!Box, my DSL modem.
> >
> > The atftpd runs on my PC instead.
> >
> > After setenv serverip 192.168.179.25 and executing the commands
> > above manually step by step boots the Beaglebone via LAN.
> >
> > But...how can I convince the dhcp command of the U-Boot to either
> > determine my Linux PC's IP as serverip or to accept the contents
> > of my uEnv.txt, which is found, read and forgotten?
>
> "next-server" set by the dhcp server is where u-boot tries to find
> things.
>
> -Andrew
>

Hi Andrew,

thank you for your reply! :slight_smile:

Unfortunately I am dhcp-guru....

As fas as I know, the dhcp-server is running on my fritz!box
and is the one my PC as my Beaglebone receives their IP-addr
from while booting.

Is "next-server" a configuration item of the dhcp-server (if yes a
have no hope to change that...it is in the firmware of the fritz!box
I think...) or what is it (sorry for the newbie question...) ???

'next-server' is a setting in dhcpd.conf on the DHCP server. It tells
clients where to find the next server used in booting so the client can
find boot files.

See:
http://lrp2.steinkuehler.net/Packages/man/dhcpd.conf.5.man.htm
http://www.denx.de/wiki/DULG/SystemSetup

If you can't change what's given out by your DHCP server, just
overwrite the env settings that the 'dhcp' command in u-boot sets with
what you want. Just do it after you run 'dhcp' in your u-boot script.

-Andrew