红联Linux门户
Linux帮助

imx283与Linux主机在tftp命令格式的不同

发布时间:2016-12-07 10:13:19来源:linux网站作者:当今明月
Linux主机在配置成功tftp服务器之后,主机测试成功的情况下,在283目标板上却不可使用。
 
过程是这个样子的:
 
Linux主机:
linux@linux-virtual-machine:~$ tftp 192.168.1.231
tftp> get hello 
tftp> q     
linux@linux-virtual-machine:~$ ls
examples.desktop  hello  nfs  公共的  模板  视频  图片  文档  下载  音乐  桌面
 
可以发现hello已经成功从tftp下载下来。
 
但是在目标板imx283上面 使用相同指令得到如下结果:
[root@M28x ~]# tftp 192.168.1.231
BusyBox v1.18.4 (2016-12-7 9:41:22 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g      Get file
-p      Put file
-b SIZE Transfer blocks of SIZE octets
 
很明显格式不正确,但是这个格式说明让我更加摸不到北。
 
于是乎:
[root@M28x ~]# tftp -rg 192.168.1.231:/hello
BusyBox v1.18.4 (2016-12-7 9:41:22 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g      Get file
-p      Put file
-b SIZE Transfer blocks of SIZE octets
[root@M28x ~]# tftp -r 192.168.1.231        
BusyBox v1.18.4 (2016-12-7 9:41:22 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g      Get file
-p      Put file
-b SIZE Transfer blocks of SIZE octets
[root@M28x ~]# tftp -r 192.168.1.231 -g hello
tftp: bad address 'hello'
[root@M28x ~]# tftp -r 192.168.1.231 -g  /hello
tftp: bad address '/hello'
[root@M28x ~]# tftp -g 192.168.1.231:/hello
BusyBox v1.18.4 (2016-12-7 9:41:22 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g      Get file
-p      Put file
-b SIZE Transfer blocks of SIZE octets
 
各种尝试之后,终于找到了正确的格式:
[root@M28x opt]# tftp 192.168.1.231 -g -r hello
[root@M28x opt]# ls
hello     my_first*
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26658.html