The current dd of the pv combination degrades the performance due to the
pipe overhead and is also bad to see due to the duplicate output.
It can be resolved by the use of direct mode with progress status. This
reduces the flashing time of platform images by 17.5% in my environment.
Change-Id: I986ce72e0294b6f143ca95419364a0f89f289d74
Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
return
fi
- local -r input_size=`du -b $fusing_img | awk '{print $1}'`
+ local input_size=`du -b $fusing_img | awk '{print $1}'`
+ input_size=`expr $input_size / 1024 / 1024`
- print_message 2 "[Fusing $1]"
+ print_message 2 "[Fusing $1 ($input_size MiB)]"
umount $device
- dd if=$fusing_img | pv -s $input_size | dd of=$device bs=$bs
+ dd if=$fusing_img of=$device bs=$bs status=progress oflag=direct
local -r fstype=`blkid -o value -s TYPE $device`
if [[ "$fstype" =~ "ext" ]]; then
function print_logo () {
echo ""
- echo "Raspberry Pi3 downloader, version 1.2"
+ echo "Raspberry Pi3 downloader, version 1.3"
echo ""
}