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

DHCP: Attempting network autoconfiguration for dm0.
DHCP: Automatic network configuration for dm0 successful.
DHCP: Address:
DHCP: Netmask:
DHCP: Gateway:
DHCP: Server:
DHCP: DNS server:
Simtec Board Test Tool, Version 1.00
Copyright 2005-2009 Simtec Electronics

OSIRIS (IM2440D20) Test Suite

Testing S3C24XX CPU Core
  CPU ID 32440001, OK [S3C2440A]

Testing S3C24XX 4kB 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


DONE: 37 tests, 37 ok, 0 failed, 0 warnings
PASSED: all tests OK