[T106] add SP1+SP2 rootfs
Change-Id: I12dbfbb86863ee1992cc75db45c6b6ae37409561
diff --git a/rootfs/etc/config/lynq_uci b/rootfs/etc/config/lynq_uci
new file mode 100755
index 0000000..aef436c
--- /dev/null
+++ b/rootfs/etc/config/lynq_uci
@@ -0,0 +1,45 @@
+config lynq_ril_rw 'lynq_ril'
+ option serverport '8000'
+
+config lynq_log_rw 'lynq_log'
+ option thhandle_level '0'
+ option function_test_level '0'
+
+config lynq_wifi_rw 'lynq_wifi'
+ option gateway '192.168.11.1'
+
+config lynq_sync_time_rw 'lynq_sync_time'
+ option lynq_modem_sync_time_enable '1'
+ option lynq_gnss_sync_time_enable '0'
+config lynq_autosuspend 'lynq_autosuspend'
+ option auto_enable '0'
+ option debug '0'
+ option whitelist_state '1011'
+
+config debug_mode 'debug_mode'
+ option sysinfo_debug_status '0'
+ option check_file_size '228'
+config lynq_fota_rw 'lynq_fota'
+
+config service 'adb'
+
+config adb 'tcp'
+ option port '5555'
+
+config lynq_apn 'lynq_apn_info'
+ option insertId '0'
+
+config rndis_status 'rndis'
+ option status '0'
+
+config 1 'sdk_ready'
+
+config lynq_apn 'lynq_apn'
+ option apn_status '0'
+
+config lynq_led_rw 'lynq_led'
+ option lynq_statusled_on '0'
+ option lynq_netled_on '0'
+
+config lynq_data 'lynq_data'
+ option data_list_valid_period '5'
diff --git a/rootfs/etc/config/lynq_uci_ro b/rootfs/etc/config/lynq_uci_ro
new file mode 100755
index 0000000..76e2276
--- /dev/null
+++ b/rootfs/etc/config/lynq_uci_ro
@@ -0,0 +1,3 @@
+config lynq_version_ro 'lynq_version'
+ option LYNQ_SW_VERSION 'T106-V2.01.01.02P56U09.AP.17.02_CAP.17.02.02'
+ option LYNQ_SW_INSIDE_VERSION 'T106-V2.01.01.02P56U09.AP.17.02_CAP.17.02'
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
+
diff --git a/rootfs/etc/lynq_monitor.sh b/rootfs/etc/lynq_monitor.sh
new file mode 100755
index 0000000..72e61c7
--- /dev/null
+++ b/rootfs/etc/lynq_monitor.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+while true
+do
+ sleep 30
+ ps -ef|grep lynq-sdk-ready |grep -v "grep" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "lynq-sdk-ready no exist" > /dev/kmsg
+ sh /etc/init.d/lynq-sdk-ready.sh start
+ else
+ ps -A -ostat,pid,comm |grep lynq-sdk-ready| grep Z > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "lynq-sdk-ready state is Z" > /dev/kmsg
+ pid=$(ps -A -ostat,pid,comm |grep lynq-sdk-ready|grep Z|awk '{print $2}')
+ kill -9 $pid
+ sh /etc/init.d/lynq-sdk-ready.sh start
+ fi
+ fi
+
+ ps -ef|grep lynq-atcid |grep -v "grep" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "lynq-atcid no exist" > /dev/kmsg
+ sh /etc/init.d/lynq-atcid.sh start
+ else
+ ps -A -ostat,pid,comm |grep lynq-atcid| grep Z > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "lynq-atcid state is Z" > /dev/kmsg
+ pid=$(ps -A -ostat,pid,comm |grep lynq-atcid|grep Z|awk '{print $2}')
+ kill -9 $pid
+ sh /etc/init.d/lynq-atcid.sh start
+ fi
+ fi
+
+ ps -ef|grep lynq-ril-service |grep -v "grep" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "lynq-ril-service no exist" > /dev/kmsg
+ sh /etc/init.d/lynq-ril-service.sh start
+ else
+ ps -A -ostat,pid,comm |grep lynq-ril-service| grep Z > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "lynq-ril-service state is Z" > /dev/kmsg
+ pid=$(ps -A -ostat,pid,comm |grep lynq-ril-service|grep Z|awk '{print $2}')
+ kill -9 $pid
+ sh /etc/init.d/lynq-ril-service.sh start
+ fi
+ fi
+
+ ps -ef|grep autosuspend |grep -v "grep" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "lynq-autosuspend no exist" > /dev/kmsg
+ sh /etc/init.d/lynq-autosuspend.sh start
+ else
+ ps -A -ostat,pid,comm |grep autosuspend| grep Z > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "lynq-autosuspend state is Z" > /dev/kmsg
+ pid=$(ps -A -ostat,pid,comm |grep autosuspend|grep Z|awk '{print $2}')
+ kill -9 $pid
+ sh /etc/init.d/lynq-autosuspend.sh start
+ fi
+ fi
+done
diff --git a/rootfs/etc/no_log_encrypt b/rootfs/etc/no_log_encrypt
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/rootfs/etc/no_log_encrypt
diff --git a/rootfs/etc/profile b/rootfs/etc/profile
new file mode 100755
index 0000000..ba1dfaf
--- /dev/null
+++ b/rootfs/etc/profile
@@ -0,0 +1,2 @@
+
+PATH="/sbin:/usr/sbin:/bin:/usr/bin"
diff --git a/rootfs/etc/rcS.d/K10zxic_debug b/rootfs/etc/rcS.d/K10zxic_debug
new file mode 100755
index 0000000..bbcbea4
--- /dev/null
+++ b/rootfs/etc/rcS.d/K10zxic_debug
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Run the daemon
+#
+
+DAEMON="zxic_debug"
+PIDFILE="/var/run/$DAEMON.pid"
+EXEC="/usr/bin/zxic_debug"
+EXEC_ARGS=""
+
+
+start() {
+ echo -n "Starting $DAEMON... "
+ start-stop-daemon --no-close -S -b -m -p $PIDFILE -x $EXEC -- $EXEC_ARGS
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+stop() {
+ echo -n "Stopping $DAEMON... "
+ start-stop-daemon -K -p $PIDFILE
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start|stop|restart)
+ "$1"
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
diff --git a/rootfs/etc/rcS.d/S22sntp b/rootfs/etc/rcS.d/S22sntp
new file mode 100755
index 0000000..006a704
--- /dev/null
+++ b/rootfs/etc/rcS.d/S22sntp
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Run the daemon
+#
+
+DAEMON="sntp"
+PIDFILE="/var/run/$DAEMON.pid"
+EXEC="/usr/bin/sntp"
+EXEC_ARGS=""
+
+
+start() {
+ echo -n "Starting $DAEMON... "
+ start-stop-daemon -S -b -m -p $PIDFILE -x $EXEC -- $EXEC_ARGS
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+stop() {
+ echo -n "Stopping $DAEMON... "
+ start-stop-daemon -K -p $PIDFILE
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start|stop|restart)
+ "$1"
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
diff --git a/rootfs/etc/selinux/mls/policy/policy.31 b/rootfs/etc/selinux/mls/policy/policy.31
new file mode 100755
index 0000000..aa75048
--- /dev/null
+++ b/rootfs/etc/selinux/mls/policy/policy.31
Binary files differ