02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2<br />

Setup and Startup<br />

Step 2:<br />

Example 2-1<br />

Prepare a NetROM startup file.<br />

After the NetROM obtains its IP address, it loads a startup file. The pathname for<br />

this file depends on which protocol establishes the IP address:<br />

■<br />

BOOTP: A startup-file name is part of the BOOTP server’s reply to the BOOTP<br />

request. Record your choice of startup-file pathname in the BOOTP table<br />

(typically /etc/bootptab).<br />

■<br />

RARP: When the IP address is established by a reply to the RARP request, no<br />

other information accompanies the IP address. In this case, the NetROM<br />

derives a file name from the IP address. The file name is constructed from the<br />

numeric (dot-decimal) IP address by converting each address segment to two<br />

hexadecimal digits. For example, a NetROM at IP address 147.11.46.164<br />

expects a setup file named 930B2EA4 (hexadecimal digits from the alphabet<br />

are written in upper case). The NetROM makes three attempts to find the<br />

startup file, with each of the following pathnames: ./filename,<br />

/tftpboot/filename, and filename without any other path information.<br />

The startup file contains NetROM commands describing the emulated ROM, the<br />

object format, path and file names to download, and so on. The following example<br />

NetROM startup file configures the Ethernet device, adds routing information,<br />

records the object-file name to download and the path to it, and establishes ROM<br />

characteristics.<br />

Sample NetROM Startup File<br />

begin<br />

ifconfig le0 147.11.46.164 netmask 255.255.255.0 broadcast 147.11.46.0<br />

setenv filetype srecord<br />

setenv loadpath /tftpboot<br />

setenv loadfile vxWorks_rom.hex<br />

setenv romtype 27c020<br />

setenv romcount 1<br />

setenv wordsize 8<br />

setenv debugpath readaddr<br />

set udpsrcmode on<br />

tgtreset<br />

end<br />

2<br />

NOTE: The environment variable debugpath should be set to dualport (rather<br />

than to readaddr) if you are using the 500-series NetROM boxes.<br />

When you create a NetROM startup file, remember to set file permissions to permit<br />

the TFTP file server to read the file.<br />

39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!