做嵌入式开发,调试功能常常需要替换Binary文件,如.so或执行档,用U盘拷贝效率较低。如果系统有集成busybox,则可以用tftp来代替U盘拷贝。
命令说明如下:
BusyBox v1.19.2 (2011-11-10 14:20:50 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
-b SIZE Transfer blocks of SIZE octets
For example
板子与我们的Windows电脑在同一局域网,电脑端打开tftpd32,并设定好路径。
在板子上,则可以透过以下命令
Get a file from PC:
busybox tftp -g -r [filename] [IP of PC]
Put a file to PC:
busybox tftp -p -r [filename] [IP of PC]