Re: [LEDE-DEV] [PATCH] uboot-lantiq: Enable TFTP PUT support for backups

2017-08-12 Thread Carl-Daniel Hailfinger
On 12.08.2017 22:29, John Crispin wrote:
> On 12/08/17 19:04, Carl-Daniel Hailfinger wrote:
>> Backing up the current firmware from U-Boot over serial can take hours.
>> Booting a working Linux image for backup purposes is not always an
>> option.
>> Using the tftpput command in U-Boot is the fastest and easiest way.
>>
>> tftpput will upload the contents of a memory region to the TFTP server.
>> The IP address of the server is stored in the serverip variable.
>>
>> Usage:
>> tftpput   
>>
>> Example for a complete flash backup of an o2 Box 6431 (VGV7510KW22):
>> VGV7510KW22 # tftpput 0xB000 0x100 o2boxbackup.bin
>>
>> Signed-off-by: Carl-Daniel Hailfinger
>> 
> Hi,
>
> by how much does this increase the binary size ?

Hi John,

I made a list of u-boot sizes without and with the feature:
https://bugs.lede-project.org/index.php?do=details_id=956
The size increase is roughly 1300 Bytes, and no 64kB boundary will be
crossed for the lantiq targets.

It might be a nice feature for other targets as well, considering that
dumping the flash of my router over serial took 20 hours, whereas it
took less than 30 seconds with tftpput. With that speed, it's even
practical to make full backups of working LEDE installations.

Regards,
Carl-Daniel

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] uboot-lantiq: Enable TFTP PUT support for backups

2017-08-12 Thread John Crispin


On 12/08/17 19:04, Carl-Daniel Hailfinger wrote:

Backing up the current firmware from U-Boot over serial can take hours.
Booting a working Linux image for backup purposes is not always an option.
Using the tftpput command in U-Boot is the fastest and easiest way.

tftpput will upload the contents of a memory region to the TFTP server.
The IP address of the server is stored in the serverip variable.

Usage:
tftpput   

Example for a complete flash backup of an o2 Box 6431 (VGV7510KW22):
VGV7510KW22 # tftpput 0xB000 0x100 o2boxbackup.bin

Signed-off-by: Carl-Daniel Hailfinger 

Hi,

by how much does this increase the binary size ?

John




---
  .../patches/0022-MIPS-lantiq-add-default-openwrt-config.patch  | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch
 
b/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch
index 3b50c98..20bff44 100644
--- 
a/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch
+++ 
b/package/boot/uboot-lantiq/patches/0022-MIPS-lantiq-add-default-openwrt-config.patch
@@ -8,7 +8,7 @@ Signed-off-by: Daniel Schwierzeck 
  
  --- /dev/null

  +++ b/include/configs/openwrt-lantiq-common.h
-@@ -0,0 +1,39 @@
+@@ -0,0 +1,40 @@
  +/*
  + * Copyright (C) 2013 Luka Perkov 
  + *
@@ -21,6 +21,7 @@ Signed-off-by: Daniel Schwierzeck 

  +/* Commands */
  +#if defined(CONFIG_LTQ_SUPPORT_ETHERNET)
  +#define CONFIG_CMD_PING
++#define CONFIG_CMD_TFTPPUT
  +#endif
  +
  +/* Compression */



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev