使用三星的u-boot 1.3.4 (s5pv210)进行tftp下载时会报错Unsupported option(s) requested。
抓包,对比数据包:
1. 出错时:
4141 165.004439 192.168.1.74 192.168.1.72 TFTP 88 Read Request, File: u-boot.bin, Transfer type: octet, timeout\000=5000\000, blksize\000=1468\000
4142 165.005507 192.168.1.72 192.168.1.74 TFTP 78 Error Code, Code: Option negotiation failed, Message: Unsupported option(s) requested
63 11.973278 192.168.1.74 192.168.1.72 TFTP 87 Read Request, File: u-boot.bin, Transfer type: octet, timeout\000=5000\000, blksize\000=1468\000
2. 当使用xp的tftp32作为服务器时,能正常下载(说明tftp32兼容性较好):
1052 188.354447 192.168.1.74 192.168.1.73 TFTP 87 Read Request, File: u-boot.bin, Transfer type: octet, timeout\000=5000\000, blksize\000=1468\000
3. 使用uboot2015的正常tftp数据包为:
5162 307.915968 192.168.1.74 192.168.1.72 TFTP 84 Read Request, File: u-boot.bin, Transfer type: octet, timeout\000=5\000, blksize\000=1468\000
5163 307.916477 192.168.1.72 192.168.1.74 TFTP 67 Option Acknowledgement, timeout\000=5\000, blksize\000=1468\000
对比可以发现timeout不能设置为5000UL
解决办法:修改net/tftp.c源码中
#define TIMEOUT 5000UL
修改为:#define TIMEOUT 5UL
补充:实际上,更换tftp服务器软件也能解决该问题,根据我的经验,
linux下的openbsd-inetd和windows下的tftp32这2款软件兼容性较好
阅读(3150) | 评论(0) | 转发(0) |