Add sysdump and appdump support(Default is close)

Change-Id: I26264bb2763a76e997fb878e34550c0ee482b844
diff --git a/mbtk/rootfs/etc/init.d/mbtk_boot_normal b/mbtk/rootfs/etc/init.d/mbtk_boot_normal
index 2ab83c8..8e0f8f4 100755
--- a/mbtk/rootfs/etc/init.d/mbtk_boot_normal
+++ b/mbtk/rootfs/etc/init.d/mbtk_boot_normal
@@ -27,6 +27,14 @@
 	echo "--mbtk normal boot start--" > /dev/kmsg
 #	mbtk_start /bin/mbtk_test
 #	mbtk_start /bin/mbtk_test "normal" 123
+
+	# ÆôÓÃapp dump
+	DEBUG_ENABLE=`getprop persist.mbtk.appdump 2> /dev/null`
+	if [ "$DEBUG_ENABLE" == "1" ];then
+		ulimit -c unlimited
+		[ ! -d /oemdata/dump ] && mkdir -p /oemdata/dump
+		[ -f /proc/sys/kernel/core_pattern ] && echo "/oemdata/dump/coredump-%e-%s-%t" > /proc/sys/kernel/core_pattern
+	fi
 	
 	[ -e /bin/mbtk_adbd ] && mbtk_start /bin/mbtk_adbd
 	[ -e /bin/mbtk_servicesd ] && mbtk_start_with_try /bin/mbtk_servicesd