[Feature][ZXW-285]merge P56U05 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ied657102425a179a89ef41847170152e8a5d437c
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/adctest/adctest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/adctest/adctest.bb
index 48e68f8..6575494 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/adctest/adctest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/adctest/adctest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "adctest"
 
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/bsp-test/bsp-test.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/bsp-test/bsp-test.bb
old mode 100644
new mode 100755
index e11b648..8ff57ae
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/bsp-test/bsp-test.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/bsp-test/bsp-test.bb
@@ -1,5 +1,5 @@
 DESCRIPTION = "bsp_test"
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/crc-api/crc-api.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/crc-api/crc-api.bb
index 394ba90..2a0278c 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/crc-api/crc-api.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/crc-api/crc-api.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "crc-api"
 
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/ethtest/ethtest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/ethtest/ethtest.bb
old mode 100644
new mode 100755
index 64930c6..1f0fe73
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/ethtest/ethtest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/ethtest/ethtest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "ethtest"
 
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/i2cslavetest/i2cslavetest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/i2cslavetest/i2cslavetest.bb
index 9161b90..0720d04 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/i2cslavetest/i2cslavetest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/i2cslavetest/i2cslavetest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "i2cslavetest"
 
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/i2ctest/i2ctest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/i2ctest/i2ctest.bb
old mode 100644
new mode 100755
index 3a2c18b..3cf6b95
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/i2ctest/i2ctest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/i2ctest/i2ctest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "i2ctest"
 
-DEPENDS     = "libbsp"
+DEPENDS     = "libnvram libbsp"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libbsp/libbsp.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libbsp/libbsp.bb
index 51336a8..e12662d 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libbsp/libbsp.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libbsp/libbsp.bb
@@ -12,6 +12,12 @@
            file://libbsp \
           "
 
+
+DEPENDS = "libnvram"
+DEPENDS += " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'volte', 'libvoice', '', d)} \
+    "
+
 S       = "${WORKDIR}"
 #引用公用头文件和编译选项。
 include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libmsmsvr/libmsmsvr.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libmsmsvr/libmsmsvr.bb
index e593884..614759c 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libmsmsvr/libmsmsvr.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libmsmsvr/libmsmsvr.bb
@@ -1,11 +1,13 @@
 DESCRIPTION = "libmsmsvr"
-DEPENDS     = "libtinyalsa ffmpeg"
+DEPENDS     = "libtinyalsa"
 SECTION     = "lib"
 LICENSE     = "zte"
 PV          = "1.0.0"
 PR          = "r0"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
 
+DEPENDS += "${@bb.utils.contains('CONFIG_MSMSVR_CODEC_TYPE', 'FFMPEG', 'ffmpeg', '', d)}"
+
 #配置code路径信息。
 FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:"
 SRC_URI = " \
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/msm-svr/msm-svr.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/msm-svr/msm-svr.bb
index fc04350..3d6ef12 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/msm-svr/msm-svr.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/msm-svr/msm-svr.bb
@@ -5,7 +5,7 @@
 PV = "1.0.0"
 PR = "r0"
 
-DEPENDS += "fdk-aac-master opencore-amr vo-amrwbenc ffmpeg"
+DEPENDS += "${@bb.utils.contains('CONFIG_MSMSVR_CODEC_TYPE', 'FFMPEG', 'fdk-aac-master opencore-amr vo-amrwbenc ffmpeg', '', d)}"
 CLASS_COM = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
@@ -29,7 +29,7 @@
 
 #编译
 do_compile() {
-	make -C msm_svr
+	make -C msm_svr CONFIG_MSMSVR_CODEC_TYPE=${CONFIG_MSMSVR_CODEC_TYPE}
 }
 
 #库文件的安装
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/player-demo/player-demo.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/player-demo/player-demo.bb
index 9dfff33..4ae8c08 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/player-demo/player-demo.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/player-demo/player-demo.bb
@@ -1,5 +1,5 @@
 DESCRIPTION = "player_demo"
-DEPENDS     = "libmedia libscipc"
+DEPENDS     = "libmedia libscipc libsofttimer libsoftap libnvram"
 SECTION     = "app"
 LICENSE     = "zte"
 PV = "1.0.0"
@@ -63,4 +63,4 @@
 SYSTEMD_SERVICE_${PN}     = "player_demo.service"
 SYSTEMD_AUTO_ENABLE_${PN} = "disable"
 
-RDEPENDS_${PN} = " libmedia libscipc"
+RDEPENDS_${PN} = " libmedia libscipc libsofttimer libsoftap libnvram"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo.bb
new file mode 100755
index 0000000..b519bca
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "softap_demo"
+DEPENDS     = "libsoftap libatutils libsofttimer libnvram"
+SECTION     = "app"
+LICENSE     = "zte"
+PV = "1.0.0"
+PR = "r0"
+
+CLASS_COM = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+"
+inherit ${CLASS_COM}
+
+#配置code路径信息。
+FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}:"
+SRC_URI = " \
+          file://test/softap_demo \		  
+		  ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://softap_demo.init","", d)} \
+		  ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://softap_demo.service","", d)} \
+          "
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
+S = "${WORKDIR}"
+S_SRC_PATH = "${S}/test/softap_demo"
+#引用公用头文件和编译选项。
+include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
+
+#inherit autotools pkgconfig systemd
+
+do_compile() {
+	make -C ${S_SRC_PATH}
+}
+
+do_install () {
+	install -d ${D}${bindir}/
+	install -m 0755 ${S_SRC_PATH}/softap_demo ${D}${bindir}/
+	
+	if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
+		install -Dm 0755 ${WORKDIR}/softap_demo.init ${D}${sysconfdir}/init.d/softap_demo
+	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/softap_demo.service ${D}${systemd_unitdir}/system
+	fi
+	
+	#install elfs
+	install -d ${ELFS-PATH}/
+	install -m 0755 ${S_SRC_PATH}/softap_demo ${ELFS-PATH}/	
+}
+
+do_cleanlibs () {
+	rm -fr ${ELFS-PATH}/softap_demo
+}
+
+addtask  cleanlibs after do_clean  before do_cleansstate
+
+FILES_${PN} = "\
+    ${bindir}/ \
+    ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/softap_demo","", d)} \
+    "
+SYSTEMD_SERVICE_${PN}     = "softap_demo.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+RDEPENDS_${PN} = " libsoftap libatutils libsofttimer libnvram"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.init b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.init
new file mode 100755
index 0000000..b7d0655
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.init
@@ -0,0 +1,21 @@
+#!/bin/sh /etc/rc.common
+
+START=18
+STOP=85
+USE_PROCD=1
+
+logger -t softap_demo
+
+start_service() {
+	procd_open_instance
+	procd_set_param command /usr/bin/softap_demo
+	procd_set_param stdout 1  # forward stdout of the command to logd
+	procd_set_param stderr 1  # same for stderr
+	procd_set_param respawn
+	procd_close_instance
+}
+
+stop_service() 
+{
+	echo "add clean code"
+}
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.service b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.service
new file mode 100755
index 0000000..8356947
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/softap-demo/softap-demo/softap_demo.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=The softap_demo service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/softap_demo
+Restart=always
+
+[Install]
+WantedBy=basic.target
+
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/spitest/spitest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/spitest/spitest.bb
index 8e0fd39..a92b230 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/spitest/spitest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/spitest/spitest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "spitest"
 #nv依赖libnvram库
-DEPENDS    += "libbsp"
+DEPENDS    += "libnvram libbsp"
 SECTION     = "spitest"
 LICENSE     = "zte"
 PV = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/uarttest/uarttest.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/uarttest/uarttest.bb
index 3153ce4..dfe0dcf 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/uarttest/uarttest.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/uarttest/uarttest.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "uarttest"

 

-DEPENDS     = "libbsp"

+DEPENDS     = "libnvram libbsp"

 SECTION     = "app"

 LICENSE     = "zte"

 PV = "1.0.0"

diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/y2038-tests/y2038-tests.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/y2038-tests/y2038-tests.bb
new file mode 100755
index 0000000..ebc0c90
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/y2038-tests/y2038-tests.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "y2038-tests"

+

+DEPENDS     = ""

+SECTION     = "app"

+LICENSE     = "zte"

+PV = "1.0.0"

+PR = "r0"

+

+CLASS_COM = " \

+    ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \

+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \

+"

+inherit ${CLASS_COM}

+

+FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/test:"

+SRC_URI = " \

+    file://y2038-tests \

+    "

+

+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"

+S = "${WORKDIR}"

+

+include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc

+include ${BSPDIR}/sources/meta-zxic/conf/pub.inc

+CFLAGS_append = "${ZXIC_EXTRA_CFLAGS}"

+

+do_compile() {

+	make -C y2038-tests

+}

+

+

+do_install() {

+	install -d ${D}${bindir}/

+	install -m 0777 ${S}/y2038-tests/test_n2038 ${D}${bindir}/

+	install -m 0777 ${S}/y2038-tests/test_y2038 ${D}${bindir}/

+

+	#install elfs

+	install -d ${ELFS-PATH}/

+	install -m 0755 ${S}/y2038-tests/test_n2038 ${ELFS-PATH}/

+	install -m 0755 ${S}/y2038-tests/test_y2038 ${ELFS-PATH}/

+}

+

+do_cleanlibs () {

+	rm -fr ${ELFS-PATH}/test_n2038

+	rm -fr ${ELFS-PATH}/test_y2038

+}

+

+addtask  cleanlibs after do_clean  before do_cleansstate

+

+FILES_${PN} = "\

+    ${bindir}/ \

+    "