[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek/recipes-support/encrwpart-init/files/encrwpart-init.sh b/meta/meta-mediatek/recipes-support/encrwpart-init/files/encrwpart-init.sh
new file mode 100644
index 0000000..da43b45
--- /dev/null
+++ b/meta/meta-mediatek/recipes-support/encrwpart-init/files/encrwpart-init.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+#       @author
+#       @brief  generate the top index for each module doc
+
+umount #RWPART_MOUNT_DIR#
+
+mount -t ext4 #RWPART_DEVNAME# #RWPART_MOUNT_DIR#
+
+if [ $? -eq 0 ]; then
+	umount #RWPART_MOUNT_DIR#
+	resize2fs -M #RWPART_DEVNAME#
+	dmsetup create $(basename #RWPART_DEVNAME#)_dmcd --table "0 $(blockdev --getsz #RWPART_DEVNAME#) crypt aes-cbc-plain #RWPART_KEYSTR# 0 #RWPART_DEVNAME# 0"
+	if [ $? -eq 0 ]; then
+		dd if=#RWPART_DEVNAME# of=/dev/mapper/$(basename #RWPART_DEVNAME#)_dmcd bs=1M count=#RWPART_FILESYSTEM_SIZE#
+		resize2fs /dev/mapper/$(basename #RWPART_DEVNAME#)_dmcd
+		mount -t ext4 /dev/mapper/$(basename #RWPART_DEVNAME#)_dmcd #RWPART_MOUNT_DIR#
+	else
+		resize2fs #RWPART_DEVNAME#
+		mount -t ext4 #RWPART_DEVNAME# #RWPART_MOUNT_DIR#
+		exit 0
+	fi
+else
+	dmsetup create $(basename #RWPART_DEVNAME#)_dmcd --table "0 $(blockdev --getsz #RWPART_DEVNAME#) crypt aes-cbc-plain #RWPART_KEYSTR# 0 #RWPART_DEVNAME# 0"
+	if [ $? -ne 0 ]; then
+		exit 0
+	fi
+	mount -t ext4 /dev/mapper/$(basename #RWPART_DEVNAME#)_dmcd #RWPART_MOUNT_DIR#
+fi