Instead of make install to the system, just modify the script file to point to this newly build sfdisk so that it does not change other tools; which are:
vmuser@ubuntu:~/Temp/8dv-android-beta-mybuilt$ diff fsl-sdcard-partition.sh fsl-sdcard-partition-mod.sh
71c71
< sfdisk_version=`sfdisk -v | awk '{print $4}' | awk -F '.' '{print $2}'`
---
> sfdisk_version=`/home/vmuser/Temp/util-linux-2.26.2/sfdisk -v | awk '{print $4}' | awk -F '.' '{print $2}'`
83c83
< total_size=`sfdisk -s ${node}`
---
> total_size=`/home/vmuser/Temp/util-linux-2.26.2/sfdisk -s ${node}`
132c132
< dd if=${systemimage_raw_file} of=${node}${part}5 conv=fsync
---
> dd if=${systemimage_raw_file} of=${node}${part}5 conv=fsync bs=4096
142c142
< sfdisk --force ${opt_unit} ${node} << EOF
---
> /home/vmuser/Temp/util-linux-2.26.2/sfdisk --force ${opt_unit} ${node} << EOF
162c162
< sfdisk --force ${opt_unit} ${node} -N1 << EOF
---
> /home/vmuser/Temp/util-linux-2.26.2/sfdisk --force ${opt_unit} ${node} -N1 << EOF
vmuser@ubuntu:~/Temp/8dv-android-beta-mybuilt$
Also, when doing dd of the raw system image, I add the option “bs=4096”, which could greatly increase the speed to program the SD card image, especially run on vmimage.
Remember to install this package to get “simg2img” being used in the script file.
$ sudo apt-get install android-tools-fsutils