diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-12-23 23:14:25 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2017-12-29 23:18:45 +0100 |
commit | 3267ce750e491ba0290ec3a9a5e3b4dceadd47a5 (patch) | |
tree | f9cf50b7a053d0faa29562b6d20f4b6a2d73e589 /target | |
parent | 612a93564ce24d05c039669f50b64cfad1cdffde (diff) | |
download | upstream-3267ce750e491ba0290ec3a9a5e3b4dceadd47a5.tar.gz upstream-3267ce750e491ba0290ec3a9a5e3b4dceadd47a5.tar.bz2 upstream-3267ce750e491ba0290ec3a9a5e3b4dceadd47a5.zip |
bcm53xx: use iflag=skip_bytes for dd command during sysupgrade
Since BusyBox 1.25.0 dd command supports iflag=skip_bytes which allows
skipping requested amount of bytes without reducing blocksize. Thanks to
this we can leave default blocksize and let dd work more efficiently.
On Netgear R6250 "dd skip=58 iflag=skip_bytes" can be 5 times faster
than "dd bs=58 skip=1" when extracting TRX out of CHK.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 1a33e3a447..06451f17fd 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -274,11 +274,11 @@ platform_pre_upgrade() { platform_trx_from_chk_cmd() { local header_len=$((0x$(get_magic_long_at "$1" 4))) - echo -n dd bs=$header_len skip=1 + echo -n dd skip=$header_len iflag=skip_bytes } platform_trx_from_cybertan_cmd() { - echo -n dd bs=32 skip=1 + echo -n dd skip=32 iflag=skip_bytes } platform_img_from_safeloader() { |