[U-Boot] [PATCH 0/8] Add tftpput command for uploading files over network

Simon Glass sjg at chromium.org
Sat Oct 22 06:51:32 CEST 2011


The tftpboot command permits reading of files over a network interface
using the Trivial FTP protocol. This patch series adds the ability to
transfer files the other way.

Why is this useful?

- Uploading boot time data to a server
- Uploading profiling information
- Uploading large mounts of data for comparison / checking on a host
    (e.g. use tftpput and ghex2 instead of the 'md' command)

Mostly the existing code can be re-used and I have tried to avoid too
much refactoring or cleaning up.

The feature is activated by the CONFIG_CMD_TFTPPUT option.

This has been very lightly tested on a Seaboard with a USB network
adaptor. I don't think it handles block number overflow.


Simon Glass (8):
  Move simple_itoa to vsprintf
  Add setenv_uint() and setenv_addr()
  tftpput: Rename TFTP to TFTPGET
  tftpput: move common code into separate functions
  tftpput: support selecting get/put for tftp
  tftpput: add save_addr and save_size global variables
  tftpput: implement tftp logic
  tftpput: add tftpput command

 README                   |    2 +
 common/cmd_net.c         |   31 +++++++-
 common/cmd_nvedit.c      |   31 ++++++++
 common/hush.c            |   15 ----
 include/common.h         |    5 +
 include/config_cmd_all.h |    1 +
 include/net.h            |    8 +-
 lib/vsprintf.c           |   16 ++++
 net/bootp.c              |    2 +-
 net/net.c                |   22 +++---
 net/tftp.c               |  189 +++++++++++++++++++++++++++++++++-------------
 net/tftp.h               |    2 +-
 12 files changed, 238 insertions(+), 86 deletions(-)

-- 
1.7.3.1



More information about the U-Boot mailing list