From: Sergei Gavrikov <sergei.gavrikov@gmail.com>
To: eCos Developers <ecos-devel@ecos.sourceware.org>
Subject: RedBoot's TFTP client and dumb TFTP servers
Date: Mon, 10 Jan 2011 14:14:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.00.1101101558110.16703@sg-desktop.belvok.com> (raw)
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
next reply other threads:[~2011-01-10 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 14:14 Sergei Gavrikov [this message]
2011-01-10 14:31 ` Gary Thomas
2011-01-10 14:48 ` Sergei Gavrikov
2011-01-13 20:57 ` Sergei Gavrikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1101101558110.16703@sg-desktop.belvok.com \
--to=sergei.gavrikov@gmail.com \
--cc=ecos-devel@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).