|
Part 2ýBuilding on the Basics
by Ed Sutter
Start ý The
Ethernet Interface ý The Command Line Interface
ý "Get Your Tokens Here" ý One
Last Topic About CLI ý Executable Scripts
ý Application-to-Monitor Hook-Up ý The
Moncom() Function ý The Monconnect() Function
ý Letýs Regroup ý Xmodem
and Tftp ý OK, Iým Done! ý Sources
and PDF
THE ETHERNET INTERFACE
The Ethernet interface now can be initialized
using getenv() to retrieve the content of the shell variables
IPADD, GIPADD, NETMASK, and ETHERADD.
The content of each of these shell variables is used to help initialize
the interface. Obviously, the code must be prepared for the case of
a nonexistent shell variable or invalid value by using some hard-coded
default or treating this as an error. Note that this is allowing the
same boot monitor binary to be used on multiple iterations of a hardware
platform that has no special facility for storing this information.
You can create this file with the monitorýs built-in file editor or
it can be downloaded via XMODEM or TFTP. As you will see, this file
then can be password-protected because the monitor also has four built-in
user levels and each file can be created to be accessible only at
a specified user level or above.
TFS is established, the monrc
file has been executed, and the Ethernet interface has been configured
based on shell variables set up in the monrc file. The generic
system initialization has been completed. The final step would be
to look through the file system once again for any auto-bootable files
and run them. TFS provides this autoboot capability and allows the
files to be executable binaries or scripts (as was the case earlier
with the monrc file). The files are scanned in alphabetical
order for any auto-bootable files, and execution depends on the content
and flags of the file(s). For this article, letýs assume there are
no auto-bootable files. This means that the next thing seen is the
command line.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |