I'm running 64-bit Ubuntu 10.04. I followed http://processors.wiki.ti.com/index.php/Setting_Up_a_TFTP_Server to set up tftpd-hpa, but haven't been able to get it to work. No tftp process is running ("netstat -a | grep tftp" returns nothing), but when I use the command: "sudo service tftpd-hpa start", it says tftpd-hpa is already running. I edited the /etc/default/tftpd-hpa file as instructed, but I can't ftp files using my custom board or my Windows machine (pinging the Linux Host's IP Address works for both).
Any ideas?
Hello,
The TFTP server is managed by xinetd. You need to make sure xinetd is installed and that you have en entry such as this in /etc/xinet.d/tftp:
service tftp{protocol = udpport = 69socket_type = dgramwait = yesuser = nobodyserver = /usr/sbin/in.tftpdserver_args = /tftprootdisable = no}
Then run /etc/init.d/xinetd restart
Note that if you use DVSDK 4.00 (announced at the top of this forum) this is done for you by the setup script. Just make sure you have ia32-libs installed on your 64-bit host before installing.
Regards, Niclas
The behaviour is different on my Windows machine: it now times out instead saying that the connection was refused. The timeout is for GET and PUT. My custom board has the same behaviour as before: still times out when trying to get uImage. "Netstat -a | grep tftp" does return a tftp process now.
Hi Inderjit,
I had problems using tftpd in a VMware virtual machine. I solved the problem momentarily making a script that configures TFTP server in a Ubuntu 10.04 live session. I just execute it and then I can download images from the board. Maybe it helps you:
#!/bin/bash# ======================================# SCRIPT TO INSTALL AND CONFIGURE UBUNTU# TFTP SERVER TO WORK WITH OMAP-L138 EVM# ======================================# By cerilet.com# Install TFTP client and server and SSHsudo apt-get install tftpd-hpa tftp-hpa ssh# Changing permissions of directory /var/lib/tftpbootsudo chmod 777 /var/lib/tftpboot# Change configuration of tftpd-hpa and add this# RUN_DAEMON="yes"# OPTIONS="-c -l -s /tftpboot"sudo mv /etc/default/tftpd-hpa /etc/default/tftpd-hpa_ORIGINAL# Downloading the new configuration file from my serversudo wget -O /etc/default/tftpd-hpa http://cerilet.com/omap/tftpd-hpa# Start the serversudo /etc/init.d/tftpd-hpa start# Downloading kernel and filesystem images from serverwget -O /var/lib/tftpboot/uImage_arago http://cerilet.com/omap/uImage_aragowget -O /var/lib/tftpboot/uImage_dani http://cerilet.com/omap/uImage_daniwget -O /var/lib/tftpboot/uImage_dani2 http://cerilet.com/omap/uImage_dani2wget -O /var/lib/tftpboot/uImage_DaVinci http://cerilet.com/omap/uImage_DaVinciwget -O /var/lib/tftpboot/arago.ext2.gz http://cerilet.com/omap/arago.ext2.gzwget -O /var/lib/tftpboot/arago.jffs2 http://cerilet.com/omap/arago.jffs2wget -O /var/lib/tftpboot/arago.tar.gz http://cerilet.com/omap/arago.tar.gzwget -O /var/lib/tftpboot/evm-demo-img.ext2.gz http://cerilet.com/omap/evm-demo-img.ext2.gz# wget -O /var/lib/tftpboot/evm-demo-img.jffs2 http://cerilet.com/omap/evm-demo-img.jffs2# wget -O /var/lib/tftpboot/evm-demo-img.tar.gz http://cerilet.com/omap/evm-demo-img.tar.gz# Changing password of the live CD usersudo passwd ubuntu
Regards,
Cerilet.
Thanks. I didn't run the full script, just the following:
sudo apt-get install tftpd-hpa tftp-hpa ssh
sudo chmod 777 /var/lib/tftpboot
sudo mv /etc/default/tftpd-hpa /etc/default/tftpd-hpa_ORIGINAL
sudo wget -O /etc/default/tftpd-hpa http://cerilet.com/omap/tftpd-hpa
I then rebooted the machine, and the behaviour is the same: all attempts to use tftp time out.
Had you reviewed the iptables configuration? Or maybe if you are using a router have to open the tftp port (69).
Take a look to this post:
http://blog.colovirt.com/2009/03/31/linuxnetworkingsecurity-tftp-deamon-setup-and-cisco-configuration-backup/
The settings that work for PC to Linux Box:
/etc/default/tftpd-hpa:
#Defaults for tftpd-hpaRUN_DAEMON=”yes”OPTIONS=”-c -l -s /tftpboot”
/etc/xinetd.d/tftp
service tftp{protocol = udpport = 69socket_type = dgramwait = yesuser = rootserver = /usr/sbin/in.tftpdserver_args = -c -s /tftpbootdisable = noper_source = 11cps = 100 2}
Commenting out "ftp dgram udp4 wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot" in /etc/inetd.conf does not seem to make a difference, and neither does "root" vs. "nobody" as the owner of /tftpboot. "user = root" in /etc/xinetd.d/tftp vs "nobody" does make a difference: TFTP does not work on the Window PC to the Linux Host without it.
For the custom board, I'm getting some results. Instead of a "*" turning into a series of "T"s (indicating timeouts), I'm now getting some "#"s, but a lot more "T"s. This may be a hardware or U-Boot issue, but it's odd that the router can assign an IP address to the board (which can be picked up by DCHP on the custom board), and ping works to the Linux Box and Windows PC from the custom board.
Not sure why, but it's working on the custom board now. I set "unsigned int emac_dbg = 1;" in ether.c (u-boot), and it worked. Setting it back to 0 also works. Perhaps I handn't done a full build of u-boot in a while. One timeout in downloading the root file system - not sure what's causing it.
I am having similar issues getting DM355 PSP 3.1 - to TFTP Boot. I have followed all the items on the wiki, e2e and even some google ubuntu/tftp searches but still stuck.
Here is my /etc/init.d/xinetd and /etc/default/tftp-hpa files:
# /etc/default/tftpd-hpaRUN_DAEMON="yes"USERNAME="tftp"# DIRECTORY="/srv/tftp"DIRECTORY="/tftpboot"ADDRESS="0.0.0.0:69"OPTIONS="-c -l -s /tftpboot"
user@marc-laptop:/etc/xinetd.d$ cat tftpservice tftp{protocol = udpport = 69socket_type = dgramwait = yesuser = root server = /usr/sbin/in.tftpdserver_args = -c -l -s /tftpbootper_source = 11cps = 100 2disable = no}
I keep getting 'Could Not establish Link'
DM355 EVM > tftp 0x80700000 uImagedm9000 i/o: 0x4014000, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 00:0e:99:02:ce:78could not establish linkTFTP from server 192.168.1.2; our IP address is 192.168.1.3Filename 'uImage'.Load address: 0x80700000Loading: T AbortDM355 EVM > CTRL-A Z for help |115200
Marc,
Can you share your bootargs as well as your environment settings? I want to see how DHCP or your static IP is setup as well as all the other network and environment settings.
Jeff
Jeff,
DM355 EVM > pribootdelay=4baudrate=115200bootcmd=dhcp;bootmserverip=192.168.1.2bootfile=uImagenfshost=192.168.1.2rootpath=/home/user/workdir/filesystemethaddr=00:0e:99:02:ce:78bootargs=console=ttyS0,115200n8 rw noinitrd root=/dev/nfs nfsroot=192.168.1.2:/home/user/workdir/filesystem,nolock mem=116M ip=dhcpstdin=serialstdout=serialstderr=serialvideostd=ntscver=U-Boot 2009.03 (Jun 21 2010 - 15:13:07)ipaddr=192.168.1.3gatewayip=192.168.1.1netmask=255.255.255.0dnsip=192.168.1.1Environment size: 481/524284 bytesDM355 EVM > tftp 0x80700000 uImagedm9000 i/o: 0x4014000, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 00:0e:99:02:ce:78operating at 100M full duplex modeTFTP from server 192.168.1.2; our IP address is 192.168.1.3Filename 'uImage'.Load address: 0x80700000Loading: T T T T TAbort
DM355 EVM > dhcpdm9000 i/o: 0x4014000, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 00:0e:99:02:ce:78could not establish linkBOOTP broadcast 1BOOTP broadcast 2AbortDM355 EVM >
Along w/ environment and the previous post w/ /etc/xinet.d/tftp and /etc/default/tftp-hpa files, i have done the following to restart the services. Still no success?
user@marc-laptop:/etc/xinetd.d$ sudo service tftpd-hpa restarttftpd-hpa start/running
user@marc-laptop:/etc/xinetd.d$ sudo service xinetd restart * Stopping internet superserver xinetd [ OK ] * Starting internet superserver xinetd [ OK ] user@marc-laptop:/etc/xinetd.d$
I would advise people who don't know whether the problem is the linux server or the embeded client to use another PC as a client to tftp a file and eliminate one of the two possibilities.
John A
I would try this but another complete setup, 'Ubuntu HOST' + 'DM355 EVM' at another site is experiencing the same problem. I have been playing w/ the
/etc/xinetd.conf/etc/xinetd.d/tftp/etc/default/tftp-hpa
files and i'm now NOT getting 'could not establish link', and instead its just timing out.
DM355 EVM > tftp 0x80700000 uImage_dm355dm9000 i/o: 0x4014000, id: 0x90000a46 DM9000: running in 16 bit modeMAC: 00:0e:99:02:ce:78operating at 100M full duplex modeTFTP from server 192.168.1.2; our IP address is 192.168.1.3Filename 'uImage_dm355'.Load address: 0x80700000Loading: T T T AbortDM355 EVM >
======================================================
I've also tried to tftp locally to take the EVM out of the equation.
user@marc-laptop:/etc/xinetd.d$ sudo tftp -v localhost -c get uImage_dm355 Connected to localhost (::1), port 69 getting from localhost:uImage_dm355 to uImage_dm355 [netascii] Transfer timed out.
So there must be something wrong w/ my xinetd and/or tftp-hpa setup?
I have also verified the Firewall is off.
The following is something I found off the internet when I first set up my TFTP. I didn't use the method in the DVSDK.
Installing and setting TFTPD in Ubuntu
by David Sudjiman ~ March 27th, 2006. Filed under: Linux.
1. Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
2. Create /etc/xinetd.d/tftp and put this entry:
service tftp
{ protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no
}
3. Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
4. Restart xinetd
$ sudo /etc/inet.d/xinetd restart
John,
I went through these steps several times to no avail. I went as far as removing tftp-hpa and reinstalling it. Still stuck.