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

Simon Glass sjg at chromium.org
Sat Oct 22 18:15:08 CEST 2011


Hi Albert,

On Sat, Oct 22, 2011 at 1:21 AM, Albert ARIBAUD
<albert.u.boot at aribaud.net> wrote:
> 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?

I think about 1468 * 65535 - around 95MB - it's fairly easy to fix
just by copying out the existing tftp get wrap code. I put it in the
commit message so it wouldn't get lost.

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

I will see if I can organise one at Denx.

Regards,
Simon

>
> Amicalement,
> --
> Albert.
>


More information about the U-Boot mailing list