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

Albert ARIBAUD albert.u.boot at aribaud.net
Sat Oct 22 10:21:18 CEST 2011


Le 22/10/2011 06:51, Simon Glass a écrit :
> 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)

Especially I find it interesting for backing up things like MTD and 
small disk files (not partitions, though). Most of my work currently is 
trying to bring mainline U-Boot support to existing boards with bad 
U-Boot implementations, and being able to backup things from U-Boot (as 
opposed to having to set up NFS root and Linux boot) would definitely be 
a plus.

> 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.

What size does this limit transfers to?

> 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

Many U-Boot environments use 'tftp' as a shorthand to tftpboot. Did you 
verify that this is not broken by the introduction of 'tftpput'?

Also, I'd be happy to test this if a branch exists that already holds 
these commits.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list