* [U-Boot-Users] Statically assigned IP addresses
@ 2004-01-13 18:50 Richard Klingler
2004-01-13 20:05 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Richard Klingler @ 2004-01-13 18:50 UTC (permalink / raw)
To: u-boot
Hello (o;
> Hello,
>
> This is my first time using U-boot and I have what I
> am sure is a newbie question. However, I am getting
> an error while attempting to access the archives at
> SourceForge, so I'll go ahead and post the following.
>
> 1. On my Chameleon 405EP board, it appears the Ethernet
> interface is off by default. While the board is
> running Linux, the Ethernet interface is *not*
> brought up by default -- rather, I must type
> 'ifconfig eth0 up'. This seems strange, but I can
> live with it. While the board is running U-boot,
> on the other hand, there does not appear to be a
> 'bring up Ethernet' command. I have MAC address and
> IP address set in environment variables, so what else
> do I need to do to get the board to answer a ping???
Are you able to tftp an image to your board in u-boot?
Get's your ethernet controller initialized after reset?
Using a strange/cheap hub/switch?
In Linux you have always some "ifconfig interface xxxx" stuff
during boot...so adding an "up" statement wouldn't hurt...
>
> 2. Probably the same as the first question -- assigning
> a static IP address. In our lab, we do not use DHCP;
> addresses are statically assigned. Is setenv ipaddr
> {n.n.n.n} sufficient? If not, what else do I need
> to do?
setenv netmask x.x.x.x
and if you like:
setenv gatewayip x.x.x.x
>
> 3. Is this standard U-boot behavior, or is it peculiar
> to the Chameleon board? On the boards we manufacture
> (and in our firmware), Ethernet comes up by default.
Should be...
rick
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
2004-01-13 18:50 [U-Boot-Users] Statically assigned IP addresses Richard Klingler
@ 2004-01-13 20:05 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-01-13 20:05 UTC (permalink / raw)
To: u-boot
In message <r02010000-1028-67E4B45645F911D888A700039387ACB6@[10.0.1.1]> you wrote:
>
> In Linux you have always some "ifconfig interface xxxx" stuff
> during boot...so adding an "up" statement wouldn't hurt...
This is wrong. You can use IP autoconfiguration and pass all required
informantioon on the kernel's command line. No need to add tools like
ifconfig or route to a root filesystem for 99% of all cases.
> setenv netmask x.x.x.x
In almost all cases Linux will guess the correct netmask.
> and if you like:
>
> setenv gatewayip x.x.x.x
Not if you like. If you need, and only then.
Best regards,
Wolfgang Denk
--
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
The day-to-day travails of the IBM programmer are so amusing to most
of us who are fortunate enough never to have been one - like watching
Charlie Chaplin trying to cook a shoe.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
@ 2004-01-14 16:35 Kerl, John
0 siblings, 0 replies; 8+ messages in thread
From: Kerl, John @ 2004-01-14 16:35 UTC (permalink / raw)
To: u-boot
> > understanding of U-boot: In our firmware, Ethernet is enabled
> > at start-up, and we always answer pings. (And you do not need
> > interrupts to do that -- our firmware runs polled and handles
> > pings just fine.) I am in the habit of thinking that if a node
>
> That means you have to implement some kind of multitasking. or how
> do you poll the network interface while another command is running?
Actually our firmware is strictly polled, and uses no interrupts,
tasks, etc. That keeps the code simple and reduces the porting time,
since almost nothing needs to be written in assembler.
It simply polls each device round-robin. If the UART has a character
ready, it's appended to a buffer and the UART poll routine returns.
If that character is the carriage return, another periodically called
function sees that and calls the handle-input-line routine, which
takes as long as needed, then returns. If the Ethernet poll routine
sees a frame ready, it calls the appropriate function ARP/IP handler.
Etc.
In particular, we don't handle incoming packets while running a
memory test, while committing an image to flash, etc. -- which is OK
because the board is busy and is meant to be interacted with by a
user.
> > * There appears to be no way to use TFTP to copy data
> > from the board to the PC.
>
> Please feel free to add a TFTP upload command.
I think that would be a good idea. I find that this proves a handy
way to copy a configured image (or a whole range of images, or the
entire flash, etc.) to the PC for analysis and/or re-use. Something
like tftpput flashimage.bin ffc00000,200000 to put 2 MB starting at
0xffc00000 to a file on the PC.
I'm not yet familiar with the U-boot source, but I do know from my
own code that the put and get are quite symmetrical, so it should be
rather easy for me to make this change.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
2004-01-13 20:58 Kerl, John
@ 2004-01-14 8:06 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-01-14 8:06 UTC (permalink / raw)
To: u-boot
Dear John,
in message <C7FFFEA58B43D311920D0004ACE5333F10E4F500@amer25.avnet.com> you wrote:
>
> understanding of U-boot: In our firmware, Ethernet is enabled
> at start-up, and we always answer pings. (And you do not need
> interrupts to do that -- our firmware runs polled and handles
> pings just fine.) I am in the habit of thinking that if a node
Thaty means you have to implement some kind of multitasking. or how
do you poll the network interface while another command is running?
> doesn't answer a ping, it is inoperable. Also, we run a TFTP
That is not true.
> server on the board, with a client on the PC. This way, the PC
That is pretty non-standard. The typical way to bootstrap systems
from a boot server is that the boting system will use TFTP / BOOTP /
DHCP as a _client_.
> * Pings are not answered.
Because U-Boot is single-tasking.
> * Ethernet is brought up only when one runs tftpboot
> et al.
Because there is no use in wasting time to bring up interfaces which
are not used. U-Boot is intended to allow for fast booting.
> * There appears to be no way to use TFTP to copy data
> from the board to the PC.
Please feel free to add a TFTP upload command.
> These are U-boot design decisions; my error was in expecting
> something else.
Indeed.
Best regards,
Wolfgang Denk
--
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Of all the things I've lost, I miss my mind the most.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
@ 2004-01-13 20:58 Kerl, John
2004-01-14 8:06 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Kerl, John @ 2004-01-13 20:58 UTC (permalink / raw)
To: u-boot
All:
Thanks for the reply.
No, not a cheap hub/switch (as evidenced by the fact that all is
well when running in Linux). The problem is my naive
understanding of U-boot: In our firmware, Ethernet is enabled
at start-up, and we always answer pings. (And you do not need
interrupts to do that -- our firmware runs polled and handles
pings just fine.) I am in the habit of thinking that if a node
doesn't answer a ping, it is inoperable. Also, we run a TFTP
server on the board, with a client on the PC. This way, the PC
can do a TFTP put to download files, or TFTP get to retrieve
them. Whereas U-boot runs a TFTP client on the board, and can
only download.
It is simply the case that U-boot was designed differently:
* Pings are not answered.
* Ethernet is brought up only when one runs tftpboot
et al.
* There appears to be no way to use TFTP to copy data
from the board to the PC.
These are U-boot design decisions; my error was in expecting
something else.
Thanks for all the prompt and helpful replies!
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Tuesday, January 13, 2004 1:02 PM
To: Kerl, John
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Statically assigned IP addresses
Dear John,
in message <C7FFFEA58B43D311920D0004ACE5333F10E4F4FF@amer25.avnet.com> you
wrote:
>
> 1. On my Chameleon 405EP board, it appears the Ethernet
> interface is off by default. While the board is
No, it is not off. It get's enabled when used.
> running Linux, the Ethernet interface is *not*
> brought up by default -- rather, I must type
> 'ifconfig eth0 up'. This seems strange, but I can
Did you enable IP autoconfiguration in the kernel, and did you pass
appropriate "ip=" comand line arguments to Linux?
> live with it. While the board is running U-boot,
> on the other hand, there does not appear to be a
> 'bring up Ethernet' command. I have MAC address and
Ethernet get's enabled when used.
> IP address set in environment variables, so what else
> do I need to do to get the board to answer a ping???
U-Boot can be configured to send ping ICMP messages and show the
reply, but it does not answer incoming ICMP requests.
> 2. Probably the same as the first question -- assigning
> a static IP address. In our lab, we do not use DHCP;
> addresses are statically assigned. Is setenv ipaddr
> {n.n.n.n} sufficient? If not, what else do I need
> to do?
For U-Boot this is sufficient. For Linux you must pass this
information to the Linux kernel using an "ip=" command line argument.
Ummm... what exactly is unclear in the description in
http://www.denx.de/twiki/bin/view/DULG/LinuxBootArgs
that you need to ask all these questions?
> 3. Is this standard U-boot behavior, or is it peculiar
> to the Chameleon board? On the boards we manufacture
> (and in our firmware), Ethernet comes up by default.
This is standard U-Boot behaviour.
I don't understand what you mean by "comes up". U-Boot imnitializes
the network interface(s) only when you try to use them.
Best regards,
Wolfgang Denk
--
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
2004-01-13 18:27 Kerl, John
@ 2004-01-13 20:02 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-01-13 20:02 UTC (permalink / raw)
To: u-boot
Dear John,
in message <C7FFFEA58B43D311920D0004ACE5333F10E4F4FF@amer25.avnet.com> you wrote:
>
> 1. On my Chameleon 405EP board, it appears the Ethernet
> interface is off by default. While the board is
No, it is not off. It get's enabled when used.
> running Linux, the Ethernet interface is *not*
> brought up by default -- rather, I must type
> 'ifconfig eth0 up'. This seems strange, but I can
Did you enable IP autoconfiguration in the kernel, and did you pass
appropriate "ip=" comand line arguments to Linux?
> live with it. While the board is running U-boot,
> on the other hand, there does not appear to be a
> 'bring up Ethernet' command. I have MAC address and
Ethernet get's enabled when used.
> IP address set in environment variables, so what else
> do I need to do to get the board to answer a ping???
U-Boot can be configured to send ping ICMP messages and show the
reply, but it does not answer incoming ICMP requests.
> 2. Probably the same as the first question -- assigning
> a static IP address. In our lab, we do not use DHCP;
> addresses are statically assigned. Is setenv ipaddr
> {n.n.n.n} sufficient? If not, what else do I need
> to do?
For U-Boot this is sufficient. For Linux you must pass this
information to the Linux kernel using an "ip=" command line argument.
Ummm... what exactly is unclear in the description in
http://www.denx.de/twiki/bin/view/DULG/LinuxBootArgs
that you need to ask all these questions?
> 3. Is this standard U-boot behavior, or is it peculiar
> to the Chameleon board? On the boards we manufacture
> (and in our firmware), Ethernet comes up by default.
This is standard U-Boot behaviour.
I don't understand what you mean by "comes up". U-Boot imnitializes
the network interface(s) only when you try to use them.
Best regards,
Wolfgang Denk
--
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
@ 2004-01-13 19:06 Demke, Torsten
0 siblings, 0 replies; 8+ messages in thread
From: Demke, Torsten @ 2004-01-13 19:06 UTC (permalink / raw)
To: u-boot
Hello
>
> 1. On my Chameleon 405EP board, it appears the Ethernet
> interface is off by default. While the board is
> running Linux, the Ethernet interface is *not*
> brought up by default -- rather, I must type
> 'ifconfig eth0 up'. This seems strange, but I can
> live with it. While the board is running U-boot,
> on the other hand, there does not appear to be a
> 'bring up Ethernet' command. I have MAC address and
> IP address set in environment variables, so what else
> do I need to do to get the board to answer a ping???
U-boot will not answer to a remote ping (no interrupt etc).
But you can send a ping from U-boot to a remote target
if you have CFG_CMD_PING enabled in your configuration.
Did you enable "IP: kernel level autoconfiguration" in your
Linux kernel? I use the "bootargs" to give the Linux kernel
the appropriate parameters for the eth interfaces.
( setenv bootargs
ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off )
Regards,
Torsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot-Users] Statically assigned IP addresses
@ 2004-01-13 18:27 Kerl, John
2004-01-13 20:02 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Kerl, John @ 2004-01-13 18:27 UTC (permalink / raw)
To: u-boot
Hello,
This is my first time using U-boot and I have what I
am sure is a newbie question. However, I am getting
an error while attempting to access the archives at
SourceForge, so I'll go ahead and post the following.
1. On my Chameleon 405EP board, it appears the Ethernet
interface is off by default. While the board is
running Linux, the Ethernet interface is *not*
brought up by default -- rather, I must type
'ifconfig eth0 up'. This seems strange, but I can
live with it. While the board is running U-boot,
on the other hand, there does not appear to be a
'bring up Ethernet' command. I have MAC address and
IP address set in environment variables, so what else
do I need to do to get the board to answer a ping???
2. Probably the same as the first question -- assigning
a static IP address. In our lab, we do not use DHCP;
addresses are statically assigned. Is setenv ipaddr
{n.n.n.n} sufficient? If not, what else do I need
to do?
3. Is this standard U-boot behavior, or is it peculiar
to the Chameleon board? On the boards we manufacture
(and in our firmware), Ethernet comes up by default.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-01-14 16:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13 18:50 [U-Boot-Users] Statically assigned IP addresses Richard Klingler
2004-01-13 20:05 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2004-01-14 16:35 Kerl, John
2004-01-13 20:58 Kerl, John
2004-01-14 8:06 ` Wolfgang Denk
2004-01-13 19:06 Demke, Torsten
2004-01-13 18:27 Kerl, John
2004-01-13 20:02 ` Wolfgang Denk
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.