From: Junghoon Kim Date: Thu, 14 May 2020 05:51:00 +0000 (+0900) Subject: scripts: tizen: Improve the image flashing performance for RPI family X-Git-Tag: accepted/tizen/unified/20200528.132817~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=569faf09a29ce87062166b8b23c4542691bee90f;p=platform%2Fkernel%2Fu-boot.git scripts: tizen: Improve the image flashing performance for RPI family 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 --- diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index e1f61a5..6e3c52b 100755 --- a/scripts/tizen/sd_fusing_rpi3.sh +++ b/scripts/tizen/sd_fusing_rpi3.sh @@ -65,11 +65,12 @@ function fusing_image () { 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 @@ -328,7 +329,7 @@ function check_device () { function print_logo () { echo "" - echo "Raspberry Pi3 downloader, version 1.2" + echo "Raspberry Pi3 downloader, version 1.3" echo "" }