8.3. Using the network to obtain files

Once the interface settings are configured files may be retrieved from the network using the TFTP protocol. Files are accessed with the (tftpboot) source. If no filename is given the one provided by the DHCP server will be used, if the DHCP server doesn't provide a filename one based upon the hardware unique ID is used (the hwinfo command can be used to find the unique ID).

Most of the operations described here are not usually required if a properly configured DHCP and TFTP servers are used. Any file that can be accessed using TFTP can be used wherever a filename is used within ABLE, no distinction between network and local files is explicitly made (the one exception being that filesystem stat calls cannot be sensibly answered via TFTP).

The ability to use the network in this way allows for a very rapid compile, execute and test cycle. No physical media is involved and mistakes can be rectified and retested in a short time.

Example 8.1. Executing a program using the tftpboot pseudo filesystem

This example shows the batty board test tool being retrieved over the network using a default DHCP configuration.

>(tftpboot)batty
tftp: attempting bootp
bootp: sending request
bootp: serverip: 192.168.7.1
bootp: netmask: 255.255.255.0
bootp: serverip: 192.168.7.1
bootp: netmask: 255.255.255.0
bootp: address: 192.168.7.222
.....loaded (tftpboot)batty, 0x8040 bytes at 0x00008000
boot: booting 'able app1'
Simtec Board Test Tool, Version 0.10
(c) 2005 Simtec Electronics

EB2410ITX (BAST) Test Suite

Testing S3C24XX CPU Core
 CPU ID 32410002, OK [S3C2410A]
 Testing internal SRAM block
  Pattern: all ones
  Pattern: all zeros
  Pattern: alternate zero/ones (LSB set)
  Pattern: alternate zero/ones (LSB unset)
  Writing address to each location

 Testing system RAM [0x00400000..0x07d00000]
  Pattern: all ones
  Pattern: all zeros
  Pattern: alternate zero/ones (LSB set)
  Pattern: alternate zero/ones (LSB unset)
  Writing address to each location

 Checking ABLE CRC
  CRC OK

 Searching for ABLE info
  Version 208
  Release 2005041001
  Supported machine number 3
  Supported machine number 6

Testing CPLD registers
 CPLD ID register (value 00) OK


DONE: 13 tests, 13 ok, 0 failed, 0 warnings
PASSED: all tests OK
>