Merge "[Feature][T106][task-view-276]move the fota backup code from source to src"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
index a3df67f..f4e38fc 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/lynq-autosuspend.bb
@@ -1,68 +1,48 @@
 inherit externalsrc package systemd
 
 DESCRIPTION = "autosuspend.service"
+LICENSE = "CLOSED"
 
-LICENSE = "MobileTekProprietary"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=44d8d2b6296ca24bcd4894bb7155bf27"
+DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)} liblynq-log liblynq-uci libbsp libsctel libatutils libatreg liblynq-sim"
 
-SRC_URI = "file://autosuspend.c file://LICENSE \
-           file://autosuspend.h \
-           file://autosuspend_ops.h \
-           file://autosuspend_wakeup_count.c \
-           file://main.c \
-           file://autosuspend.service \
-           file://lynq-autosuspend.sh \
-           file://makefile \
-"
-
+WORKONSRC = "${TOPDIR}/../src/lynq/framework/lynq-autosuspend"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/framework/:"
+SRC_URI = " \
+          file://lynq-autosuspend \
+          "
+SRC-DIR = "${S}/../lynq-autosuspend"
 EXTRA_OEMAKE = "'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
-
-LOCAL_C_INCLUDES = "-I. "
-
-DEPENDS = "liblynq-log liblynq-uci"
-DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)} liblynq-log liblynq-uci libbsp libsctel libatutils libatreg liblynq-sim"
-LOCAL_LIBS = "-L. -ldl -lstdc++ -lpthread -llog"
-SOURCES = "$(wildcard *.c )"
-
-OBJECTS = "$(SOURCES:.c=.o)"
-
-EXECUTABLE = "autosuspend"
-S = "${WORKDIR}"
-TARGET_CC_ARCH += "${LDFLAGS}"
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "autosuspend.service"
 FILES_${PN} += "${systemd_unitdir}/system/autosuspend.service"
+
 #INHIBIT_PACKAGE_STRIP = "1"
 do_compile () {
 
 	#${CXX} -Wall ${LOCAL_C_INCLUDES} autosuspend.c autosuspend_wakeup_count.c main.c ${LOCAL_LIBS} -o ${EXECUTABLE}
 	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"
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
 	else
-		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
 	fi
 }
 
 do_install() {
 	install -d ${D}${bindir}/
-	echo "Installing image PN ${PN}"
-	echo "Installing image systemd_unitdir ${systemd_unitdir}"
-	echo "Installing image D ${D}"
-	echo "Installing image B ${B}"
+	install -m 0755 ${SRC-DIR}/autosuspend ${D}${bindir}/
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		install -d ${D}${systemd_unitdir}/system/
 		install -m 0644 ${B}/autosuspend.service ${D}${systemd_unitdir}/system
-    else
+        else
 		install -d ${D}${sysconfdir}/init.d
-        install -m 0755  ${S}/lynq-autosuspend.sh ${D}${sysconfdir}/init.d/
-        install -d ${D}${sysconfdir}/rcS.d
-        ln -s ../init.d/lynq-autosuspend.sh ${D}${sysconfdir}/rcS.d/S82lynq-autosuspend-service
+        	install -m 0755  ${SRC-DIR}/lynq-autosuspend.sh ${D}${sysconfdir}/init.d/
+        	install -d ${D}${sysconfdir}/rcS.d
+        	ln -s ../init.d/lynq-autosuspend.sh ${D}${sysconfdir}/rcS.d/S82lynq-autosuspend-service
 	fi
 
-	install -m 0755 ${S}/autosuspend ${D}${bindir}/
-	install -d ${D}${includedir}
 }
 
 
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig b/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
index ef22244..49e7188 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
@@ -156,7 +156,7 @@
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
-# CONFIG_SHMEM is not set
+CONFIG_SHMEM=y
 CONFIG_AIO=y
 CONFIG_IO_URING=y
 CONFIG_ADVISE_SYSCALLS=y
@@ -2491,6 +2491,10 @@
 # CONFIG_PROC_CHILDREN is not set
 CONFIG_KERNFS=y
 CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TMPFS_XATTR=y
+CONFIG_MEMFD_CREATE=y
 # CONFIG_CONFIGFS_FS is not set
 # end of Pseudo filesystems
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/LICENSE b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/LICENSE
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/LICENSE
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/LICENSE
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.c b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.c
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.c
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.c
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.h b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.h
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.h
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.h
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.service b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.service
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend.service
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend.service
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_ops.h b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_ops.h
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_ops.h
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_ops.h
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/lynq-autosuspend.sh b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/lynq-autosuspend.sh
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/lynq-autosuspend.sh
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/lynq-autosuspend.sh
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/main.c b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/main.c
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/main.c
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/main.c
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/makefile
similarity index 94%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile
rename to cap/zx297520v3/src/lynq/framework/lynq-autosuspend/makefile
index ca263bf..7878aff 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/makefile
+++ b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/makefile
@@ -34,7 +34,9 @@
 LOCAL_PATH   = .
 
 LOCAL_C_INCLUDES = \
-  -I.   -I$(ROOT)$(includedir)/liblog -I$(ROOT)$(includedir) \
+  -I.   \
+  -I$(ROOT)$(includedir)/liblog \
+  -I$(ROOT)$(includedir) \
 
 
 
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/tty/tty_io.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/tty/tty_io.c
old mode 100644
new mode 100755
index 669aef7..8591d06
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/tty/tty_io.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/tty/tty_io.c
@@ -771,6 +771,12 @@
 	if (tty->stopped)
 		return;
 	tty->stopped = 1;
+	
+	//l.yang add log for bug T106-134 start
+	if(tty->index == 1){
+		printk("__stop_tty got stop cmd\n");
+	}
+	//l.yang add log for bug T106-134 end
 	if (tty->ops->stop)
 		tty->ops->stop(tty);
 }