From: Steven Scholz <steven.scholz@imc-berlin.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [Fwd: [PPCBoot-users] DHCP updating environment???]
Date: Tue, 05 Nov 2002 16:30:01 +0100 [thread overview]
Message-ID: <3DC7E3F9.749ECA1D@imc-berlin.de> (raw)
In-Reply-To: 3DC7DE95.24062894@imc-berlin.de
Steven Scholz wrote:
>
> Wolfgang Denk wrote:
> >
> > In message <3DC7C8C5.6983A78@imc-berlin.de> you wrote:
> > >
> > > > Seems you think right. Ummmm... why are you asking? Any problems with
> > > > it?
> > > Well, I am a bit anoyed because everytime I do a dhcp to get the settings for a
> > > tftp I have to wait until pImage gets loaded...
> > >
> > > (Well not realy anoyed! Just curious why it is the way it is.)
> > >
> > > I want to do something like "dhcp; tftp 100000 fpga.rbf".
> >
> > I don't get you. Do you mean that setting "autoload" to "no" does NOT
> > work with DHCP? From the code I think it should work.
>
> Ok. Example (from real life):
>
> After power on I have
>
> loadaddr=0x100000
> serial#=69383
> ethaddr=00:A0:33:01:07:0F
>
> A bootp results in:
> => bootp
> FEC ETHERNET configured
> BOOTP broadcast 1
> DHCP client bound to address 10.0.9.161
> ARP broadcast 1
> TFTP from server 10.0.2.9; our IP address is 10.0.9.161
> Filename 'pImage.DAB4K2'.
> Load address: 0x100000
> Loading: #################################################################
> #################################################################
> ########
> done
> Bytes transferred = 702439 (ab7e7 hex)
> => printenv
> loadaddr=0x100000
> serial#=69383
> ethaddr=00:A0:33:01:07:0F
> bootfile=pImage.DAB4K2
> filesize=ab7e7
> netmask=255.255.0.0
> hostname=dab4k2_69383
> rootpath=/opt/ELDK/ppc_8xx
> ipaddr=10.0.9.161
> serverip=10.0.2.9
>
> Fair enough! But let's do it again...
>
> => setenv autoload n
> => bootp
> FEC ETHERNET configured
> BOOTP broadcast 1
> DHCP client bound to address 10.0.9.161
> => printenv
> loadaddr=0x100000
> serial#=69383
> ethaddr=00:A0:33:01:07:0F
> autoload=n
> bootfile=pImage.DAB4K2
>
> You see!?
>
> Only "bootfile" gets set. So a following tftp brings
>
> => tftp 100000 pImage.DAB4K2
> FEC ETHERNET configured
> *** ERROR: `serverip' not set
>
> So I think BootpCopyNetParams() should get called regardless of autoload!
Sorry!!!
BootpCopyNetParams() gets called regardless of autoload!
But
void BootpCopyNetParams(Bootp_t *bp)
{
NetCopyIP(&NetOurIP, &bp->bp_yiaddr);
NetCopyIP(&NetServerIP, &bp->bp_siaddr);
memcpy (NetServerEther, ((Ethernet_t *)NetRxPkt)->et_src, 6);
copy_filename (BootFile, bp->bp_file, sizeof(BootFile));
debug ("Bootfile: %s\n", BootFile);
/* Propagate to environment:
* don't delete exising entry when BOOTP / DHCP reply does
* not contain a new value
*/
if (*BootFile) {
setenv ("bootfile", BootFile);
}
}
So setenv is called only for bootfile. So should we call setenv for OurIP,
ServerIp etc or should tftp check NetOurIP or bp->bp_yiaddr!?
Steven
next prev parent reply other threads:[~2002-11-05 15:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 12:22 [U-Boot-Users] [Fwd: [PPCBoot-users] DHCP updating environment???] Steven Scholz
2002-11-05 12:57 ` Wolfgang Denk
2002-11-05 13:09 ` Steven Scholz
2002-11-05 13:22 ` Wolfgang Denk
2002-11-05 13:33 ` Steven Scholz
2002-11-05 14:03 ` Wolfgang Denk
2002-11-05 15:07 ` Steven Scholz
2002-11-05 15:30 ` Steven Scholz [this message]
2002-11-05 15:44 ` Steven Scholz
2002-11-05 15:49 ` Wolfgang Denk
2002-11-05 17:02 ` Steven Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DC7E3F9.749ECA1D@imc-berlin.de \
--to=steven.scholz@imc-berlin.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.