打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
安装Ubuntu 下使用的tftp server (tftpd
这是for Ubuntu 11.04 版本的tftp server 安装与设定方法, 10.x 之前版本略有不同, 找了一整晚才找到正确的设定方法.
如果需要在 "Host" "Target board" 之间交换资料 , 方法之一就是架个 tftp server.
我的Ubuntu 是在VM 里面跑的, 不是本机系统, 需要多作埠号转向, 让本机的69 指到VM 里的69 port.


* 安装tftpd-hpa server *
用apt-get下载并安装root@ubuntu :~# apt-get install tftpd-hpa 修改设定档root@ubuntu :~# vim /etc/default/tftpd-hpa # /etc/default /tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="-l -c -s"









如果是Ubuntu 10.4 之前版本, 设定档内容不同(上面10.4之后的设定找了好久才找到!)
RUN_DAEMON="yes"
OPTIONS = "-l -c -s tftpboot"
 
建立共享目录root@ubuntu :~# mkdir /tftpboot 修改目录下所有档权限(全开,以便上传下载) root@ubuntu :~# chmod 777 -R /tftpboot 修改目录下所有档拥有者及群组root@ubuntu :~# chown nobody.nogroup -R /tftpboot 查看权限是否作用root@ubuntu :~# ls /tftpboot -ld drwxrwxrwx 2 nobody nogroup 4096 2011-10-10 09:51 /tftpboot 建立一个下载用的测试档root@ ubuntu :~# echo "This is a tftpd-hpa testfile" > /tftpboot/testfile 重启tftpd-hpa服务root@ubuntu :~# service tftpd-hpa restart 确认tftp(69埠)是否监听中root@ubuntu :~# netstat -a | grep tftp udp 0 0 *:tftp *:* root@ubuntu :~# * 安装tftp-hpa client * 1.用apt-get下载并安装root@ubuntu :~# apt-get install tftp-hpa 2. VM本机连线测试建立一个即将上传的档案root@ubuntu :~# echo "uploaded file" > 1.txt 连线到localhost ip root@ubuntu :~# tftp 127.0.0.1 显示详细过程verbose 抓取档案get testfile 放档案上去put 1.txt 离开quit




































改用VM外部ip 192.168.33.145连
查看网卡外连ip root@ubuntu :~# ifconfig eth0 | grep addr 用一条指令抓取档案root@ubuntu :~# tftp 192.168.33.145 -v -c get testfile 用一条指令放档案上去  root@ubuntu :~# tftp 192.168.33.145 -v -c put 1.txt






3. Target board测试,连到主电脑ip 192.168.2.110,再利用Port forwarding转到VM ip同样是69埠
查看VM网卡ip root@ubuntu :~# ifconfig eth0 在VMWare设定埠号转向功能,将连到Host 69的连线转到192.168.33.145 69 VMware? Workstation 7.0 ->Editor ->Virtual Network Editor ->VMnet8 ->NAT settings-> Add -> 69, UDP, 192.168.33.145, 69, ubuntu_11_tftp ->OK




开启RS-232连线程式root@ubuntu :~# minicom 接好DMA-6410L开电源到OS(Android) 设定开发板网卡ip # busybox ifconfig eth0 192.168.2.55 进入sd卡的目录(其他目录可能会遇到唯读) # cd /sdcard 抓取档案(从Host电脑抓到板子) # busybox tftp -g -r testfile 192.168.2.110 (注意这里是连到Host ip,不是VM ip ) 显示抓到的档案内容# cat testfile This is a tftpd-hpa testfile 建立一个上传用的档案# echo "DMA-6410L uploaded file" > 2.txt 放档案上去(从板子上传到Host电脑) # busybox tftp -p -l 2.txt 192.168. 2.110
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
ubuntu中配置tftp服务
Ubuntu下tftp服务器搭建
ubuntu下搭建tftp服务器
Ubuntu中安装tftp服务的方法(转)
Ubuntu 14.04 下安装 TFTP/NFS 
ubuntu tftp服务器安装的5个步骤
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服