[T106] add SP1+SP2 rootfs

Change-Id: I12dbfbb86863ee1992cc75db45c6b6ae37409561
diff --git a/rootfs/etc/init.d/rcS b/rootfs/etc/init.d/rcS
new file mode 100755
index 0000000..0cb2386
--- /dev/null
+++ b/rootfs/etc/init.d/rcS
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# Start all init scripts in /etc/rcS.d and /etc/rc5.d
+# executing them in numerical order.
+#
+
+.  /etc/init.d/first.sh
+
+sh /etc/init.d/enter_amt.sh
+if [ $? -eq 0 ]; then
+    echo "enter into amt mode"
+    exit 0
+fi
+
+for i in /etc/rcS.d/S??* ;do
+
+     # Ignore dangling symlinks (if any).
+     [ ! -f "$i" ] && continue
+
+     case "$i" in
+	*.sh)
+	    # Source shell script for speed.
+	    (
+		trap - INT QUIT TSTP
+		set start
+		. $i
+	    )
+	    ;;
+	*)
+	    # No sh extension, so fork subprocess.
+	    $i start
+	    ;;
+    esac
+done
+
+.  /etc/rc.local
+
+sh /etc/lynq_monitor.sh &
+exit 0
+
diff --git a/rootfs/etc/init.d/zcatlog_config.sh b/rootfs/etc/init.d/zcatlog_config.sh
new file mode 100755
index 0000000..0d099dd
--- /dev/null
+++ b/rootfs/etc/init.d/zcatlog_config.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+#jb.qi add for uci check start
+check_copy_file() {
+	if [ $# -ne 2 ];then
+		return
+	fi
+	
+	diff $1 $2 > /dev/null
+	if [ $? -ne 0 ]; then
+		echo "cp $1 $2" > /dev/kmsg
+		cp $1 $2
+	fi
+}
+
+check_uci()
+{
+    uci get lynq_uci.lynq_ril > /dev/null
+    if [ $? -ne 0 ]; then
+        echo "$TAG: lynq_uci config cant get" > /dev/kmsg
+        cp /etc/config/lynq_uci /mnt/userdata/config/lynq_uci
+    fi
+}
+mkdir /mnt/userdata/config
+check_uci
+check_copy_file /etc/config/lynq_uci_ro /mnt/userdata/config/lynq_uci_ro
+
+#jb.qi add for uci check end
+ramdump_mode=`nv get ramdump_mode`
+
+if [ -e /proc/sys/ramdump_ap/ramdump_start_addr ]; then
+  if [ "$ramdump_mode" == "CAPEMMC" ]; then
+    ramdump_dev=`nv get ramdump_emmc_device`
+    if [ -b $ramdump_dev ]; then
+       ramdump_start=`fdisk -l | grep $ramdump_dev | awk '{ print $4 }'`
+       ramdump_save_size=`fdisk -l | grep $ramdump_dev | awk '{ print $6 }'`
+       echo $ramdump_start > /proc/sys/ramdump_ap/ramdump_start_addr
+       echo $ramdump_save_size > /proc/sys/ramdump_ap/ramdump_emmc_size
+    else
+       echo "[zxic_ramdump]$ramdump_dev is not exist!"
+    fi
+  else
+    if [ -b $ramdump_dev ]; then
+      echo 0 > /proc/sys/ramdump_ap/ramdump_start_addr
+    fi
+  fi
+fi
+# 0 for usb, 1 for net
+if [ -e /proc/sys/zcatkern/log_com_mode ]; then
+  zcat_com_mode=`nv get zcat_mode`
+  if [ "$zcat_com_mode" == "net" ]; then
+    echo 1 > /proc/sys/zcatkern/log_com_mode
+  else
+    echo 0 > /proc/sys/zcatkern/log_com_mode
+  fi
+#  sh /etc/zcatlog_monitor.sh &
+fi
+