[U-Boot] [PATCH v3 0/5] TFTP server

Luca Ceresoli luca.ceresoli at comelit.it
Tue May 17 12:03:36 CEST 2011


This patch series adds to U-Boot the ability to receive a file via TFTP acting
as a server, instead of a client.

I rebased v3 on top of the net/tftp.c cleanup work that I submitted recently
(http://lists.denx.de/pipermail/u-boot/2011-May/092599.html) and removed all
the cleanups from this patchset.

Patches 1 and 2 of v2 have already been committed to master, so the remaining
patches shifted back by two.

Finally, I incorporated all changes requested on the ml.

Description:

The implementation is kept simple:
- receive only (accept WRQ from remote client, not RRQ);
- the Filename in the WRQ is ignored: the destination is always a user-provided
  memory location;
- binary transfers only: the Mode in the WRQ is ignored; this is allowed by
  RFC1350 (section 5);
- no TFTP Option Extensions (RFC2347);
- no TFTP multicast.

The implementation is discussed here:
http://lists.denx.de/pipermail/u-boot/2011-April/090405.html

Once it has started, the server is stopped like the client is: on a complete
file reception, Ctrl-C and after waiting 5 seconds for 10 times.

The first two patches are preliminary cleanups and extensions to the current
code.

The third patch implements the core TFTP server.

The fourth patch adds a user command to launch the server.

I also added a trailing patch (#5 in this series), a trivial typo fix
requested by Detlev.

Luca

Luca Ceresoli (5):
  TFTP: replace "server" with "remote" in local variable names
  TFTP: rename STATE_RRQ to STATE_SEND_RRQ
  TFTP: net/tftp.c: add server mode receive
  TFTP: add tftpsrv command
  net/tftp.c: fix typo

 README           |    1 +
 common/cmd_net.c |   17 +++++++++
 include/net.h    |    3 +-
 net/net.c        |    7 +++-
 net/tftp.c       |   98 +++++++++++++++++++++++++++++++++++++++++------------
 net/tftp.h       |    6 +++
 6 files changed, 108 insertions(+), 24 deletions(-)



More information about the U-Boot mailing list