From 8d311af7ae4d6637b8a3bf58b6e5186c8cefb2f9 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 12 Sep 2014 12:34:13 +0200 Subject: [PATCH] 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 --- releasetools/arm_sdimage.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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} # -- 2.44.0