Merge "[Bugfix][T106BUG-313][autosuspend]fix lock is not error when name is null"
diff --git a/allbins/tools/resign_tool/resign.bat b/allbins/tools/resign_tool/resign.bat
index ed00f9e..27d352c 100755
--- a/allbins/tools/resign_tool/resign.bat
+++ b/allbins/tools/resign_tool/resign.bat
@@ -43,6 +43,7 @@
) else (
SignImage -z -i "%WORK_DIR%\zloader.bin" -k %PRIVATE_KEY% -t %HASH_STR% || EXIT /B 1
)
+ SignImage -z -i "%WORK_DIR%\tloader.bin" -k %PRIVATE_KEY% -t %HASH_STR% || EXIT /B 1
)
echo "HASH_STR:" %HASH_STR%
SignImage -r -i "%WORK_DIR%\uboot.bin" -k %PRIVATE_KEY% -t %HASH_STR% || EXIT /B 1
diff --git a/allbins/tools/resign_tool/resign.sh b/allbins/tools/resign_tool/resign.sh
index 7423a21..37144f2 100755
--- a/allbins/tools/resign_tool/resign.sh
+++ b/allbins/tools/resign_tool/resign.sh
@@ -42,6 +42,7 @@
#old v3t device for mdl/mifi etc.
SignImage -z -i $WORK_DIR/zloader.bin -k $PRIVATE_KEY -t $HASH_STR
fi
+ SignImage -z -i $WORK_DIR/tloader.bin -k $PRIVATE_KEY -t $HASH_STR
fi
echo "HASH_STR:" $HASH_STR
SignImage -r -i $WORK_DIR/uboot.bin -k $PRIVATE_KEY -t $HASH_STR
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
index f483df1..85278a4 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
@@ -197,6 +197,7 @@
liblynq-irq \
liblynq-at-common \
liblynq-led \
+ liblynq-adc \
"
zxic_lib += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'libril', 'libtelsvr', d)}"
@@ -280,6 +281,7 @@
lynq-irq-demo \
lynq-gnss-update \
lynq-audio-demo \
+ lynq-adc-demo \
"
zxic_app_open += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'rild', '', d)}"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb
new file mode 100755
index 0000000..bd5e36d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb
@@ -0,0 +1,51 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-adc"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4f60c98fa94e02f659ef5939f67fa8ae"
+
+DEPENDS += "liblynq-log libbsp"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-adc/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-adc\
+ "
+
+SRC-DIR = "${S}/../liblynq-adc"
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+ ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+ ${base_libdir}/.debug \
+ ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu"
+}
+
+do_install () {
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
+
+ if [ -d "${WORKONSRC}" ] ; then
+ install -d ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+ fi
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
index 686d86f..8dcdfb7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
@@ -3,7 +3,7 @@
DESCRIPTION = "liblynq-qser-gnss"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"
-DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel"
+DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel libbsp"
#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-gnss/"
FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE
new file mode 100755
index 0000000..cb88533
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("Mobiletek SOFTWARE")
+RECEIVED FROM Mobiletek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. Mobiletek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES Mobiletek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE Mobiletek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN Mobiletek
+SOFTWARE. Mobiletek SHALL ALSO NOT BE RESPONSIBLE FOR ANY Mobiletek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND Mobiletek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE Mobiletek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT Mobiletek'S OPTION, TO REVISE OR REPLACE THE
+Mobiletek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO Mobiletek FOR SUCH Mobiletek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp
new file mode 100755
index 0000000..7fca094
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <include/lynq-adc.h>
+
+void handle_adc(const char* adc_name, int adc_type)
+{
+ if (adc_name == NULL)
+ {
+ printf("Error: adc_name is a null pointer\n");
+ return;
+ }
+ int adc_value = qser_adc_show(adc_type);
+ if (adc_value < 0)
+ {
+ printf("Error: Failed to get the value of %s\n", adc_name);
+ return;
+ }
+ printf("%s value: %d mV\n", adc_name, adc_value);
+}
+
+int main(int argc, char *argv[])
+{
+ if (argc != 2)
+ {
+ printf("Usage: %s <ADC0|ADC1|ADC2>\n", argv[0]);
+ return -1;
+ }
+
+ if (strcmp(argv[1], "ADC0") == 0)
+ {
+ handle_adc("ADC0", ADC0);
+ }
+ else if (strcmp(argv[1], "ADC1") == 0)
+ {
+ handle_adc("ADC1", ADC1);
+ }
+ else if (strcmp(argv[1], "ADC2") == 0)
+ {
+ handle_adc("ADC2", ADC2);
+ }
+ else
+ {
+ printf("Please enter valid parameters: ADC0|ADC1|ADC2\n");
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile
new file mode 100755
index 0000000..8e2ac82
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile
@@ -0,0 +1,49 @@
+SHELL = /bin/sh
+RM = rm -rf
+
+LOCAL_CFLAGS := -Wall \
+ -std=gnu++14 \
+ -g -Os \
+ -flto \
+ -fpermissive \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -Werror=format-security
+
+$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),)
+
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+ -I$(LOCAL_PATH)/include/ \
+ -I$(ROOT)$(includedir)/ \
+
+LOCAL_LIBS := \
+ -L. \
+ -ldl \
+ -lstdc++ \
+ -llynq-adc \
+
+SOURCES = lynq-adc-demo.cpp
+
+EXECUTABLE = lynq-adc-demo
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+ $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
+ $(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
+
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb
new file mode 100644
index 0000000..edcbbe4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb
@@ -0,0 +1,29 @@
+#inherit externalsrc package
+#inherit externalsrc package systemd
+DESCRIPTION = "lynq-adc-demo"
+LICENSE = "CLOSED"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+SRC_URI = "file://lynq-adc-demo.cpp \
+ file://makefile \
+"
+DEPENDS += "liblynq-adc"
+
+SRC-DIR = "${S}/../lynq-adc-demo"
+FILES_${PN} += "${bindir}/"
+TARGET_CC_ARCH += "${LDFLAGS}"
+SYSTEMD_PACKAGES = "${PN}"
+S = "${WORKDIR}"
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+ if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
+ oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+ else
+ oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+ fi
+}
+
+do_install() {
+ install -d ${D}${bindir}/
+ install -m 0755 ${S}/lynq-adc-demo ${D}${bindir}/
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
index b1d03ff..0f46da9 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
@@ -239,14 +239,12 @@
int t106_early_suspend(void)
{
RLOGD("t106_early_suspend start\n");
- system("/etc/init.d/syslog stop");
return 0;
}
void t106_early_resume(void)
{
RLOGD("t106_early_resume start\n");
- system("/etc/init.d/syslog start");
return NULL;
}
#endif
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c
index a4f9a38..6f6f916 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c
+++ b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c
@@ -8,6 +8,7 @@
#define BUF_LEN 8
+#define GPIO_LED 100
#define LYNQ_UCI_SECTION "lynq_led"
#define LYNQ_UCI_KEY "lynq_statusled_on"
@@ -15,14 +16,16 @@
int main(int argc, const char *argv[])
{
char led_enable[BUF_LEN] = "";
+ char com_val[GPIO_LED] = "";
system("/usr/bin/lynq-default");
lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, led_enable);
if(atoi(led_enable))
{
+ sprintf(com_val, "echo %d > /sys/class/gpio/gpio127/value",led_enable);
system("echo 127 > /sys/class/gpio/export");
system("echo out > /sys/class/gpio/gpio127/direction");//92 net_Status,127 status
- system("echo 127 > /sys/class/gpio/gpio127/value");
+ system(com_val);
}
return 0;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE
new file mode 100644
index 0000000..cb88533
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("Mobiletek SOFTWARE")
+RECEIVED FROM Mobiletek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. Mobiletek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES Mobiletek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE Mobiletek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN Mobiletek
+SOFTWARE. Mobiletek SHALL ALSO NOT BE RESPONSIBLE FOR ANY Mobiletek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND Mobiletek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE Mobiletek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT Mobiletek'S OPTION, TO REVISE OR REPLACE THE
+Mobiletek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO Mobiletek FOR SUCH Mobiletek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h b/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h
new file mode 100644
index 0000000..95f55be
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sc_bsp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum ADC_CHANNEL_ENUM
+{
+ QADC_NONE = 0,
+ ADC0 =1,
+ ADC1 =2,
+ ADC2 =3,
+ QADC_END
+}ADC_CHANNEL_E;
+
+int qser_adc_show(ADC_CHANNEL_E qadc);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp
new file mode 100755
index 0000000..b392fca
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp
@@ -0,0 +1,88 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sc_bsp.h>
+#include <errno.h>
+#include "lynq-adc.h"
+#include "liblog/lynq_deflog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ADC0_NODES "/sys/kernel/debug/pmu_zx29/adc0"
+#define ADC1_NODES "/sys/kernel/debug/pmu_zx29/adc1"
+#define ADC2_NODES "/sys/kernel/debug/pmu_zx29/adc2"
+
+/********************************************************************
+* @brief: qser_adc_show, function to read ADC value from specific channel
+* @param qadc [IN]: ADC_CHANNEL_E, the ADC channel to read from
+* @return : int, the read ADC value, or error code if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_adc_show(ADC_CHANNEL_E qadc)
+{
+ int adc_value;
+ char cmd[1024];
+ char cmd_ret[1024];
+ FILE *fp;
+ switch(qadc)
+ {
+ case QADC_NONE:
+ {
+ LYERRLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+ return 0;
+ }
+ case ADC0:
+ {
+ LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+ sprintf(cmd, "cat %s", ADC0_NODES);
+ break;
+ }
+ case ADC1:
+ {
+ LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+ sprintf(cmd, "cat %s", ADC1_NODES);
+ break;
+ }
+ case ADC2:
+ {
+ LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+ sprintf(cmd, "cat %s", ADC2_NODES);
+ break;
+ }
+ default:
+ {
+ LYERRLOG("input error\n");
+ return -1;
+ }
+ }
+ if((fp = popen(cmd,"r")) == NULL)
+ {
+ LYERRLOG("popen error: %s", strerror(errno));
+ return -1;
+ }
+ if((fread(cmd_ret,sizeof(cmd_ret),1,fp))<0)
+ {
+ LYERRLOG("fread fail: %s", strerror(errno));
+ fclose(fp);
+ return -1;
+ }
+ fclose(fp);
+ adc_value = atoi(cmd_ret);
+ if (adc_value < 0 || adc_value > 12000)
+ {
+ LYERRLOG("bad adc value %s!", cmd_ret);
+ return -1;
+ }
+ return adc_value;
+}
+
+DEFINE_LYNQ_LIB_LOG(LYNQ_ADC)
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile
new file mode 100644
index 0000000..d8447e6
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile
@@ -0,0 +1,61 @@
+SHELL = /bin/sh
+RM = rm -rf
+
+LOCAL_CFLAGS := -Wall \
+ -std=gnu++14 \
+ -g -Os \
+ -flto \
+ -fPIC \
+ -fpermissive \
+
+$(warning ################# lynq qser autosuspend API ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+ -I$(LOCAL_PATH)/include/ \
+ -I$(LOCAL_PATH)/ \
+ -I$(ROOT)$(includedir)/logger \
+ -I$(ROOT)$(includedir)/liblog \
+
+LOCAL_LIBS := \
+ -L. \
+ -lstdc++ \
+ -lcutils \
+ -lutils \
+ -llynq-log \
+ -lbsp \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-adc.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs
+all: build
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+ $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build: $(EXECUTABLE)
+ $(warning ########## build $(EXECUTABLE) ##########)
+install:
+ mkdir -p $(ROOT)$(base_libdir)/
+ install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+ mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+ mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+ mkdir -p $(PACK_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
+ -find . -name "*.o" -delete
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
index d512dc1..ce124b2 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
@@ -2,6 +2,7 @@
#include <stdint.h>
#ifndef __MBTK_GNSS_H__
#define __MBTK_GNSS_H__
+#include <sc_bsp.h>
#include "ringbuffer.h"
#ifdef __cplusplus
extern "C" {
@@ -270,8 +271,8 @@
};
-
-
+#define MAX_GPIO_NUM 144
+static void *test_gpio_handle[MAX_GPIO_NUM]={NULL};
static struct mopen_gnss_device_info_t mopen_gnss_device_info;
static struct mbtk_gnss_handle_t *mbtk_gnss_handle = NULL;
static int firmware_extren_state = 0;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
index b08e590..0f99e4f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
@@ -34,6 +34,7 @@
-lxml2 \
-llynq-uci \
-lsctel \
+ -lbsp \
SOURCES = $(wildcard *.c wildcard *.h src/*.cpp)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
index a238919..1c4f1bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
@@ -466,10 +466,22 @@
return -1;
}
lynq_open_gps(1);
- ret = set_baudrate(tty_fd, B9600);
- if(-1 == ret)
+
+ if(gpio21_value == 1)
{
- return -1;
+ ret = set_baudrate(tty_fd, B115200);
+ if(-1 == ret)
+ {
+ return -2;
+ }
+ }
+ else if(gpio21_value == 0)
+ {
+ ret = set_baudrate(tty_fd, B9600);
+ if(-1 == ret)
+ {
+ return -2;
+ }
}
}
else
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
index 7a7aefe..a9a0b67 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
@@ -731,7 +731,7 @@
{
return -1;
}
- printf("send cmd: %s\n", &buf[size]);
+ ALOGD("send cmd: %s\n", &buf[size]);
size += size_written;
if(size_written != size_to_wr)
{
@@ -913,37 +913,20 @@
return -1;
}
+
int gpio21_value = -1;
int lynq_open_gps(int state)
{
int ret;
- int cn_enable = 86;
- int eur_enable = 84;
- int eur_boot = 15;
- char compare_buf[256] = {0};
- const char* compare_cmd = "echo '21' > /sys/class/gpio/export && cat /sys/class/gpio/gpio21/value";
- exec_cmd(compare_cmd,compare_buf);
- gpio21_value = (compare_buf[0] - '0');
- const char*compare_cmd2 = "echo '21' > /sys/class/gpio/unexport";
- exec_cmd(compare_cmd2,NULL);
+ /*when in Eur,GPIO21 value is 1; in CN,GPIO21 value is 0. so use it to determined CN or Eur*/
+ test_gpio_handle[21] = sc_gpio_init(21,0,0,0);
+ ret = sc_gpio_value_get(test_gpio_handle[21],&gpio21_value);
+ if(ret)
+ {
+ ALOGE("gpio21 value get error\n");
+ }
- /*this is CN GPIO*/
- char CN_Enable[128];
- sprintf(CN_Enable,"echo '%d' > /sys/class/gpio/export && cd /sys/class/gpio/gpio%d", cn_enable,cn_enable);
-
- /*this is Europe GPIO*/
- char Eur_Boot[128];
- sprintf(Eur_Boot,"echo '%d' > /sys/class/gpio/export && cd /sys/class/gpio/gpio%d", eur_boot,eur_boot);
- char Eur_Enable[128];
- sprintf(Eur_Enable,"echo '%d' > /sys/class/gpio/export && cd /sys/class/gpio/gpio%d", eur_enable,eur_enable);
-
- char CN_Enable_unexport[128];
- sprintf(CN_Enable_unexport,"echo '%d' > /sys/class/gpio/unexport", cn_enable);
- char Eur_Boot_unexport[128];
- sprintf(Eur_Boot_unexport,"echo '%d' > /sys/class/gpio/unexport", eur_boot);
- char Eur_Enable_unexport[128];
- sprintf(Eur_Enable_unexport,"echo '%d' > /sys/class/gpio/unexport", eur_enable);
-
+ /*in Eur,need set GPIO15 and 84 value; in CN,need set GPIO86 value*/
if(0 == state)
{
nmea_state = 0;
@@ -958,53 +941,31 @@
if(gpio21_value == 1)
{
- ret = exec_cmd(Eur_Boot,NULL);
- if(ret < 0)
+ test_gpio_handle[15] = sc_gpio_init(15,1,0,0);
+ test_gpio_handle[84] = sc_gpio_init(84,1,0,0);
+ ret = sc_gpio_value_set(test_gpio_handle[15],0);
+ if(ret)
{
- return -1;
+ ALOGE("gpio15 set value 0 error\n");
}
- ret = exec_cmd(Eur_Enable,NULL);
- if(ret < 0)
+ usleep(10000);
+ ret = sc_gpio_value_set(test_gpio_handle[84],0);
+ if(ret)
{
- return -1;
- }
-
- }
- else if(gpio21_value == 0)
- {
- ret = exec_cmd(CN_Enable,NULL);
- if(ret < 0)
- {
- return -1;
+ ALOGE("gpio84 set value 0 error\n");
}
}
- const char* CN_Enable2 = "echo '0' > /sys/class/gpio/gpio86/value";
- char Eur_Boot2[128];
- sprintf(Eur_Boot2,"echo 'out' > /sys/class/gpio/gpio%d/direction && echo '0' > /sys/class/gpio/gpio%d/value",eur_boot,eur_boot);
- char Eur_Enable2[128];
- sprintf(Eur_Enable2,"echo 'out' > /sys/class/gpio/gpio%d/direction && echo '0' > /sys/class/gpio/gpio%d/value",eur_enable,eur_enable);
- if(gpio21_value == 1)
- {
- exec_cmd(Eur_Boot2,NULL);
- exec_cmd(Eur_Enable2,NULL);
- exec_cmd(Eur_Boot_unexport,NULL);
- exec_cmd(Eur_Enable_unexport,NULL);
-
- }
else if(gpio21_value == 0)
{
- ret = exec_cmd(CN_Enable2,NULL);
- if(ret < 0)
+ test_gpio_handle[86] = sc_gpio_init(86,1,0,0);
+ ret = sc_gpio_value_set(test_gpio_handle[86],0);
+ if(ret)
{
- return -1;
- }
- ret = exec_cmd(CN_Enable_unexport,NULL);
- if(ret < 0)
- {
- return -1;
+ ALOGE("gpio86 set value 0 error\n");
}
}
+
}
else if(1 == state)
@@ -1012,51 +973,44 @@
nmea_state = 1;
if(gpio21_value == 1)
{
- ret = exec_cmd(Eur_Boot,NULL);
- if(ret < 0)
+ test_gpio_handle[15] = sc_gpio_init(15,1,0,0);
+ test_gpio_handle[84] = sc_gpio_init(84,1,0,0);
+ ret = sc_gpio_value_set(test_gpio_handle[15],1);
+ if(ret)
{
- return -1;
+ ALOGE("gpio15 set value 1 error\n");
}
- ret = exec_cmd(Eur_Enable,NULL);
- if(ret < 0)
+ usleep(10000);
+ ret = sc_gpio_value_set(test_gpio_handle[84],1);
+ if(ret)
{
- return -1;
+ ALOGE("gpio84 set value 1 error\n");
}
}
else if(gpio21_value == 0)
{
- ret = exec_cmd(CN_Enable,NULL);
- if(ret < 0)
+ test_gpio_handle[86] = sc_gpio_init(86,1,0,0);
+ ret = sc_gpio_value_set(test_gpio_handle[86],1);
+ if(ret)
{
- return -1;
+ ALOGE("gpio86 set value 1 error\n");
}
}
- char CN_Enable3[128] = "echo '1' > /sys/class/gpio/gpio86/value";
- char Eur_Boot3[128];
- sprintf(Eur_Boot3,"echo 'out' > /sys/class/gpio/gpio%d/direction && echo '1' > /sys/class/gpio/gpio%d/value",eur_boot,eur_boot);
- char Eur_Enable3[128];
- sprintf(Eur_Enable3,"echo 'out' > /sys/class/gpio/gpio%d/direction && echo '1' > /sys/class/gpio/gpio%d/value",eur_enable,eur_enable);
- if(gpio21_value == 1)
- {
- exec_cmd(Eur_Boot3,NULL);
- exec_cmd(Eur_Enable3,NULL);
- exec_cmd(Eur_Boot_unexport,NULL);
- exec_cmd(Eur_Enable_unexport,NULL);
-
- }
- else if(gpio21_value == 0)
- {
- ret = exec_cmd(CN_Enable3,NULL);
- if(ret < 0)
- {
- return -1;
- }
- ret = exec_cmd(CN_Enable_unexport,NULL);
- if(ret < 0)
- {
- return -1;
- }
- }
+ }
+
+ sc_gpio_uninit(test_gpio_handle[21]);
+ test_gpio_handle[21] = NULL;
+ if(gpio21_value == 1)
+ {
+ sc_gpio_uninit(test_gpio_handle[15]);
+ sc_gpio_uninit(test_gpio_handle[84]);
+ test_gpio_handle[15] = NULL;
+ test_gpio_handle[84] = NULL;
+ }
+ else if(gpio21_value == 0)
+ {
+ sc_gpio_uninit(test_gpio_handle[86]);
+ test_gpio_handle[86] = NULL;
}
return 0;
}
@@ -1082,26 +1036,9 @@
}
memset(mbtk_gnss_handle, 0, sizeof(struct mbtk_gnss_handle_t));
memset(&mopen_gnss_device_info, 0, sizeof(mopen_gnss_device_info));
- sleep(1);
lynq_open_gps(0);
mbtk_gnss_handle->dev_fd = mopen_gnss_open(MBTK_GNSS_DEV, 0);
- ret = auto_set_uart_baudrate(mbtk_gnss_handle->dev_fd);
- if(-1 == ret) {
- ret = -2;
- goto err;
- } else if (B9600 == ret) {
- ret = mopen_uart_change(mbtk_gnss_handle->dev_fd, 1);
- if(ret)
- {
- printf("GNSS Uart set B115200 error\n");
- mopen_gnss_close(mbtk_gnss_handle->dev_fd);
- return -1;
- }
- }
-
- printf("Gnss Config Uart Baudrate Successful.\n");
-
mbtk_gnss_handle->rb = (char*)malloc(MBTK_UART_RECV_BUFFER_SIZE);
if(NULL == mbtk_gnss_handle->rb)
{
@@ -1159,7 +1096,6 @@
{
int ret;
struct mbtk_gnss_handle_t *gnss_handle = (struct mbtk_gnss_handle_t *)h_gnss;
-
if(h_gnss == NULL)
{
gnss_log("ARG error or not inited.");
@@ -1187,10 +1123,13 @@
printf("GNSS close init error\n");
return -1;
}
-
firmware_extren_state = 0;
- if (gnss_handle->rb) free(gnss_handle->rb);
- free((void *)h_gnss);
+ if (gnss_handle->rb)
+ {
+ free(gnss_handle->rb);
+ }
+ free(mbtk_gnss_handle);
+ mbtk_gnss_handle = NULL;
return 0;
}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
index 95577f1..b3eb4bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
@@ -29,4 +29,4 @@
option status '0'
config lynq_led_rw 'lynq_led'
- option lynq_statusled_on '1'
\ No newline at end of file
+ option lynq_statusled_on '0'
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c
new file mode 100755
index 0000000..706aa6f
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <strings.h>
+#include<stdlib.h>
+#include <include/lynq_uci.h>
+
+
+
+
+int main(int argc, const char *argv[])
+{
+ int ret = 0;
+ ret = lynq_set_netled_on(1);
+ if(ret){
+ printf("[%s-%d] lynq_set_netled_on error\n", __FUNCTION__, __LINE__);
+ return -1;
+ }
+ ret = lynq_set_statusled_on(1);
+ if(ret){
+ printf("[%s-%d] lynq_set_statusled_on error\n", __FUNCTION__, __LINE__);
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile
new file mode 100755
index 0000000..bfab13c
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile
@@ -0,0 +1,48 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+ -g -Os \
+ -flto \
+ -fpermissive \
+ -fPIC \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -DLYNQ_SW_INSIDE_VERSION=\"$(LYNQ_CONFIG_VERSION)\"
+LOCAL_CFLAGS += -DLYNQ_SW_VERSION=\"$(LYNQ_CONFIG_SW_VERSION)\"
+
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+
+
+
+
+
+LOCAL_LIBS := \
+ -L. \
+ -ldl \
+ -lpthread \
+ -llynq-uci \
+ -llynq-led \
+
+SOURCES = $(wildcard *.c)
+
+EXECUTABLE = lynq-led-demo
+
+OBJECTS=$(SOURCES:.c=.o)
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.c
+ $(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
index f8adc55..b5d4bc6 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
@@ -596,13 +596,13 @@
/* interrupts: */
interrupts = <GIC_SPI SD1_INT IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI SD1_DATA1_INT IRQ_TYPE_LEVEL_HIGH>/*,
- <GIC_SPI EX4_INT IRQ_TYPE_LEVEL_HIGH>*/; //jb.qi change for irq 4 fail
+ <GIC_SPI SD1_DATA1_INT IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI EX4_INT IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clkc SD1_WCLK>, <&clkc SD1_HCLK>, <&clkc SD1_CDET>;
clock-names = "ciu", "biu","mmc_cdet";
//cd-gpios = <&bgpio 51 GPIO_ACTIVE_LOW>;
- gpios = /*<&bgpio 51 GPIO_ACTIVE_LOW>,*/<&bgpio 85 GPIO_ACTIVE_LOW>;//jb.qi add for irq 4 fail
+ gpios = <&bgpio 51 GPIO_ACTIVE_LOW>,<&bgpio 85 GPIO_ACTIVE_LOW>;//cd ,emmc en
pinctrl-names = "mmc_pins" ,"mmc_cd_int","mmc_cd_gpio","mmc_vcc_en";
pinctrl-0 = <&sd1_sd1>;
pinctrl-1 = <&sd1_cd_int>;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/zlog_agent/cap_logagt_main.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/zlog_agent/cap_logagt_main.c
index 92de043..370862b 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/zlog_agent/cap_logagt_main.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/zlog_agent/cap_logagt_main.c
@@ -191,7 +191,7 @@
gLogSaveParam.max_total_size = msgdata->max_total_size;
gLogSaveParam.max_file_size = (msgdata->max_total_size) / (msgdata->max_file_num);
snprintf(nvstr_num, char_len, "%d", msgdata->max_file_num);
- snprintf(nvstr_size, char_len, "%llu", msgdata->max_total_size);
+ snprintf(nvstr_size, char_len, "%llu", msgdata->max_total_size /ZCAT_ONE_MB_SIZE); //jb.qi change for cant sleep on 20231016
sc_cfg_set("zlog_num", nvstr_num);
sc_cfg_set("zlog_size",nvstr_size);
sc_cfg_save();
@@ -328,21 +328,22 @@
zLogAgt_initCapNetMode();
}
else
+ { /*jb.qi change for cant sleep on 20231016 start*/
+ printf("[zlog-agent] g_log_dir is %d\n", g_log_dir);
+ }
+ if((g_log_dir ==ZCAT_MODE_CAP_FS) || (g_log_dir == ZCAT_MODE_CAP_NET))
{
- /*µÈ´ýzlog_nvctrlÉèÖÃzcatģʽ*/
- sleep(10);
- }
+ zLogAgt_initCapTools();
- zLogAgt_initCapTools();
-
- ret = pthread_create(&read_aplog_thread, NULL, cap_read_aplog, NULL);
- if(ret != 0) {
- goto __exit;
- }
- ret = pthread_create(&icp_wakeup_thread, NULL, cap_open_wakeup, NULL);
- if(ret != 0) {
- goto __exit;
- }
+ ret = pthread_create(&read_aplog_thread, NULL, cap_read_aplog, NULL);
+ if(ret != 0) {
+ goto __exit;
+ }
+ ret = pthread_create(&icp_wakeup_thread, NULL, cap_open_wakeup, NULL);
+ if(ret != 0) {
+ goto __exit;
+ }
+ }/*jb.qi change for cant sleep on 20231016 end*/
g_log_state = ZCAT_STATE_RUNNING;
__exit: