原厂的SDK编译的内核镜像不做处理的话在开发板上是没有tftp等工具作为开发板与Ubuntu之间文件传输的工具,所以在编译的时候需要通过make menuconfig添加相关的功能!
在make menuconfig后有个Networking Utilities选项在里面添加tftp、tftpd等功能即可。
http://img.my.csdn.net/uploads/201605/15/1463310123_2688.png
http://img.my.csdn.net/uploads/201605/15/1463310124_7808.png
//从Ubuntu中下载文件:g代表get; r 代表远端
tftp -g -r file ip
//向Ubuntu上传文件,p代表put,l代表本地
tftp -p -l file ip
测试:
root@openwrt:~# telnet 10.10.10.254Trying 10.10.10.254...
Connected to 10.10.10.254.
Escape character is '^]'.
Mediatek login: admin
Password:
BusyBox v1.12.1 (2016-05-15 06:32:48 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.
# ls
etc_ro tmp init home lib sbin etc mnt
bin var dev sys proc usr media
# tftp -g -r test.txt 10.10.10.100 //下载文件测试
# ls
etc_ro var home proc etc test.txt
bin init sys sbin media
tmp dev lib usr mnt
# cat test.txt
This is a test file in Ubuntu
#