UPGRDSYSD



Upgrdsysd is a specialized tftp server for use with linux-based embedded systems using compact flash or other solid state disk cards and a ram disk based boot method. Because the intended application is embedded systems, the server is not designed to handle the full tftp protocol, only a subset of it.

What Upgrdsysd is:

A time saver for embedded system developers. The main reason for its existence is to eliminate the plugging and unplugging of compact flash memory cards and the shuttling of these cards between the target system and the development system. This is both error prone and subjects the compact flash card and the embedded target to potential ESD damage. Upgrdsysd is composed of two parts: A 'pico' tftp server and way to execute a user script or other program to validate the downloaded file.

What Upgrdsysd is not:

Secure. Upgrdsysd should not be used on any interface exposed to the public Internet. Since it usually runs with root privileges, someone could conceivably spoof a valid source IP address and hijack your embedded system by spying on a legitimate transfer, then substituting another.

A full featured TFTP server. The standard TFTP server should be used in this case. Upgrdsysd only handles one session at a time. Concurrent connection attempts from other clients will be rejected with a TFTP error packet. Upgrdsysd only handles binary connections, NETASCII connections will be refused.

How it works:

Upon execution, upgrdsysd reads and parses a configuration file which contains information on what interface to use, the port number to listen on, and which source IP address range can be trusted. When a client attempts to connect, it verifies the source IP address matches the address range specified in the configuration file. If the source IP address is acceptable, the TFTP server downloads an image file (formatted any way you like) and then passes control to a user-defined program or script. The user-defined program or script can then authenticate, decompress, and install the new files on the solid state disk card, and then reboot the system. When the system boots back up, the new files be in place and the system will have been updated.

Command line switches:

Switch

Description

-v

Print version number and exit.

-h

Print list of command line switches and exit

-d level

Enable debugging information to be printed on the console

-n

Do not fork into the background

-c config file.

Specify an alternate configuration file name



Configuration File Format:

The format of the configuration file is name = value key pairs. # may be used as a comment, and a section keyword of [global] must be present on the first non-comment line in the file.

Configuration file options:

Configuration File Option

Description

port

Specifies the port number to listen on. The default port to listen on is 69.

image-file

Specifies the name and the path to the place to store the image file downloaded from the development system.

pid-file

Specifies the path and name of the pid file used by the daemon when it is forks into the background.

blocksize

Specifies the blocksize to be used by the data packets. The standard TFTP data packet size is 512 bytes and this is the default. Only use this with TFTP clients which support nonstandard block sizes.

transfer-limit

Specifies the transfer limit in bytes. This can be used to prevent a DOS attack by limiting the size of an image file. The default is max unsigned int.

accept-ip

Specify an accept IP address or accept IP address range in CIDR notation (e.g. 192.168.1.0/24).

interface

Specify an interface to listen on. The default is any interface (0.0.0.0).







SourceForge.net Logo