blob: 0d099dd424dfb0d1316176944f0cf6c7f7922eec [file] [log] [blame]
xf.li86118912025-03-19 20:07:27 -07001#!/bin/sh
2
3#jb.qi add for uci check start
4check_copy_file() {
5 if [ $# -ne 2 ];then
6 return
7 fi
8
9 diff $1 $2 > /dev/null
10 if [ $? -ne 0 ]; then
11 echo "cp $1 $2" > /dev/kmsg
12 cp $1 $2
13 fi
14}
15
16check_uci()
17{
18 uci get lynq_uci.lynq_ril > /dev/null
19 if [ $? -ne 0 ]; then
20 echo "$TAG: lynq_uci config cant get" > /dev/kmsg
21 cp /etc/config/lynq_uci /mnt/userdata/config/lynq_uci
22 fi
23}
24mkdir /mnt/userdata/config
25check_uci
26check_copy_file /etc/config/lynq_uci_ro /mnt/userdata/config/lynq_uci_ro
27
28#jb.qi add for uci check end
29ramdump_mode=`nv get ramdump_mode`
30
31if [ -e /proc/sys/ramdump_ap/ramdump_start_addr ]; then
32 if [ "$ramdump_mode" == "CAPEMMC" ]; then
33 ramdump_dev=`nv get ramdump_emmc_device`
34 if [ -b $ramdump_dev ]; then
35 ramdump_start=`fdisk -l | grep $ramdump_dev | awk '{ print $4 }'`
36 ramdump_save_size=`fdisk -l | grep $ramdump_dev | awk '{ print $6 }'`
37 echo $ramdump_start > /proc/sys/ramdump_ap/ramdump_start_addr
38 echo $ramdump_save_size > /proc/sys/ramdump_ap/ramdump_emmc_size
39 else
40 echo "[zxic_ramdump]$ramdump_dev is not exist!"
41 fi
42 else
43 if [ -b $ramdump_dev ]; then
44 echo 0 > /proc/sys/ramdump_ap/ramdump_start_addr
45 fi
46 fi
47fi
48# 0 for usb, 1 for net
49if [ -e /proc/sys/zcatkern/log_com_mode ]; then
50 zcat_com_mode=`nv get zcat_mode`
51 if [ "$zcat_com_mode" == "net" ]; then
52 echo 1 > /proc/sys/zcatkern/log_com_mode
53 else
54 echo 0 > /proc/sys/zcatkern/log_com_mode
55 fi
56# sh /etc/zcatlog_monitor.sh &
57fi
58