[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/src/bach/build.bach/tools/pack_one_image.sh b/src/bach/build.bach/tools/pack_one_image.sh
new file mode 100755
index 0000000..f81268c
--- /dev/null
+++ b/src/bach/build.bach/tools/pack_one_image.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+
+usage()
+{
+ printf "The right format is:\n"
+ printf "./pack_one_image.sh <PATH_TO_IMAGE_DIR> <PARTITION_SIZE> <EXT4_IMAGE_NAME> \n"
+ exit
+}
+
+
+
+OUTDIR=`pwd`
+if [ -d "$1" ]; then
+ TARDIR=$OUTDIR/out/
+ if [ $2 ] && [ $3 ]; then
+ set -e
+ $OUTDIR/tools/make_ext4fs -s -j 1 -l $2 $TARDIR/one_sparse.img $1 1> /dev/null
+ $OUTDIR/tools/simg2img $TARDIR/one_sparse.img $TARDIR/$3
+ set +e
+ else
+ usage
+ fi
+else
+ usage
+fi
+
+
+rm -f $TARDIR/one_sparse.img
+
+
+