Sonic Alert 2.8 Clock Radio User Manual


 
6.4 Using U-Boot Networking 33
6.4 Using U-Boot Networking
One of the most useful features of the Das U-Boot loader is its’ ability to
transfer files across a network. As shown below, the dhcp command is
typically used to perform both a BOOTP/DHCP request and transfer a file.
$
$ set bootfile nk4.nb0
$ set serverip 192.168.0.26
$ dhcp
Using MAC Addres s 00:50:C2:06:30:8F
BOOTP broadcast 1
DHCP client boun d to address 192.168.0.14
TFTP from server 192.168.0.26; our IP address is 192.168.0.14
Filename ’nk4.nb0’.
Load address: 0x a0030 000
Loading: T T #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
...
#################################################################
#################################################################
done
Bytes transferred = 23068672 (1600000 hex)
$
First of all, the bootfile environment variable is used in the example
above to define the file to transfer. By default, the boot file is computed
using a hex representation of the IP address assigned to the device.
’192.168.0.14’ => ’0E00A8C0.img’
Used with a tftp server that allows symlinks, this provides a convenient
way to define per-device boot files.
The second thing to note in the example is the use of the serverip
environment variable. This variable defines the IP address of the TFTP
server, in this case ’192.168.0.26’. If your DHCP server allows setting of
the si addr field in the DHCP response (refer to RFC2131 for details), this
value can be automatically provided.
The third thing of interest is the load address (0xa0030000). This value
is defined in neon.h in the CFG LOAD ADDR macro. It may be overridden
through the use of the loadaddr environment variable.
The CONFIG EXTRA ENV SETTINGS macro in configs/neon.h may be
used to assign the proper compile-time defaults for the environment variables
listed above.
The DHCP/BOOTP/TFTP process is relatively fast, even using a slow
protocol like TFTP. The 23MB transfer above took 20 seconds. Much faster
than swapping MMC cards. Slower than mdebug/jtag under Linux, but
faster than Cygwin jtag and blast.
Any server software that supports RFC1350 should work. The stan-
dard tftpd daemon under Linux is a good choice. Under Windows, the free
Tftfpd32 by Philippe Jounin is a very nice tool.
December 28, 2005 Revision 2.8