Running Programs

The easiest way to load a program image into the PXS is to use TFTP. Linux comes with a TFTP daemon which is typically run by xinetd. (TFTP servers are also available for Windows.) Both the TFTP daemon and xinetd are installed by default on most Linux distributions. To enable TFTP, simply place a file called tftp in the /etc/xinetd.d directory with the following contents:

service tftp
{
    socket_type    = dgram
    protocol       = udp
    wait           = yes
    user           = root
    server         = /usr/sbin/in.tftpd
    server_args    = -s /usr/home/tftp
    disable        = no
}

This assumes that /usr/home/tftp is a directory which is world readable and that all the files in it are world readable as well. This is the directory to which program images need to be copied to be downloadable via TFTP.

After installing the configuration file, restart xinetd so it will reread its configuration thus enabling the TFTP server:

# su
Password:
# ps -A | grep xinetd
  950 ?        00:00:02 xinetd
# kill -s SIGUSR2 950
# exit
# tftp localhost
tftp> quit
#

If you set a variable called TFTPHOME in your environment to this directory, the make target for pdkhello.bin will automatically include a command to copy the resulting file to that directory. You can also set the address of your TFTP server in the PXS using the tftp RedBoot command. Then, from the RedBoot prompt, you can load and execute the program image with the commands:

RedBoot> load -r pdkhello.bin
Loading from default TFTP server: 192.168.250.2
Defaulting to entry point of 0x00000000.
Raw load done: 429788 bytes read
Address range: 00000000-00068edc, Entry point: 00000000,
RedBoot> go