Installing the TFTP Server

   


TheMediaEngine and RPX-CLLF bootloaders can download files over Ethernet using Trivial File Transfer Protocol (TFTP). The bootloader configures the target board's Ethernet hardware and can download the kernel and RAM disk files into specific RAM locations. The user can then execute the kernel located in memory. The target specific commands for doing this are covered in the following sections. This section shows how to configure the tbdev1 workstation as a TFTP server.

TFTP is a simple file transfer protocol that doesn't require authentication. TFTP servers primarily serve boot images over a network to diskless workstations (such as Project Trailblazer's MediaEngine and RPX-CLLF boards). Follow these steps to install and configure a TFTP server on tbdev1:

  1. Install the TFTP server and the client on the tbdev1 workstation by using these commands:

     root@tbdev1[520]: apt-get install tftpd root@tbdev1[521]: apt-get install tftp 
  2. Configure the server by modifying its configuration file, /etc/inet.conf. Edit /etc/inet.conf, and then search for tftp. Make the tftp line look like this:

     tftp dgram udp wait  nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /tftpboot 

    This tells the TFTP server what directory (/tftpboot) to use for TFTP client requests.

  3. Change the permissions on /tftpboot to 755 by using this command:

     root@tbdev1[525]: chmod 755 /tftpboot/ 
  4. Changing /etc/inet.conf requires that you signal the inetd program to reload its configuration file. Use the ps command to get the process ID, and then use the kill command to send the HUP signal:

     root@tbdev1[526]: ps x | grep inetd 147  ?        S   0:00 /usr/sbin/inetd root@tbdev1[527]: kill -HUP 147 
  5. Test the TFTP server installation. As root, create the file /tftpboot/test and put something in it (for example, "This is a test"); make this test file readable by all users:

     root@tbdev1[509]: echo "This is a test" > /tftpboot/test root@tbdev1[510]: chmod 666 /tftpboot/test 
  6. Change directory into /tmp and type the command tftp 192.168.1.11. You should get a TFTP prompt. Type get test, and the test file should transfer. Then type quit. The transfer occurs via TFTP to the /tmp directory. You should have a file called /tmp/test. Here are the commands that implement this test:

     root@tbdev1[528]: cd /tmp root@tbdev1[529]: tftp 192.168.1.11 tftp> get test Received 16 bytes in 0.0 seconds tftp> quit root@tbdev1[530]: cat /tmp/test This is a test 

Booting the ARM and PowerPC targets requires a TFTP server, and tbdev1 workstation now has a configured and tested TFTP server.


       
    Top


    Embedded LinuxR. Hardware, Software, and Interfacing
    Embedded LinuxR. Hardware, Software, and Interfacing
    ISBN: N/A
    EAN: N/A
    Year: 2001
    Pages: 103

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net