bcm53xx: sysupgrade: optimize building UBI image
authorRafał Miłecki <rafal@milecki.pl>
Thu, 20 Feb 2020 12:40:55 +0000 (13:40 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 7 Apr 2020 13:49:56 +0000 (15:49 +0200)
commit35413b047c2c2d2229165ef021a4ef801ca16eb8
treee42af5fd4d53e43aac210830373041311075f6ef
parent55c29c398c2f4f290b5154c8daeff0f5069273b4
bcm53xx: sysupgrade: optimize building UBI image

Use "truncate" to adjust size of existing file instead of "dd" which
required creating a copy. This saves space on tmpfs. It may be as low
as 2.1 MiB when using OpenWrt default user space and way more (20+ MiB)
when flashing vendor firmware.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 8abefc8896e7138a101fbb3d228946c43321503e)
target/linux/bcm53xx/base-files/lib/upgrade/platform.sh