[U-Boot-Users] Statically assigned IP addresses

Kerl, John John.Kerl at Avnet.com
Wed Jan 14 17:35:14 CET 2004


> > 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.




More information about the U-Boot mailing list