From: Ben Gras Date: Fri, 12 Sep 2014 10:34:13 +0000 (+0200) Subject: small arm image script changes X-Git-Tag: v3.3.0~4 X-Git-Url: http://zhaoyanbai.com/repos//%22http:/www.isc.org/%22?a=commitdiff_plain;h=8d311af7ae4d6637b8a3bf58b6e5186c8cefb2f9;p=minix.git small arm image script changes . let you specify IMG as a block device directly. this minimizes i/o (only write used parts of the filesystem) and so turnaround time - while still allowing the big default FS size. Change-Id: Ib738499464e0d350a474a706f688d3f10806207d --- diff --git a/releasetools/arm_sdimage.sh b/releasetools/arm_sdimage.sh index 8ac02ec02..8e2d109ae 100755 --- a/releasetools/arm_sdimage.sh +++ b/releasetools/arm_sdimage.sh @@ -137,7 +137,12 @@ fi # # Artifacts from this script are stored in the IMG_DIR # -rm -rf ${IMG_DIR} ${IMG} +rm -rf ${IMG_DIR} + +if [ -f ${IMG} ] # IMG might be a block device +then rm -f ${IMG} +fi + mkdir -p ${IMG_DIR} # @@ -288,7 +293,7 @@ _HOME_SIZE=$((`${CROSS_TOOLS}/nbmkfs.mfs -I $((${HOME_START} * 512)) -b $((${HOM # Write the partition table using the natively compiled # minix partition utility # -${CROSS_TOOLS}/nbpartition -m ${IMG} ${FAT_START} "c:${FAT_SIZE}*" \ +${CROSS_TOOLS}/nbpartition -f -m ${IMG} ${FAT_START} "c:${FAT_SIZE}*" \ 81:${_ROOT_SIZE} 81:${_USR_SIZE} 81:${_HOME_SIZE} #