Skip to content

Commit

Permalink
envsetup.sh: Add a real time progress bar for SD card flashing
Browse files Browse the repository at this point in the history
pv is a utility thats needed on build host

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Oct 16, 2018
1 parent dc5db54 commit 078f7fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
which aptitude >/dev/null 2>&1
ret=$?
if [ "$(readlink /bin/sh)" = "dash" -a "$ret" = "0" ]; then
sudo aptitude install expect -y
sudo aptitude install expect pv -y
expect -c 'spawn sudo dpkg-reconfigure -freadline dash; send "n\n"; interact;'
elif [ "${0##*/}" = "dash" ]; then
echo "dash as default shell is not supported"
Expand Down Expand Up @@ -444,5 +444,5 @@ yoe_install_wic_image() {

IMAGE=${OE_BASE}/build/tmp/deploy/images/${MACHINE}/${IMAGE_NAME}-${MACHINE}.wic.xz

xzcat $IMAGE | sudo dd of=$DRIVE bs=4M iflag=fullblock oflag=direct conv=fsync status=progress
pv -tpreb $IMAGE | xzcat | sudo dd of=$DRIVE bs=4M iflag=fullblock oflag=direct conv=fsync
}

0 comments on commit 078f7fe

Please sign in to comment.