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. It does handle block number overflow which removes any limits on maximum transfer size. However, tftp-hpa does not seem to support it. However, I might have a patch... Changes in v2: - Cope with block rollover - Don't print amount of data transferred on each block rollover Simon Glass (11): Move simple_itoa() to vsprintf.c Add setenv_ulong() and setenv_addr() net: tftpput: Move ICMP code into its own function net: tftpput: Add support for receiving ICMP packets net: tftpput: Rename TFTP to TFTPGET net: tftpput: move common code into separate functions net: tftpput: Factor out start, restart and next block functions net: tftpput: Support selecting get/put for tftp net: tftpput: add saveaddr and savesize env variables net: tftpput: implement tftp logic net: tftpput: add tftpput command README | 2 + board/hymod/bsp.c | 2 +- board/hymod/fetch.c | 2 +- common/cmd_elf.c | 6 +- common/cmd_net.c | 31 +++++- common/cmd_nvedit.c | 32 ++++++ common/hush.c | 15 --- common/update.c | 2 +- include/common.h | 5 + include/net.h | 27 +++++- lib/vsprintf.c | 16 +++ net/bootp.c | 2 +- net/net.c | 150 ++++++++++++++++++----------- net/tftp.c | 274 +++++++++++++++++++++++++++++++++++++-------------- net/tftp.h | 2 +- 15 files changed, 407 insertions(+), 161 deletions(-) -- 1.7.3.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot