mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
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>
This commit is contained in:
parent
612a93564c
commit
3267ce750e
@ -274,11 +274,11 @@ platform_pre_upgrade() {
|
|||||||
platform_trx_from_chk_cmd() {
|
platform_trx_from_chk_cmd() {
|
||||||
local header_len=$((0x$(get_magic_long_at "$1" 4)))
|
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() {
|
platform_trx_from_cybertan_cmd() {
|
||||||
echo -n dd bs=32 skip=1
|
echo -n dd skip=32 iflag=skip_bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_img_from_safeloader() {
|
platform_img_from_safeloader() {
|
||||||
|
Loading…
Reference in New Issue
Block a user