From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9870 invoked by alias); 10 Jan 2011 14:14:33 -0000 Received: (qmail 9861 invoked by uid 22791); 10 Jan 2011 14:14:32 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ew0-f49.google.com (HELO mail-ew0-f49.google.com) (209.85.215.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Jan 2011 14:14:27 +0000 Received: by ewy20 with SMTP id 20so8170098ewy.36 for ; Mon, 10 Jan 2011 06:14:25 -0800 (PST) Received: by 10.213.34.193 with SMTP id m1mr15118628ebd.25.1294668865438; Mon, 10 Jan 2011 06:14:25 -0800 (PST) Received: from sg-desktop.belvok.com ([86.57.137.251]) by mx.google.com with ESMTPS id t50sm4799056eeh.6.2011.01.10.06.14.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Jan 2011 06:14:24 -0800 (PST) Date: Mon, 10 Jan 2011 14:14:00 -0000 From: Sergei Gavrikov To: eCos Developers Subject: RedBoot's TFTP client and dumb TFTP servers Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-01/txt/msg00008.txt.bz2 Hi I tried to get working the QEMU's embedded TFTP server with RedBoot's FTP client and the RedBoot's 'load' command always wept, -- "illegal TFTP operation". I did dig that QEMU's TFTP server has the very simple check for a transfer mode: slirp/tftp.c:314 if (memcmp(&tp->x.tp_buf[k], "octet\0", 6) != 0) { tftp_send_error(spt, 4, "Unsupported transfer mode", tp); return; } in a contrast, RedBoot sets a binary transfer as net/tftp_client.c:95 fp = "OCTET"; while (*fp) *cp++ = *fp++; *cp++ = '\0'; According the RFC 1350 'THE TFTP PROTOCOL (REVISION 2)' http://www.ietf.org/rfc/rfc1350.txt (look at the page 5, please) the RedBoot's code does not anything wrong (even obsolete RFC 783 allows any combination of upper and lower case, such as "NETASCII"). However, the first words are mentioned there are all lower-cased. Well, a substitution 's/OCTET/octet/' in tftp_client.c solved the issue with the QEMU TFTP server. However, perhaps, there are a few such TFTP servers like the QEMU's one. It seemed for me that same symptom was reported here: http://sourceware.org/ml/ecos-discuss/2005-06/msg00158.html Q: Whether can we simplify our life patching RedBoot? Is it safe? Well, if I did not miss something, I can generate new report via Bugzilla. Sergei