diff options
author | Junghoon Kim <jhoon20.kim@samsung.com> | 2020-05-14 14:51:00 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2020-10-20 15:13:49 +0900 |
commit | b62c902d828abe12cb6ea340dcddf4511720d18f (patch) | |
tree | 7cf545fd75d7e924f507eaa4f0a5748ee782dc93 /scripts | |
parent | 1ce8889419066b3a45cef3d0a6e93a954fe02992 (diff) | |
download | u-boot-b62c902d828abe12cb6ea340dcddf4511720d18f.tar.gz u-boot-b62c902d828abe12cb6ea340dcddf4511720d18f.tar.bz2 u-boot-b62c902d828abe12cb6ea340dcddf4511720d18f.zip |
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 <jhoon20.kim@samsung.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tizen/sd_fusing_rpi3.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/tizen/sd_fusing_rpi3.sh b/scripts/tizen/sd_fusing_rpi3.sh index e1f61a5203..6e3c52b338 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 "" } |