Squashed 'LYNQ_PUBLIC/' changes from 6f35c858b..f6dab8fc7
f6dab8fc7 [Bugfix][API-1545][AUTOSUSPEND]Repeated sleep and wake-up can cause system time delay
1daddaa8b [Feature][T8TSK-289] add telephonyware to LYNQ_PUBLIC repo 0
git-subtree-dir: LYNQ_PUBLIC
git-subtree-split: f6dab8fc7227cfc57ddfc1703c62ed8a073f80bb
Change-Id: I9a8eca7c4731c47c094e869b9f858725c8183d1e
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/apn/libapn_2.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/apn/libapn_2.0.0.bb
new file mode 100644
index 0000000..977076e
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/apn/libapn_2.0.0.bb
@@ -0,0 +1,44 @@
+inherit externalsrc package
+
+DESCRIPTION = "apn database"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS = "platform-libs sqlite3 libxml2"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libvendor-ril/"
+inherit deploy workonsrc
+
+EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
+ 'PROJECT=${PROJ}'\
+ 'ROOT=${STAGING_DIR_HOST}'\
+ 'BB_APN_OPTION=true'\
+ 'LDFLAGS=${BB_LDFLAGS_ADD}'"
+
+FILES_${PN} = "${base_libdir}/*.so \
+ ${base_bindir}\
+ ${base_sbindir}\
+ /system/etc/tele"
+
+FILES_${PN}-dev = "${includedir}/"
+
+FILES_${PN}-staticdev = "${base_libdir}/*.a"
+
+FILES_${PN}-doc = "/doc"
+
+do_compile () {
+ if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
+ oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
+ else
+ oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" CXX="${CXX} ${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
+ fi
+}
+
+do_install() {
+ install -d ${D}${includedir}
+ install ${WORKONSRC}/apn/inc/apn_interface.h ${D}${includedir}
+ oe_runmake install ROOT=${D} PACKAGE_ARCH=${PACKAGE_ARCH}
+ install -d ${D}/system/etc/tele/
+ install -m 0644 ${S}/apn/resource/apns-conf.xml ${D}/system/etc/tele/
+ install -m 0644 ${S}/apn/resource/apns-full-conf.xml ${D}/system/etc/tele/
+ install -m 0644 ${S}/apn/resource/apns-conf-pct*.xml ${D}/system/etc/tele/
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci-service_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci-service_1.0.0.bb
new file mode 100755
index 0000000..dcec439
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci-service_1.0.0.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "MTK atci_service daemon"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://${WORKONSRC}/../MTK_LICENSE;md5=bb7f46b4d684ab55ab49a844a33ed7b5"
+
+inherit workonsrc systemd
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/atcid/atci_service/src"
+
+DEPENDS += " mipc uci"
+
+FILES_${PN} = "${bindir}/atci_service"
+
+ATCID_CFLAGS_ADD = " -I${STAGING_DIR_HOST}/usr/include/mipc/api \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/common \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/msg \
+ -I${STAGING_DIR_HOST}/usr/include \
+ -D_LINUX -DTELEMATICS -fPIC \
+"
+
+CFLAGS_append = "${ATCID_CFLAGS_ADD}"
+CXXFLAGS_append = "${ATCID_CFLAGS_ADD}"
+LDFLAGS_append = " -lmipc_msg -luci -lpthread "
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 atci_service ${D}${bindir}
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci_1.0.0.bb
new file mode 100755
index 0000000..dad92cc
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/atcid/atci_1.0.0.bb
@@ -0,0 +1,40 @@
+DESCRIPTION = "MTK atcid daemon"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://${WORKONSRC}/../MTK_LICENSE;md5=bb7f46b4d684ab55ab49a844a33ed7b5"
+
+inherit workonsrc systemd
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/atcid/atci/src"
+
+DEPENDS += " mipc uci libuciwrapper libxml2"
+
+
+FILES_${PN} = "${bindir}/atcid /data/atsvc"
+
+
+ATCID_CFLAGS_ADD = " -I${STAGING_DIR_HOST}/usr/include/mipc/api \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/common \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/msg \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/external \
+ -I${STAGING_DIR_HOST}/usr/include \
+ -I${STAGING_DIR_HOST}/usr/include/libxml2 \
+ -D_LINUX -DTELEMATICS -fPIC \
+ -I${STAGING_DIR_HOST}/${libdir}\
+ -DENABLE_TRM \
+"
+
+EXTRA_OEMAKE = "'LYNQ_ATSVC_SUPPORT = ${LYNQ_ATSVC_SUPPORT}'"
+
+CFLAGS_append = "${ATCID_CFLAGS_ADD}"
+CXXFLAGS_append = "${ATCID_CFLAGS_ADD}"
+LDFLAGS_append = " -lmipc_msg -luci -lpthread -luciwrapper -llog"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 atcid ${D}${bindir}
+ if test "${LYNQ_ATSVC_SUPPORT}" = "yes"; then
+ install -d ${D}/data/atsvc
+ cp -R ${WORKONSRC}/lynq-private/lynq_atsvc_plugin.xml ${D}/data/atsvc
+ cp -R ${WORKONSRC}/lynq-private/pseudo_terminal/terminal_controller.conf ${D}/data/atsvc
+ fi
+
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/build-init_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/build-init_1.0.0.bb
new file mode 100644
index 0000000..2d25979
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/build-init_1.0.0.bb
@@ -0,0 +1,21 @@
+#Basic Configuration
+DESCRIPTION = "BACH environment initialization."
+SECTION = "base"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+MTK_SRC = "${TOPDIR}/../meta/meta-mediatek-mt2735/recipes-telephonyware/buildinit/files"
+
+WORKONSRC = "${MTK_SRC}"
+
+inherit workonsrc
+
+ALLOW_EMPTY_${PN} = "1"
+
+do_install () {
+ chmod a+x ${MTK_SRC}/bin/*
+ cp -af ${MTK_SRC}/bin/* ${TOPDIR}/../meta/poky/scripts
+ install -d ${D}${includedir}/install
+ cp -af ${MTK_SRC}/*.* ${D}${includedir}/install/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/LICENSE b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/LICENSE
new file mode 100644
index 0000000..77f59ed
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK 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 MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK 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 MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.config b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.config
new file mode 100644
index 0000000..e230206
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.config
@@ -0,0 +1,331 @@
+##
+# @file Makefile.config
+#
+# @brief This file contains the global default tool arguments,
+# which could be appended or overwrited by each module
+#
+# @author Howard Chen
+##
+
+##
+# @brief option flags for gcc/tcc
+# @param CC : option for c compiler
+# @param CXX : option for c++ compiler
+# @param WALL : option for warning message
+# @param DEBUG : option for debugging format
+# @param MOPTS : option for specific target
+# @param INCLUDE_ADD : INCLUDE ADD-ON
+# @param LDFLAGS_ADD : LDFLAGS ADD-ON
+# @param SYS_LIBS : SYSTEM library add for image linking
+# @param STARTUP : startup code (if any)
+##
+
+GCC = $(CROSS)gcc
+CC = $(GCC)
+CXX = $(CROSS)g++
+##
+# -------------[ config for native ]------------------------------
+##
+ifeq ($(CROSS),)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ #MOPTS ?= -m32 -fno-builtin -D__KERNEL__ -I../linux/include -DMODULE -DMODVERSIONS -include ../linux/include/linux/modversions.h
+ MOPTS ?= -m32 -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ MOPTS ?= -m32
+ ifeq ($(strip $(LINUX)),1)
+ CONFIG += -DLINUX
+ endif
+ SYS_LIBS?= pthread rt
+ RUN ?= ./
+ endif
+ DEF_ASFLAGS=-m32
+endif
+
+ifeq ($(strip $(CROSS)),arm-none-linux-)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS ?= -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ THUMB ?=-mthumb
+ MOPTS ?= -fcall-saved-r10 -march=armv5te -ffunction-sections -fdata-sections -mthumb-interwork -msoft-float
+ CONFIG += -DLINUX
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+ DEF_ASFLAGS = -msoft-float -mthumb-interwork
+endif
+
+ifeq ($(strip $(CROSS)),mipsel-linux-)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS ?= -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ #THUMB ?=-mthumb
+ #MOPTS ?= -fcall-saved-r10 -march=armv5te -ffunction-sections -fdata-sections -mthumb-interwork -msoft-float
+ CONFIG += -DLINUX
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+ DEF_ASFLAGS = -msoft-float -mdsp -mdspr2
+endif
+
+ifeq ($(strip $(CROSS)),arm-linux-)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS ?= -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ THUMB ?=-mthumb
+ ifeq ($(PLATFORM),mt6280)
+ MOPTS ?= -fcall-saved-r10 -march=armv5te -ffunction-sections -fdata-sections -mthumb-interwork
+ else
+ ifeq ($(PLATFORM),mt6290)
+ MOPTS ?= -fcall-saved-r10 -march=armv7-a -ffunction-sections -fdata-sections -mthumb
+ else
+ ifeq ($(PLATFORM),mt6297)
+ MOPTS ?= -fcall-saved-r10 -march=armv7-a -ffunction-sections -fdata-sections -mthumb
+ else
+ ifeq ($(PLATFORM),qemu)
+ MOPTS ?= -fcall-saved-r10 -march=armv7-a -ffunction-sections -fdata-sections -mthumb
+ else
+ MOPTS ?= -fcall-saved-r10 -march=armv6zk -ffunction-sections -fdata-sections -mthumb-interwork -mfpu=vfp -mfloat-abi=softfp
+ endif
+ endif
+ endif
+ endif
+ CONFIG += -DLINUX -DBOARD_VER_$(BOARD_VER) -DREL_TYPE_$(REL_TYPE)
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+ ifeq ($(PLATFORM),mt6280)
+ DEF_ASFLAGS = -mthumb-interwork
+ else
+ DEF_ASFLAGS = -mfpu=vfp -mfloat-abi=softfp -mthumb-interwork
+ endif
+endif
+
+ifeq ($(strip $(CROSS)),aarch64-linux-)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS ?= -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ MOPTS ?= -march=armv8-a -ffunction-sections -fdata-sections
+ CONFIG += -DLINUX
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+endif
+
+ifeq ($(strip $(CROSS)),aarch64-poky-linux-)
+ INCLUDE_ADD += $(BB_INCLUDE_ADD)
+ LDFLAGS_ADD += $(BB_LDFLAGS_ADD) ${BB_LDPATH_ADD}
+ MOPTS += $(BB_CFLAGS_ADD)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS += -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ MOPTS += -march=armv8-a -ffunction-sections -fdata-sections
+ CONFIG += -DLINUX
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+endif
+
+ifneq ($(filter arm-poky-linux-gnueabi- arm-pokymllib32-linux-gnueabi-, $(strip $(CROSS))),)
+ INCLUDE_ADD += $(BB_INCLUDE_ADD)
+ LDFLAGS_ADD += $(BB_LDFLAGS_ADD) ${BB_LDPATH_ADD}
+ MOPTS += $(BB_CFLAGS_ADD)
+ ifeq ($(strip $(LINUX)),2)
+ #Linux kernel space
+ MOPTS ?= -fno-builtin -D__KERNEL__ -DMODULE -DMODVERSIONS
+ CONFIG += -DLINUX
+ else
+ WALL ?= -Wall
+ DEBUGS ?= -g
+ THUMB ?=-mthumb
+ MOPTS ?= -fcall-saved-r10 -march=armv7-a -ffunction-sections -fdata-sections -mthumb-interwork -mfpu=vfp -mfloat-abi=softfp -mtune=cortex-a7
+ CONFIG += -DLINUX
+ ifeq ($(strip $(PACKAGE_ARCH)),$(filter $(strip $(PACKAGE_ARCH)), cortexa7hf-vfp-vfpv4-neon cortexa7hf-neon-vfpv4))
+ MOPTS += -fcall-saved-r10 -march=armv7-a -ffunction-sections -fdata-sections -mthumb-interwork -mfpu=neon-vfpv4 -mfloat-abi=hard -mtune=cortex-a7
+ CONFIG += -mhard-float
+ endif
+ ifeq ($(strip $(PACKAGE_ARCH)),$(filter $(strip $(PACKAGE_ARCH)), cortexa53hf-neon-fp-armv8))
+ MOPTS += -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53 -ffunction-sections -fdata-sections
+ CONFIG += -mhard-float
+ endif
+ SYS_LIBS?= pthread rt
+ RUN ?=
+ DEF_ASFLAGS = $(DEBUGS)
+ endif
+ DEF_ASFLAGS = -mfpu=vfp -mfloat-abi=softfp -mthumb-interwork
+
+endif
+
+
+##
+# ------------- config for arm-none-eabi- ---------------------------------
+# @param THUMB thumb-mode switch
+# @param ARM arm-mode switch
+# @param EL little-endian switch
+# @param EB big-endian switch
+# @param COMPILER rvds/gcc switch
+# @param INIT initial scheme
+##
+ifeq ($(strip $(CROSS)),arm-none-eabi-)
+ RUN ?=mdebug 192.168.0.8 9000
+ ifeq ($(strip $(COMPILER)),RVDS)
+ CC = tcc
+ CXX = tcc
+ endif
+
+ ifeq ($(strip $(COMPILER)),RVDS)
+ WALL ?=
+ DEBUG ?=-g
+ THUMB ?=--thumb
+ ARM ?=--arm
+ EL ?=--littleend
+ EB ?=--bigend
+ MOPTS ?=--cpu arm9
+ else
+ WALL ?=-Wall
+ DEBUGS ?=-gstabs
+ THUMB ?=-mthumb
+ ARM ?=-marm
+ EL ?=-mlittle-endian
+ EB ?=-mbig-endian
+ MOPTS ?=-fcall-saved-r10 -mthumb-interwork -march=armv5te -msoft-float -ffunction-sections -fdata-sections
+ endif
+
+ ifeq ($(strip $(COMPILER)),RVDS)
+ INCLUDE_ADD += -I /usr/local/ARM/RVCT/Data/2.2/349/include/unix/
+ endif
+ ifeq ($(strip $(NEWLIB)),1)
+ CONFIG += -DNEWLIB
+ endif
+ LD_SCRIPT ?= -Tlink.ld
+ INIT ?= base_init
+ SYS_LIBS ?= gcc c
+ SYS_LIBS += $(INIT)
+ LDFLAGS_ADD += -nostartfiles -nodefaultlibs -Wl,--gc-sections $(LD_SCRIPT)
+ STARTUP ?= $(ROOT)/lib/startup.o
+ DEF_ASFLAGS = -msoft-float -mthumb-interwork
+endif
+
+##
+# -------------[ config for arm-none-elf- ]------------------------------
+# @param THUMB thumb-mode switch
+# @param ARM arm-mode switch
+# @param EL little-endian switch
+# @param EB big-endian switch
+# @param NEWLIB use toolchain supported newlib
+# @param INIT initial scheme
+##
+ifeq ($(strip $(CROSS)),arm-none-elf-)
+
+ WALL ?=-Wall
+ DEBUGS ?=-g
+ THUMB ?=-mthumb
+ ARM ?=-marm
+ EL ?=-mlittle-endian
+ EB ?=-mbig-endian
+ MOPTS ?=-fcall-saved-r10 -mthumb-interwork -march=armv5te -msoft-float -ffunction-sections -fdata-sections
+ NEWLIB ?= 1
+ RUN ?=mdebug 192.168.0.8 9000
+ ifeq ($(strip $(NEWLIB)),1)
+ CONFIG += -D NEWLIB
+ SYS_LIBS ?= gcc c
+ SYS_LIBS += $(INIT)
+ LD_SCRIPT ?= -Tlink.ld
+ LDFLAGS_ADD += -nostartfiles -nodefaultlibs -Wl,--gc-sections $(LD_SCRIPT)
+ INIT ?= base_init
+ STARTUP ?= $(ROOT)/lib/startup.o -l$(INIT)
+ else
+ INCLUDE_ADD += -I $(ROOT)/include/ecos
+ SYS_LIBS ?=
+ LD_SCRIPT = -Tecos.ld # note , application with ecos must use ecos.ld
+ LDFLAGS_ADD +=-nostdlib -nodefaultlibs -nostartfiles -Wl,--gc-sections $(LD_SCRIPT)
+ endif
+ DEF_ASFLAGS = $(DEBUGS) -msoft-float -mthumb-interwork
+ CXXFLAGS_ADD = -fno-rtti -fno-exceptions
+endif
+
+##
+# -------------[ config for i586-mingw32msvc-]------------------------------
+##
+ifeq ($(strip $(CROSS)),i586-mingw32msvc-)
+ WALL ?=-Wall
+ DEBUGS ?=-g
+ MOPTS ?=-m32
+ SYS_LIBS ?= ws2_32 iberty
+ LDFLAGS_ADD +=
+ RUN ?=
+endif
+
+
+##
+# @param DEF_INCLUDE: default include path
+# @param DEF_CFLAGS: default compiler options
+# (debugger information/ warning/ little-endian)
+#
+# @param DEF_ASFLAGS: default assembler options (debugger information)
+#
+# @param DEF_LDFLAGS: default linker options ( link with each libary specified
+# in the $(DEP_LIBS) variable and specify the $(PREFIX)/lib and current
+# directory as the library search path
+##
+CROSS_SUP ?= arm-none-eabi-
+ROOT ?= $(PREFIX)/$(CROSS:%-=%)
+STRICT ?= 0
+ifeq ($(strip $(STRICT)),1)
+ DEF_CFLAGS = $(DEBUGS) $(MOPTS) $(WALL) -Werror
+else
+ DEF_CFLAGS = $(DEBUGS) $(MOPTS) $(WALL)
+endif
+
+DEF_INCLUDE = -I include -I $(ROOT)/include $(INCLUDE_ADD)
+
+SIM_LIBS ?= $(patsubst $(NAME),,$(patsubst basegltarget,baseglsim,$(DEP_LIBS)))
+
+ifeq ($(strip $(DEP_LIBS_AUTO)),1)
+ _DEP_LIBS?=$(shell wimac_dep.sh $(NAME) "$(DEP_LIBS)" "$(DEP_LIBS_EX)")
+else
+ _DEP_LIBS?=$(DEP_LIBS)
+endif
+
+DEP_LIBS_LD = -L. -L $(ROOT)/lib \
+ -Xlinker --start-group -Xlinker -l$(NAME) \
+ $(foreach _LIB, $(_DEP_LIBS), -Xlinker -l$(_LIB)) \
+ $(foreach _LIB, $(SYS_LIBS), -Xlinker -l$(_LIB)) \
+ -Xlinker --end-group
+
+DEF_LDFLAGS = $(STARTUP) $(LDFLAGS_ADD) $(DEBUGS) $(MOPTS) $(DEP_LIBS_LD)
+
+HEXPAD=0
+
+#ifeq ($(strip $(NAME)),base)
+#else
+#include $(PREFIX)/.Makefile
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.prebuilt.template b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.prebuilt.template
new file mode 100644
index 0000000..2b93724
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.prebuilt.template
@@ -0,0 +1,103 @@
+###
+# @file Makefile.prebuilt.template
+# @breif This is the file user has to setup locally for different host environment
+#
+# @param VOBJ object files applicable for compilation
+# @param LOBJ object files included in lib$(NAME).a
+# @param COBJ object files applicable to standard-make-targets
+#
+# @author Howard Chen
+##
+GCC ?= $(CROSS)gcc
+CC ?= $(GCC)
+CXX ?= $(CROSS)g++
+OBJDUMP = $(CROSS)objdump
+OBJCOPY = $(CROSS)objcopy
+AR = $(CROSS)ar
+
+SUBLPATH?= $(SUBVPATH)
+INCLUDE ?= $(DEF_INCLUDE)
+CFLAGS ?= $(DEF_CFLAGS)
+ASFLAGS ?= $(DEF_ASFLAGS)
+LDFLAGS ?= $(DEF_LDFLAGS)
+DOC_GEN ?= $(PREFIX)/APITemp.txt
+
+VPATH ?= src $(SUBVPATH)
+VOBJ ?= $(patsubst %.S,%.o, \
+ $(patsubst %.s,%.o, \
+ $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(VPATH),\
+ $(wildcard $(DIR)/*.S) \
+ $(wildcard $(DIR)/*.s) \
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))))
+
+LPATH ?= src $(SUBLPATH)
+LOBJ ?= $(patsubst %.S,%.o, \
+ $(patsubst %.s,%.o, \
+ $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(LPATH),\
+ $(wildcard $(DIR)/*.S) \
+ $(wildcard $(DIR)/*.s) \
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))))
+COBJ ?= $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(VPATH),\
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))
+DEP = $(COBJ:%.o=%.d)
+TEST = $(COBJ:%.o=%.x)
+RUNS = $(COBJ:%.o=%.x.run)
+
+MIN ?=1
+
+default: all
+
+all:
+
+gen_dir:
+ mkdir -p $(ROOT)/bin
+ mkdir -p $(ROOT)/${base_libdir}
+ mkdir -p $(ROOT)/$(includedir)/$(NAME)
+ifeq ($(strip $(MIN)),1)
+ mkdir -p $(ROOT)/doc
+else
+ mkdir -p $(ROOT)/doc/$(NAME)
+endif
+
+ mkdir -p $(ROOT)/test/$(NAME)
+
+install: gen_dir $(INSTALL)
+ rm -f $(ROOT)/${base_libdir}/lib$(NAME).* $(ROOT)/${base_libdir}/$(NAME).dll
+
+ifdef LIB
+ifneq ($(strip $(LIB)), dummy)
+ifneq ($(strip $(base_libdir)),"")
+ install -p ./$(base_libdir)/lib$(NAME).* $(ROOT)/$(base_libdir)/
+endif
+endif
+endif
+ bash -c 'if ls *.x > /dev/null 2>&1 ; then install *.x $(ROOT)/test/$(NAME); fi'
+ bash -c 'if [ -e ./$(includedir)/$(NAME) ] && [ "$(shell ls -A "./$(includedir)/$(NAME)")" ]; then rm -rf $(ROOT)/$(includedir)/$(NAME)/*; cp -af ./$(includedir)/$(NAME)/* $(ROOT)/$(includedir)/$(NAME); fi'
+ifeq ($(strip $(MIN)),1)
+else
+ install -p doc/html/* $(ROOT)/doc/$(NAME)/
+endif
+ bash -c 'if [ -e ./doc/$(NAME).files ]; then cp ./doc/$(NAME).files $(ROOT)/doc/$(NAME).files; fi'
+ bash -c 'if [ -e ./doc/$(NAME).info ]; then cp ./doc/$(NAME).info $(ROOT)/doc/$(NAME).info; fi'
+
+
+uninstall: $(UNINSTALL)
+ rm -rf $(ROOT)/$(includedir)/$(NAME)
+ rm -rf $(ROOT)/test/$(NAME)
+ifneq ($(strip $(LIB)), dummy)
+ cd $(ROOT)/$(base_libdir)/ && rm -f $(LIB)
+endif
+ rm -f $(ROOT)/doc/$(NAME).files
+ rm -f $(ROOT)/doc/$(NAME).info
+
+
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.template b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.template
new file mode 100644
index 0000000..3b51a2a
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/Makefile.template
@@ -0,0 +1,441 @@
+###
+# @file Makefile.template
+# @breif This is the file user has to setup locally for different host environment
+#
+# @param VOBJ object files applicable for compilation
+# @param LOBJ object files included in lib$(NAME).a
+# @param COBJ object files applicable to standard-make-targets
+#
+# @author Howard Chen
+##
+GCC ?= $(CROSS)gcc
+CC ?= $(GCC)
+CXX ?= $(CROSS)g++
+OBJDUMP = $(CROSS)objdump
+OBJCOPY = $(CROSS)objcopy
+AR = $(CROSS)ar
+
+SUBLPATH?= $(SUBVPATH)
+INCLUDE ?= $(DEF_INCLUDE)
+CFLAGS ?= $(DEF_CFLAGS)
+ASFLAGS ?= $(DEF_ASFLAGS)
+LDFLAGS ?= $(DEF_LDFLAGS)
+DOC_GEN ?= $(PREFIX)/APITemp.txt
+
+VPATH ?= src $(SUBVPATH)
+VOBJ ?= $(patsubst %.S,%.o, \
+ $(patsubst %.s,%.o, \
+ $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(VPATH),\
+ $(wildcard $(DIR)/*.S) \
+ $(wildcard $(DIR)/*.s) \
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))))
+
+LPATH ?= src $(SUBLPATH)
+LOBJ ?= $(patsubst %.S,%.o, \
+ $(patsubst %.s,%.o, \
+ $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(LPATH),\
+ $(wildcard $(DIR)/*.S) \
+ $(wildcard $(DIR)/*.s) \
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))))
+COBJ ?= $(patsubst %.c,%.o, \
+ $(patsubst %.cpp, %.o, \
+ $(notdir $(foreach DIR,$(VPATH),\
+ $(wildcard $(DIR)/*.c) \
+ $(wildcard $(DIR)/*.cpp)))))
+DEP = $(COBJ:%.o=%.d)
+TEST = $(COBJ:%.o=%.x)
+RUNS = $(COBJ:%.o=%.x.run)
+
+MIN ?=1
+
+default: all
+
+%.d: %.cpp
+ @wimac_conf.pl $(NAME) "$(CONFIG)"
+ifeq ($(strip $(STRICT)),1)
+ @wimac_rul.sh $<
+endif
+ @$(GCC) -M $(INCLUDE) -D _UNIT_ -D _EXE_ $(CONFIG) $< > $@
+
+%.d: %.c
+ @wimac_conf.pl $(NAME) "$(CONFIG)"
+ifeq ($(strip $(STRICT)),1)
+ @wimac_rul.sh $<
+endif
+#ifeq ($(strip $(MAKE_INDEX)),1)
+# @wimac_parse_idx.sh $<
+#endif
+ @$(GCC) -M $(INCLUDE) $(CFLAGS) -D _UNIT_ -D _EXE_ $(CONFIG) $< > $@
+
+%.e : %.cpp %.d
+ $(CXX) $(INCLUDE) $(CONFIG) -E $< > $(notdir $(<:%.cpp=%.e.cpp))
+
+%.e : %.c %.d
+ $(CC) $(CFLAGS) $(INCLUDE) $(CONFIG) -E $< > $(notdir $(<:%.c=%.e.c))
+
+%.o : %.cpp %.d
+ $(CXX) $(CXXFLAGS) $(INCLUDE) $(CONFIG) -c $<
+
+%.o : %.c %.d
+ $(CC) $(CFLAGS) $(INCLUDE) $(CONFIG) -c $<
+
+%.o: %.S
+ $(GCC) $(ASFLAGS) $(INCLUDE) $(CONFIG) -c $<
+
+%.o: %.s
+ $(GCC) $(ASFLAGS) $(INCLUDE) $(CONFIG) -c -x assembler-with-cpp $<
+
+%.o.text: %.o
+ $(CROSS)objdump -DS $^ > $@
+
+%.exe: %.elf
+ @cp $^ $@
+
+%.elf: %.c $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDE) $(CONFIG) -D _EXE_ -o $(notdir $(<:%.c=%.e.o)) -c $<
+ $(GCC) -o $@ $(notdir $(<:%.c=%.e.o)) $(LDFLAGS)
+
+%.elf: %.cpp $(LIB)
+ $(CC) $(CXXFLAGS) $(INCLUDE) $(CONFIG) -D _EXE_ -o $(notdir $(<:%.cpp=%.e.o)) -c $<
+ $(GCC) -o $@ $(notdir $(<:%.cpp=%.e.o)) $(LDFLAGS)
+
+%.elf.run:
+ @echo ""
+ @printf "%s%-8s%s\n" "-----[ " "$(@:%.elf.run=%)" " ]------------------------------------------------------"
+ @echo ""
+ $(RUN)$(@:%.x.run=%.x)
+
+%.elf.debug: %.elf
+ ddd --debugger $(CROSS)gdb $^
+
+%.elf.text: %.elf
+ $(CROSS)objdump -DS $^ > $@
+
+%.elf.srec: %.elf
+ $(CROSS)objcopy -Osrec $^ $@
+
+%.elf.hex8: %.elf.srec
+ srec2hex.exe $^ -p $(HEXPAD) > $@
+
+%.elf.hex16: %.elf.srec
+ srec2hex.exe $^ -p $(HEXPAD) -2 > $@
+
+%.elf.hex32: %.elf.srec
+ srec2hex.exe $^ -p $(HEXPAD) -4 > $@
+
+%.elf.img: %.elf
+ $(OBJCOPY) --strip-debug $^ $@
+
+%.elf.bin: %.elf.img
+ $(OBJCOPY) -O binary $^ $@
+
+%.elf.bin.gz: %.elf.bin
+ gzip -c $^ > $@
+
+%.elf.verilog:
+ @rm -f $(@:%.elf.verilog=%.elf)
+ @make $(@:%.elf.verilog=%.elf.text) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.elf.verilog=%.elf.hex8) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.elf.verilog=%.elf.hex16) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.elf.verilog=%.elf.hex32) LD_SCRIPT=-Tverilog.ld
+
+%.elf.sim %.elf.sim.dual %.elf.sim.app:
+ @rm -f $*.elf; \
+if [ $(NAME) == "base" ]; then \
+ startup=startupsim$(subst .,_,$(subst .sim,,$(suffix $@))).o; \
+else \
+ startup=$(ROOT)/${base_libdir}/startupsim$(subst .,_,$(subst .sim,,$(suffix $@))).o; \
+fi; \
+ make $*.elf.text DEP_LIBS="$(SIM_LIBS)" STARTUP=$$startup LD_SCRIPT=-Tsim$(filter app,$(subst .,,$(suffix $@))).ld; \
+ wimac_gen_sim.sh $*.elf
+
+%.x: %.c $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDE) $(CONFIG) -D _UNIT_ -o $(notdir $(<:%.c=%.x.o)) -c $<
+ifeq ($(strip $(STRICT)),1)
+ $(CROSS)nm $(notdir $(<:%.c=%.x.o)) | grep main
+endif
+ $(GCC) -o $@ $(notdir $(<:%.c=%.x.o)) $(LDFLAGS)
+
+%.x: %.cpp $(LIB)
+ $(CC) $(CXXFLAGS) $(INCLUDE) $(CONFIG) -D _UNIT_ -o $(notdir $(<:%.cpp=%.x.o)) -c $<
+ $(CXX) -o $@ $(notdir $(<:%.cpp=%.x.o)) $(LDFLAGS)
+
+%.x.run:
+ @echo ""
+ @printf "%s%-8s%s\n" "-----[ " "$(@:%.x.run=%)" " ]------------------------------------------------------"
+ @echo ""
+ $(RUN)$(@:%.x.run=%.x)
+
+%.x.debug: %.x
+ ddd --debugger $(CROSS)gdb $^
+
+%.x.text: %.x
+ $(CROSS)objdump -DS $^ > $@
+
+%.x.srec: %.x
+ $(CROSS)objcopy -Osrec $^ $@
+
+%.x.hex8: %.x.srec
+ srec2hex.exe $^ -p $(HEXPAD) > $@
+
+%.x.hex16: %.x.srec
+ srec2hex.exe $^ -p $(HEXPAD) -2 > $@
+
+%.x.hex32: %.x.srec
+ srec2hex.exe $^ -p $(HEXPAD) -4 > $@
+
+%.x.img: %.x
+ $(OBJCOPY) --strip-debug $< $@
+
+%.x.bin: %.x.img
+ $(OBJCOPY) -O binary $< $@
+
+%.x.bin.gz: %.x.bin
+ gzip -c $^ > $@
+
+%.x.verilog:
+ @rm -f $(@:%.x.verilog=%.x)
+ @make $(@:%.x.verilog=%.x.text) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.x.verilog=%.x.hex8) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.x.verilog=%.x.hex16) LD_SCRIPT=-Tverilog.ld
+ @make $(@:%.x.verilog=%.x.hex32) LD_SCRIPT=-Tverilog.ld
+
+%.x.sim %.x.sim.dual %.x.sim.app:
+ @rm -f $*.x; \
+if [ $(NAME) == "base" ]; then \
+ startup=startupsim$(subst .,_,$(subst .sim,,$(suffix $@))).o; \
+else \
+ startup=$(ROOT)/${base_libdir}/startupsim$(subst .,_,$(subst .sim,,$(suffix $@))).o; \
+fi; \
+ make $*.x.text DEP_LIBS="$(SIM_LIBS)" STARTUP=$$startup LD_SCRIPT=-Tsim$(filter app,$(subst .,,$(suffix $@))).ld; \
+ wimac_gen_sim.sh $*.x
+
+sinclude $(DEP)
+
+lib$(NAME).a:$(LOBJ)
+ $(AR) r $@ $?
+
+lib$(NAME).so:$(LOBJ)
+ @rm -f $@
+ $(GCC) -shared -o _$@ $^ $(LDFLAGS)
+ @mv _$@ $@
+
+$(NAME).dll:$(LOBJ)
+ $(CROSS)dlltool $(LOBJ) --export-all-symbols --output-def $(NAME).def
+ $(CROSS)dllwrap $(LOBJ) -def $(NAME).def -o $@ $(LDFLAGS)
+
+$(NAME).lib:$(NAME).dll
+ $(CROSS)dlltool --def $(NAME).def --output-lib $(NAME).lib
+
+signature.text:
+ @bash -c 'if [ "$(CROSS)" == "" ] ; then \
+ echo "native" > signature.text; \
+ else \
+ echo $(CROSS) > signature.text; \
+ fi'
+
+.PHONY:_dep_check _signature info.text
+_dep_check:
+ @echo ""
+ @echo "dependency checking"
+ @bash -c 'for d in $(DEP_LIBS); do\
+ if [ "$$(echo $(LIB) | grep lib$$d.a)" != "" ] || \
+ [ "$$(echo $(LIB) | grep $$d.dll)" != "" ] || \
+ [ "$$(echo $(LIB) | grep lib$$d.so)" != "" ]; then\
+ continue; \
+ elif [ ! -f $(ROOT)/${base_libdir}/lib$$d.a ] && \
+ [ ! -f $(ROOT)/${base_libdir}/$$d.dll ] && \
+ [ ! -f $(ROOT)/${base_libdir}/lib$$d.so ] && \
+ [ ! -f $(ROOT)/${libdir}/lib$$d.a ] && \
+ [ ! -f $(ROOT)/${libdir}/$$d.dll ] && \
+ [ ! -f $(ROOT)/${libdir}/lib$$d.so ] ; then\
+ echo "[NO INSTALL]: $$d"; \
+ echo " "; \
+ exit 1;\
+ else \
+ echo "[INSTALLED]: $$d "; \
+ fi; \
+ done'
+ @bash -c 'for d in $(DEP_MODS); do\
+ if [ -e $(ROOT)/usr/include/asm/arch/$(DEP_MODS) ]; then\
+ echo "[INSTALLED]: mod-$$d"; \
+ else \
+ echo "[NO INSTALL]: mod-$$d"; \
+ exit 1;\
+ fi;\
+ done'
+
+_signature: signature.text
+ @bash -c 'if [ "$(CROSS)" == "" ] ; then \
+ export cross=native; \
+ else \
+ export cross=$(CROSS) ;\
+ fi ; \
+ if [ "`cat signature.text | grep $$cross `" == "" ]; then\
+ echo "target conflict!!"; \
+ echo -n "original: "; \
+ cat signature.text; \
+ echo "current: $$cross"; \
+ exit 1;\
+ fi'
+
+info.text:
+ifeq ($(strip $(DEP_LIBS_AUTO)),1)
+ @echo DEP_LIBS=$(shell wimac_dep.sh $(NAME) "$(DEP_LIBS)" "$(DEP_LIBS_EX)") > $@
+else
+ @echo DEP_LIBS=$(DEP_LIBS) > $@
+endif
+
+_config:
+ @wimac_conf.pl $(NAME) "$(CONFIG)"
+
+all: _dep_check signature.text _signature _config $(ALL) lib
+
+gen_dir:
+ mkdir -p $(ROOT)/bin
+ mkdir -p $(ROOT)/${base_libdir}
+ mkdir -p $(ROOT)/include/$(NAME)
+ifeq ($(strip $(MIN)),1)
+ mkdir -p $(ROOT)/doc
+else
+ mkdir -p $(ROOT)/doc/$(NAME)
+endif
+
+ mkdir -p $(ROOT)/test/$(NAME)
+ifeq ($(strip $(MAKE_INDEX)),1)
+ mkdir -p $(ROOT)/doc/index/$(NAME)
+endif
+
+ifeq ($(strip $(MLOG_MODULE)),1)
+ifneq ($(shell echo $(CROSS) | grep -e "arm-none-linux-"),)
+.PHONY:mlog_cksrc
+mlog_cksrc:
+ @$(PREFIX)/bin/mlog.pl -C
+.PHONY:mlog_parse
+mlog_parse:
+ @$(PREFIX)/bin/mlog.pl -P
+endif
+endif
+
+#install: all doc gen_dir $(INSTALL)
+install: doc gen_dir $(INSTALL)
+ rm -f $(ROOT)/${base_libdir}/lib$(NAME).* $(ROOT)/${base_libdir}/$(NAME).dll
+ifneq ($(strip $(LIB)), dummy)
+ install -p $(LIB) $(ROOT)/${base_libdir}/
+endif
+ bash -c 'if ls *.x > /dev/null 2>&1 ; then install *.x $(ROOT)/test/$(NAME); fi'
+ bash -c 'if [ -e include ]; then rm -rf $(ROOT)/include/$(NAME)/*; cp -r include/* $(ROOT)/include/$(NAME)/; fi'
+ifeq ($(strip $(MIN)),1)
+else
+ install -p doc/html/* $(ROOT)/doc/$(NAME)/
+endif
+ cp module.files $(ROOT)/doc/$(NAME).files
+ cp info.text $(ROOT)/doc/$(NAME).info
+ifeq ($(strip $(MAKE_INDEX)),1)
+ wimac_gen_idx.sh $(ROOT) $(NAME)
+endif
+ifeq ($(strip $(MLOG_MODULE)),1)
+ifneq ($(shell echo $(CROSS) | grep -e "arm-none-linux-"),)
+ @$(PREFIX)/bin/mlog.pl -P
+endif
+endif
+
+lib: $(LIB)
+ @echo "[lib ] done"
+
+test.list.text:
+ @wimac_tst.sh
+
+test: $(TEST) test.list.text
+ @echo "[test] done"
+
+testrun: $(COBJ:%.o=%.x.run)
+ @echo "[testrun] done"
+
+run: $(RUNS)
+ @echo "[run] done"
+
+clean: $(CLEAN)
+ rm -f include/conf_$(NAME).h *.o *.so *.files *.a *.x *.lib *.def *.dll *.elf *.d *.text *.img *.srec *.bin *.hex *.short *.hex8
+ rm -rf doc index
+
+ifeq ($(strip $(MIN)),1)
+doc: info.text module.files
+ @touch module.files
+# @mkdir -p doc/html && touch doc/html/index.html
+else
+doc: info.text module.files $(wildcard include/*.h) $(DOC_GEN) $(DOC)
+ mkdir -p doc include
+ cat $(DOC_GEN) | sed -e 's/PNAME/lib$(NAME)/' > API.text
+ doxygen API.text
+ mkdir -p $(ROOT)/doc
+ wimac_doc.sh $(ROOT) > $(ROOT)/doc/index.html
+endif
+
+indent:
+ indent -kr -i8 `find -name "*.[h,c]"`
+
+module.files:
+ -find `pwd`/src `pwd`/include -name "*.h" -or -name "*.hxx" -or -name "*.[cCsS]" \
+ -or -name "*.cxx" -or -name "*.cpp" -or -name "*.inl" > module.files
+
+index:module.files
+ @bash -c 'rm -f cscope.files ; \
+ LIST=$$(ls $(ROOT)/doc/*.files 2>/dev/null) ; \
+ for T in $$LIST; do \
+ if [ $$T != $(ROOT)/doc/$(NAME).files ]; then \
+ cat $$T >> cscope.files; \
+ fi ; \
+ done'
+ cat module.files >> cscope.files
+ cscope -b -c -icscope.files
+
+alltargets:
+ @bash -c 'for T in $(CROSS_SUP) ; \
+ do \
+ T=$${T#native}; \
+ echo "building CROSS=$$T" ;\
+ make clean || exit 1 ;\
+ make install CROSS=$$T || exit 1 ;\
+ done; \
+ make clean || exit 1'
+
+target:
+ @bash -c 'select T in $(CROSS_SUP); do \
+ if [ $$T ] ; then \
+ break; \
+ else \
+ echo "invalid target"; \
+ fi ; \
+ done; \
+ if [ "$$T" = "native" ] ; then\
+ T=; \
+ fi; \
+ echo "building CROSS=$$T"; \
+ make clean || exit 1;\
+ make CROSS=$$T || exit 1;\
+ make install CROSS=$$T || exit 1;\
+ make clean || exit 1'
+
+auto_dep:
+ @wimac_auto.sh $(ROOT) "$(DEP_LIBS)" "$(LIB)" $(NAME) $(CROSS)
+
+auto: auto_dep all
+
+info:
+ @echo -n "current : "
+ @echo DEP_LIBS=$(DEP_LIBS)
+ @echo -n "calculated : DEP_LIBS="
+ @wimac_dep.sh $(NAME) "$(DEP_LIBS)" "$(DEP_LIBS_EX)"
+
+var:
+ @echo '$(VAR)'
+
+nfs_export:
+ wimac_nfsexport.sh
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_conf.pl b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_conf.pl
new file mode 100755
index 0000000..e1f017a
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_conf.pl
@@ -0,0 +1,45 @@
+#!/usr/bin/perl
+
+sub Output
+{
+ my ($var, $value) = @_;
+ print FD "#ifndef $var\n";
+ print FD "#define $var $value\n";
+ print FD "#else\n";
+ print FD "#undef $var\n";
+ print FD "#define $var $value\n";
+ print FD "#endif\n\n";
+}
+
+($name, $config) = @ARGV;
+$config =~ s/\'/"/g;
+@config = split / /, $config;
+
+open FD, ">include/conf_$name.h";
+print FD "/** \n";
+print FD " * \@file conf_$name.h \n";
+print FD " */ \n";
+print FD "#ifndef conf_$name" . "_h\n";
+print FD "#define conf_$name" . "_h\n\n";
+
+for ($i = 0; $i < @config; $i++) {
+ $_ = $config[$i];
+ s/-D//g;
+ if ($_){
+ if (/=/){
+ ($var, $value) = ($`, $');
+ if(($value =~ y/"//) == 1) {
+ do {
+ $value .= " " . $config[++$i];
+ } while ($i < @config && !($config[$i] =~ /"/));
+ }
+ Output($var, $value);
+ } else {
+ Output($_, 1);
+ }
+ }
+}
+
+print FD "#endif\n";
+close FD;
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_doc.sh b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_doc.sh
new file mode 100755
index 0000000..2ea8267
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_doc.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# @author Howard Chen
+# @brief generate the top index for each module doc
+SYSROOT=$1
+for i in ${SYSROOT}/doc/* ;
+do
+ if [ -d ${i} ]; then
+ module=${i##*/}
+ echo "<a href=\"${module}/index.html\">${module}</a>"
+ echo "<p>"
+ fi
+done
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_rul.sh b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_rul.sh
new file mode 100755
index 0000000..746d366
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/buildinit/files/bin/wimac_rul.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# @author Howard Chen
+# @brief if the input file violate rules, return 1, else 0
+#
+
+if [ $# != 1 ] || [ ! -f $F ] || [ ! ${F##*.} = "c" ]
+then
+ echo "usage: wimac_rul.sh <c_source>"
+ exit 1
+fi
+
+
+F=$1
+CMD_P=$(cat -n $F | grep @nostrict-g)
+if [ "$CMD_P" != "" ]
+then
+ echo "[PASS]: $F"
+ exit 0
+fi
+
+LINES=$(cat -n $F | sed -e /@nostrict/d | sed -e /\#include/d | gcc -E - | grep extern | sed -e /@nostrict/d )
+
+if [ "$LINES" != "" ]
+then
+ echo ""
+ echo ""
+ echo "[FAIL]: $F"
+ echo "$LINES"
+ echo "--------------------------------------------------------------------------------"
+ exit 1
+else
+ echo "[PASS]: $F"
+ exit 0
+fi
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/ecccifsd/ecccifsd_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/ecccifsd/ecccifsd_1.0.0.bb
new file mode 100644
index 0000000..7205cd2
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/ecccifsd/ecccifsd_1.0.0.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "mod-eccci_fsd module is a user space file system client for ccci_fs."
+
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=33021e5683364ac70382851bdf2e4dbd"
+
+
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/ccci_fsd/src"
+
+FILES_SOLIBSDEV = ""
+DEPENDS="libubox libnvram libfileop"
+
+inherit workonsrc systemd
+
+INSANE_SKIP_${PN} += "dev-deps"
+
+do_install() {
+ install -d ${D}/${sysconfdir}/init.d/
+ install -m 755 ${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/ccci_fsd/files/ccci_fsd.init ${D}/${sysconfdir}/init.d/ccci_fsd
+ install -d ${D}/usr/bin
+ install -m 755 ${S}/ccci_fsd ${D}/usr/bin/
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libccci/libccci_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/libccci/libccci_1.0.0.bb
new file mode 100644
index 0000000..f73b161
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libccci/libccci_1.0.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "CCCI util kernel module."
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=33021e5683364ac70382851bdf2e4dbd"
+
+
+inherit workonsrc systemd
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libccci/src"
+
+INSANE_SKIP_${PN} = "ldflags"
+INSANE_SKIP_${PN}-dev = "ldflags"
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/libccci.so"
+
+CFLAGS_append = " -fPIC"
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 libccci.so ${D}${libdir}
+
+ install -d ${D}${includedir}/libccci
+ install -m 0644 ${S}/include/* ${D}${includedir}/libccci
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libmodem-afe-ctrl/libmodem-afe-ctrl_1.0.0.bbappend b/IC_meta/mtk/2735/mtk-telephonyware/libmodem-afe-ctrl/libmodem-afe-ctrl_1.0.0.bbappend
new file mode 100644
index 0000000..8a6f31b
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libmodem-afe-ctrl/libmodem-afe-ctrl_1.0.0.bbappend
@@ -0,0 +1,2 @@
+DEPENDS="alsa-lib audio-mixer-ctrl"
+WORKONSRC = "${TOPDIR}/../src/multimedia/audio-misc/libmodem-afe-ctrl"
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libpal/libpal_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/libpal/libpal_1.0.0.bb
new file mode 100644
index 0000000..4092758
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libpal/libpal_1.0.0.bb
@@ -0,0 +1,66 @@
+#Basic Configuration
+DESCRIPTION = "LIBPAL"
+SECTION = "base"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS +="platform-libs build-init"
+
+PLATFORM_CHIP = "MT6735"
+BACH_PREFIX = "${STAGING_INCDIR}/install"
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libpal"
+
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+
+inherit deploy workonsrc
+
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
+ 'PROJECT=${PROJ}'\
+ 'PREFIX=${BACH_PREFIX}'\
+ 'PACKAGE_ARCH=${PACKAGE_ARCH}'\
+ 'PLATFORM_CHIP=${PLATFORM_CHIP}'\
+ 'BB_INCLUDE_ADD=${BB_INCLUDE_ADD}'\
+ 'BB_LDFLAGS_ADD=${BB_LDFLAGS_ADD}'"
+
+FILES_${PN} = "${base_libdir}/*.so\
+ ${base_bindir} \
+ /mnt\
+ /tmp\
+ /etc\
+ /test"
+
+FILES_${PN}-dev = "${includedir}"
+
+FILES_${PN}-staticdev = "${base_libdir}/*.a"
+
+FILES_${PN}-dbg = "/usr/src/debug \
+ ${base_libdir}/.debug \
+ ${base_bindir}"
+
+#Skip strip check in QA test.
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+do_compile () {
+ unset LDFLAGS
+ oe_runmake all ROOT=${STAGING_DIR_HOST}
+}
+
+do_install () {
+ oe_runmake install ROOT=${D}
+
+ if [ -d "${D}/include" ]; then
+ install -d ${D}${includedir}
+ cp -af ${D}/include/* ${D}${includedir}
+ rm -rf ${D}/include
+ fi
+
+
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libsncfg/libsncfg_1.0.0.bbappend b/IC_meta/mtk/2735/mtk-telephonyware/libsncfg/libsncfg_1.0.0.bbappend
new file mode 100644
index 0000000..946d037
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libsncfg/libsncfg_1.0.0.bbappend
@@ -0,0 +1,3 @@
+DEPENDS = "build-init platform-libs-common platform-libs-header virtual/crypt"
+PLATFORM_CHIP = "MT6735"
+BACH_PREFIX = "${STAGING_INCDIR}/install"
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libtrm/libtrm_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/libtrm/libtrm_1.0.0.bb
new file mode 100644
index 0000000..b265788
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libtrm/libtrm_1.0.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "This module is used for TRM."
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+
+inherit workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libtrm/lib"
+
+INSANE_SKIP_${PN} = "ldflags"
+INSANE_SKIP_${PN}-dev += "ldflags"
+
+FILES_${PN}-dev = "${includedir}/*"
+FILES_${PN} = "${libdir}/libtrm.so"
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${S}out/libtrm.so ${D}${libdir}
+ install -d ${D}${includedir}/libtrm
+ install -m 0644 ${S}/include/* ${D}${includedir}/libtrm
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt
new file mode 100644
index 0000000..9967672
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(uciwrapper)
+
+#add complie options
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fPIC -O2 -Wall")
+
+#add ld options
+set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -g -fPIC -O2")
+
+#add header files (-I -L)
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+
+#add source file
+file(GLOB src_fils "${CMAKE_CURRENT_SOURCE_DIR}/properties.c")
+
+set(link_libs uci)
+
+add_library(uciwrapper SHARED ${src_fils})
+target_link_libraries(uciwrapper ${link_libs})
+#install
+install(TARGETS uciwrapper
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE
new file mode 100644
index 0000000..c5c6f3b
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2020. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK 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 MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK 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 MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h
new file mode 100644
index 0000000..412428f
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/cutils/properties.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CUTILS_PROPERTIES_H
+#define __CUTILS_PROPERTIES_H
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+#include <sys/system_properties.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* System properties are *small* name value pairs managed by the
+** property service. If your data doesn't fit in the provided
+** space it is not appropriate for a system property.
+**
+** WARNING: system/bionic/include/sys/system_properties.h also defines
+** these, but with different names. (TODO: fix that)
+*/
+#define PROPERTY_KEY_MAX 64
+#define PROPERTY_VALUE_MAX 96
+
+/* property_get: returns the length of the value which will never be
+** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
+** (the length does not include the terminating zero).
+**
+** If the property read fails or returns an empty value, the default
+** value is used (if nonnull).
+*/
+int property_get(const char *key, char *value, const char *default_value);
+
+/* property_get_bool: returns the value of key coerced into a
+** boolean. If the property is not set, then the default value is returned.
+**
+* The following is considered to be true (1):
+** "1", "true", "y", "yes", "on"
+**
+** The following is considered to be false (0):
+** "0", "false", "n", "no", "off"
+**
+** The conversion is whitespace-sensitive (e.g. " off" will not be false).
+**
+** If no property with this key is set (or the key is NULL) or the boolean
+** conversion fails, the default value is returned.
+**/
+int8_t property_get_bool(const char *key, int8_t default_value);
+
+/* property_get_int64: returns the value of key truncated and coerced into a
+** int64_t. If the property is not set, then the default value is used.
+**
+** The numeric conversion is identical to strtoimax with the base inferred:
+** - All digits up to the first non-digit characters are read
+** - The longest consecutive prefix of digits is converted to a long
+**
+** Valid strings of digits are:
+** - An optional sign character + or -
+** - An optional prefix indicating the base (otherwise base 10 is assumed)
+** -- 0 prefix is octal
+** -- 0x / 0X prefix is hex
+**
+** Leading/trailing whitespace is ignored. Overflow/underflow will cause
+** numeric conversion to fail.
+**
+** If no property with this key is set (or the key is NULL) or the numeric
+** conversion fails, the default value is returned.
+**/
+int64_t property_get_int64(const char *key, int64_t default_value);
+
+/* property_get_int32: returns the value of key truncated and coerced into an
+** int32_t. If the property is not set, then the default value is used.
+**
+** The numeric conversion is identical to strtoimax with the base inferred:
+** - All digits up to the first non-digit characters are read
+** - The longest consecutive prefix of digits is converted to a long
+**
+** Valid strings of digits are:
+** - An optional sign character + or -
+** - An optional prefix indicating the base (otherwise base 10 is assumed)
+** -- 0 prefix is octal
+** -- 0x / 0X prefix is hex
+**
+** Leading/trailing whitespace is ignored. Overflow/underflow will cause
+** numeric conversion to fail.
+**
+** If no property with this key is set (or the key is NULL) or the numeric
+** conversion fails, the default value is returned.
+**/
+int32_t property_get_int32(const char *key, int32_t default_value);
+
+/* property_set: returns 0 on success, < 0 on failure
+*/
+int property_set(const char *key, const char *value);
+
+int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie);
+
+#if defined(__BIONIC_FORTIFY)
+
+extern int __property_get_real(const char *, char *, const char *)
+ __asm__(__USER_LABEL_PREFIX__ "property_get");
+__errordecl(__property_get_too_small_error, "property_get() called with too small of a buffer");
+
+__BIONIC_FORTIFY_INLINE
+int property_get(const char *key, char *value, const char *default_value) {
+ size_t bos = __bos(value);
+ if (bos < PROPERTY_VALUE_MAX) {
+ __property_get_too_small_error();
+ }
+ return __property_get_real(key, value, default_value);
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h
new file mode 100644
index 0000000..070853a
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/_system_properties.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+
+#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#error you should #include <sys/system_properties.h> instead
+#else
+#include <sys/system_properties.h>
+
+typedef struct prop_msg prop_msg;
+
+#define PROP_AREA_MAGIC 0x504f5250
+#define PROP_AREA_VERSION 0xfc6ed0ab
+#define PROP_AREA_VERSION_COMPAT 0x45434f76
+
+#define PROP_SERVICE_NAME "property_service"
+#define PROP_FILENAME "/dev/__properties__"
+
+#define PA_SIZE (128 * 1024)
+
+#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
+#define SERIAL_DIRTY(serial) ((serial) & 1)
+
+__BEGIN_DECLS
+
+struct prop_msg {
+ unsigned cmd;
+ char name[PROP_NAME_MAX];
+ char value[PROP_VALUE_MAX];
+};
+
+#define PROP_MSG_SETPROP 1
+
+/*
+** Rules:
+**
+** - there is only one writer, but many readers
+** - prop_area.count will never decrease in value
+** - once allocated, a prop_info's name will not change
+** - once allocated, a prop_info's offset will not change
+** - reading a value requires the following steps
+** 1. serial = pi->serial
+** 2. if SERIAL_DIRTY(serial), wait*, then goto 1
+** 3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1)
+** 4. if pi->serial != serial, goto 2
+**
+** - writing a value requires the following steps
+** 1. pi->serial = pi->serial | 1
+** 2. memcpy(pi->value, local_value, value_len)
+** 3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff)
+*/
+
+#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
+#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
+#define PROP_PATH_VENDOR_BUILD "/vendor/build.prop"
+#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
+#define PROP_PATH_FACTORY "/factory/factory.prop"
+
+/*
+** Map the property area from the specified filename. This
+** method is for testing only.
+*/
+int __system_property_set_filename(const char *filename);
+
+/*
+** Initialize the area to be used to store properties. Can
+** only be done by a single process that has write access to
+** the property area.
+*/
+int __system_property_area_init();
+
+/* Read the global serial number of the system properties
+**
+** Called to predict if a series of cached __system_property_find
+** objects will have seen __system_property_serial values change.
+** But also aids the converse, as changes in the global serial can
+** also be used to predict if a failed __system_property_find
+** could in-turn now find a new object; thus preventing the
+** cycles of effort to poll __system_property_find.
+**
+** Typically called at beginning of a cache cycle to signal if _any_ possible
+** changes have occurred since last. If there is, one may check each individual
+** __system_property_serial to confirm dirty, or __system_property_find
+** to check if the property now exists. If a call to __system_property_add
+** or __system_property_update has completed between two calls to
+** __system_property_area_serial then the second call will return a larger
+** value than the first call. Beware of race conditions as changes to the
+** properties are not atomic, the main value of this call is to determine
+** whether the expensive __system_property_find is worth retrying to see if
+** a property now exists.
+**
+** Returns the serial number on success, -1 on error.
+*/
+unsigned int __system_property_area_serial();
+
+/* Add a new system property. Can only be done by a single
+** process that has write access to the property area, and
+** that process must handle sequencing to ensure the property
+** does not already exist and that only one property is added
+** or updated at a time.
+**
+** Returns 0 on success, -1 if the property area is full.
+*/
+int __system_property_add(const char *name, unsigned int namelen,
+ const char *value, unsigned int valuelen);
+
+/* Update the value of a system property returned by
+** __system_property_find. Can only be done by a single process
+** that has write access to the property area, and that process
+** must handle sequencing to ensure that only one property is
+** updated at a time.
+**
+** Returns 0 on success, -1 if the parameters are incorrect.
+*/
+int __system_property_update(prop_info *pi, const char *value, unsigned int len);
+
+/* Read the serial number of a system property returned by
+** __system_property_find.
+**
+** Returns the serial number on success, -1 on error.
+*/
+unsigned int __system_property_serial(const prop_info *pi);
+
+/* Wait for any system property to be updated. Caller must pass
+** in 0 the first time, and the previous return value on each
+** successive call. */
+unsigned int __system_property_wait_any(unsigned int serial);
+
+/* Compatibility functions to support using an old init with a new libc,
+ ** mostly for the OTA updater binary. These can be deleted once OTAs from
+ ** a pre-K release no longer needed to be supported. */
+const prop_info *__system_property_find_compat(const char *name);
+int __system_property_read_compat(const prop_info *pi, char *name, char *value);
+int __system_property_foreach_compat(
+ void (*propfn)(const prop_info *pi, void *cookie),
+ void *cookie);
+
+/* Initialize the system properties area in read only mode.
+ * Should be done by all processes that need to read system
+ * properties.
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int __system_properties_init();
+
+__END_DECLS
+
+#endif
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h
new file mode 100644
index 0000000..feb5e40
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/include/sys/system_properties.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct prop_info prop_info;
+
+#define PROP_NAME_MAX 32
+#define PROP_VALUE_MAX 92
+
+/* Look up a system property by name, copying its value and a
+** \0 terminator to the provided pointer. The total bytes
+** copied will be no greater than PROP_VALUE_MAX. Returns
+** the string length of the value. A property that is not
+** defined is identical to a property with a length 0 value.
+*/
+int __system_property_get(const char *name, char *value);
+
+/* Set a system property by name.
+**/
+int __system_property_set(const char *key, const char *value);
+
+/* Return a pointer to the system property named name, if it
+** exists, or NULL if there is no such property. Use
+** __system_property_read() to obtain the string value from
+** the returned prop_info pointer.
+**
+** It is safe to cache the prop_info pointer to avoid future
+** lookups. These returned pointers will remain valid for
+** the lifetime of the system.
+*/
+const prop_info *__system_property_find(const char *name);
+
+/* Read the value of a system property. Returns the length
+** of the value. Copies the value and \0 terminator into
+** the provided value pointer. Total length (including
+** terminator) will be no greater that PROP_VALUE_MAX.
+**
+** If name is nonzero, up to PROP_NAME_MAX bytes will be
+** copied into the provided name pointer. The name will
+** be \0 terminated.
+*/
+int __system_property_read(const prop_info *pi, char *name, char *value);
+
+/* Return a prop_info for the nth system property, or NULL if
+** there is no nth property. Use __system_property_read() to
+** read the value of this property.
+**
+** This method is for inspecting and debugging the property
+** system. Please use __system_property_find() instead.
+**
+** Order of results may change from call to call. This is
+** not a bug.
+*/
+const prop_info *__system_property_find_nth(unsigned n);
+
+__END_DECLS
+
+#endif
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c
new file mode 100644
index 0000000..79f4c41
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/properties.c
@@ -0,0 +1,257 @@
+//SPDX-License-Identifier: MediaTekProprietary
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "libuciwrapper"
+// #define LOG_NDEBUG 0
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+//#include <cutils/sockets.h>
+#include <errno.h>
+#include <assert.h>
+
+#include <cutils/properties.h>
+#include <stdbool.h>
+#include <inttypes.h>
+#include <log/log.h>
+
+int8_t property_get_bool(const char *key, int8_t default_value) {
+ if (!key) {
+ return default_value;
+ }
+
+ int8_t result = default_value;
+ char buf[PROPERTY_VALUE_MAX] = {'\0',};
+
+ int len = property_get(key, buf, "");
+ if (len == 1) {
+ char ch = buf[0];
+ if (ch == '0' || ch == 'n') {
+ result = false;
+ } else if (ch == '1' || ch == 'y') {
+ result = true;
+ }
+ } else if (len > 1) {
+ if (!strcmp(buf, "no") || !strcmp(buf, "false") || !strcmp(buf, "off")) {
+ result = false;
+ } else if (!strcmp(buf, "yes") || !strcmp(buf, "true") || !strcmp(buf, "on")) {
+ result = true;
+ }
+ }
+
+ return result;
+}
+
+// Convert string property to int (default if fails); return default value if out of bounds
+static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_t upper_bound,
+ intmax_t default_value) {
+ if (!key) {
+ return default_value;
+ }
+
+ intmax_t result = default_value;
+ char buf[PROPERTY_VALUE_MAX] = {'\0',};
+ char *end = NULL;
+
+ int len = property_get(key, buf, "");
+ if (len > 0) {
+ int tmp = errno;
+ errno = 0;
+
+ // Infer base automatically
+ result = strtoimax(buf, &end, /*base*/0);
+ if ((result == INTMAX_MIN || result == INTMAX_MAX) && errno == ERANGE) {
+ // Over or underflow
+ result = default_value;
+ ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value);
+ } else if (result < lower_bound || result > upper_bound) {
+ // Out of range of requested bounds
+ result = default_value;
+ ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value);
+ } else if (end == buf) {
+ // Numeric conversion failed
+ result = default_value;
+ ALOGV("%s(%s,%" PRIdMAX ") - numeric conversion failed",
+ __FUNCTION__, key, default_value);
+ }
+
+ errno = tmp;
+ }
+
+ return result;
+}
+
+int64_t property_get_int64(const char *key, int64_t default_value) {
+ return (int64_t)property_get_imax(key, INT64_MIN, INT64_MAX, default_value);
+}
+
+int32_t property_get_int32(const char *key, int32_t default_value) {
+ return (int32_t)property_get_imax(key, INT32_MIN, INT32_MAX, default_value);
+}
+
+#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#include <sys/_system_properties.h>
+
+#include <uci.h>
+#define UCI_CONFIG_FILE "/etc/config/radio_property"
+
+static pthread_mutex_t property_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+int property_set(const char *key, const char *new_value) {
+
+ if (NULL == key || NULL == new_value) {
+ return 0;
+ }
+
+ pthread_mutex_lock(&property_mutex);
+
+ int retValue = 0;
+ int value = 0;
+ struct uci_context *_ctx = uci_alloc_context();
+ struct uci_ptr ptr;
+ struct uci_package *pkg = NULL;
+ memset(&ptr, 0, sizeof(ptr));
+
+ // replace '.' with '_' to avoid uci r/w error
+ char tmp_string[PROPERTY_KEY_MAX];
+ int str_i = 0;
+ strncpy(tmp_string, key, PROPERTY_KEY_MAX - 1);
+ for (str_i = 0; str_i < PROPERTY_KEY_MAX; str_i++) {
+ if (tmp_string[str_i] == '.') {
+ tmp_string[str_i] = '_';
+ }
+ }
+
+ ptr.package = "radio_property";
+ ptr.section = "property";
+ ptr.option = tmp_string;
+ if (strlen(new_value) == 0) {
+ ptr.value = ":empty";
+ } else {
+ ptr.value = new_value;
+ }
+ value = uci_set(_ctx, &ptr);
+ if (value == 0) {
+ value = uci_commit(_ctx, &ptr.p, false);
+ if (value == 0) {
+ retValue = 1;
+ ALOGV("property_set ok. %s=%s return %d\n", key, new_value, value);
+ } else {
+ ALOGE("property_set uci_commit fail %s=%s return %d\n", key, new_value, value);
+ }
+ } else {
+ ALOGE("uci_set fail %s=%s return %d\n", key, new_value, value);
+ }
+ uci_unload(_ctx, ptr.p);
+ uci_free_context(_ctx);
+ _ctx = NULL;
+
+ pthread_mutex_unlock(&property_mutex);
+ return retValue;
+}
+
+
+int property_get(const char *key, char *value, const char *default_value) {
+ if (NULL == key || NULL == value) {
+ return 0;
+ }
+
+ pthread_mutex_lock(&property_mutex);
+
+ int retValue = 0;
+ struct uci_context *uciCtx = uci_alloc_context();
+ const char *pValueData = NULL;
+ struct uci_package *pkg = NULL;
+ struct uci_element *e;
+
+ // replace '.' with '_' to avoid uci r/w error
+ char tmp_string[PROPERTY_KEY_MAX];
+ int str_i = 0;
+ strncpy(tmp_string, key, PROPERTY_KEY_MAX - 1);
+ for (str_i = 0; str_i < PROPERTY_KEY_MAX; str_i++) {
+ if (tmp_string[str_i] == '.') {
+ tmp_string[str_i] = '_';
+ }
+ }
+
+
+ if (UCI_OK != uci_load(uciCtx, UCI_CONFIG_FILE, &pkg)) {
+ if (default_value) {
+ int len = strlen(default_value);
+ memcpy(value, default_value, len);
+ value[len] = '\0';
+ retValue = 1;
+ }
+ ALOGE("%s(), uci load fail, file: %s\n", __FUNCTION__, UCI_CONFIG_FILE);
+ goto cleanup;
+ }
+
+ uci_foreach_element(&pkg->sections, e) {
+ struct uci_section *s = uci_to_section(e);
+ if (NULL != (pValueData = uci_lookup_option_string(uciCtx, s, tmp_string))) {
+ if (!strncmp(pValueData, ":empty", strlen(":empty"))) {
+ value[0] = '\0';
+ } else {
+ strncpy(value, pValueData, strlen(pValueData));
+ }
+ retValue = 1;
+ ALOGV("property_get, %s: %s\n", key, value);
+ }
+ }
+ if (!retValue) {
+ if (default_value) {
+ int len = strlen(default_value);
+ memcpy(value, default_value, len);
+ value[len] = '\0';
+ retValue = 1;
+ ALOGV("property_get use default value, %s: %s\n", key, value);
+ }
+ }
+
+ uci_unload(uciCtx, pkg);
+
+cleanup:
+ uci_free_context(uciCtx);
+ uciCtx = NULL;
+
+ pthread_mutex_unlock(&property_mutex);
+ return retValue;
+}
+
+
+struct property_list_callback_data {
+ void (*propfn)(const char *key, const char *value, void *cookie);
+ void *cookie;
+};
+
+static void property_list_callback(const prop_info *pi, void *cookie) {
+ char name[PROP_NAME_MAX];
+ char value[PROP_VALUE_MAX];
+ struct property_list_callback_data *data = cookie;
+
+ //__system_property_read(pi, name, value);
+ data->propfn(name, value, data->cookie);
+}
+
+int property_list(
+ void (*propfn)(const char *key, const char *value, void *cookie),
+ void *cookie) {
+ struct property_list_callback_data data = { propfn, cookie };
+ return 0;
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config
new file mode 100644
index 0000000..92c0dc3
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/files/radio_property.config
@@ -0,0 +1,26 @@
+config radio_property 'property'
+ option persist_radio_default_sim '0'
+ option ro_telephony_sim_count '2'
+ option persist_radio_dsss_sim_disable '2'
+ option persist_ril_client_num '1'
+ option persist_radio_multisim_config 'dsds'
+ option persist_vendor_radio_simswitch '1'
+ option persist_vendor_radio_airplane_mode_on 'false'
+ option persist_mtk_volte_enable '1'
+ option ro_vendor_mtk_disable_cap_switch '0'
+ option persist_vendor_radio_data_sim '1'
+ option persist_vendor_ims_support '1'
+ option persist_mtk_volte_enable1 '3'
+ option ro_lynq_sw_version 'T800v01.MP1_RC201b01'
+ option persist_mtk_volte_enable2 '1'
+ option ro_product_device 'mt2735evb-ivt-main'
+ option ro_product_manufacture 'MobileTek'
+ option ro_lynq_hw_version 'T800v04.MP1-MR3'
+ option ro_product_oem 'MobileTek'
+ option ro_spk_volume_level '5'
+ option ro_boot_opt_ps1_rat 'N/Lf/Lt/W/G'
+ option ro_vendor_mtk_protocol1_rat_config 'N/Lf/Lt/W/G'
+ option persist_vendor_radio_mtk_ps2_rat 'Lf/Lt/W/G'
+ option ro_boot_opt_lte_support '1'
+
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/libuciwrapper_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/libuciwrapper_1.0.0.bb
new file mode 100644
index 0000000..865a072
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libuciwrapper/libuciwrapper_1.0.0.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "This module provide wrapper of uci for telephony usage."
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c6f1271bbb802433a760613287d9d3aa"
+
+DEPENDS += "uci platform-libs-common"
+inherit workonsrc cmake
+WORKONSRC = "${TOPDIR}/../meta/meta-mediatek-mt2735/recipes-telephonyware/libuciwrapper/files"
+
+INSANE_SKIP_${PN} = "ldflags"
+FILES_SOLIBSDEV = ""
+FILES_${PN} = "${libdir}/libuciwrapper.so"
+FILES_${PN} += "/etc/config/radio_property"
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${S}/libuciwrapper.so ${D}${libdir}/
+ install -d ${D}/etc/config
+ install -m 0644 ${S}/radio_property.config ${D}/etc/config/radio_property
+}
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/libvendor-ril/libvendor-ril_1.0.0.bbappend b/IC_meta/mtk/2735/mtk-telephonyware/libvendor-ril/libvendor-ril_1.0.0.bbappend
new file mode 100644
index 0000000..390dfba
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/libvendor-ril/libvendor-ril_1.0.0.bbappend
@@ -0,0 +1,3 @@
+PLATFORM_CHIP = "MT6735"
+
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libvendor-ril"
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mcf-cmd/mcf-cmd_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mcf-cmd/mcf-cmd_1.0.0.bb
new file mode 100755
index 0000000..2886c7e
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mcf-cmd/mcf-cmd_1.0.0.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "This module to configure MCF"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=33021e5683364ac70382851bdf2e4dbd"
+
+inherit workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/mcf_cmd"
+
+FILES_${PN} = "${bindir}/mcf_cmd"
+
+DEPENDS += " mipc"
+
+MCF_CFLAGS_ADD = " -I${STAGING_DIR_HOST}/usr/include/mipc/api \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/common \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/msg \
+ -D_LINUX \
+"
+
+CFLAGS_append = "${MCF_CFLAGS_ADD}"
+LDFLAGS_append = " -lmipc_msg -lpthread"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 mcf_cmd ${D}${bindir}
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mipc/mipc_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mipc/mipc_1.0.0.bb
new file mode 100755
index 0000000..bbeb9bc
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mipc/mipc_1.0.0.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "This module is a demo for MIPC."
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://${MTK_LICENSE_DIR}/MediaTekProprietary;md5=c5d17c6905715d0948a3d6087602d12d"
+
+inherit workonsrc
+WORKONSRC = "${MIPC_DIR}"
+
+DEPENDS += "libtrm"
+
+INSANE_SKIP_${PN} = "ldflags"
+FILES_SOLIBSDEV = ""
+
+FILES_${PN}-dev = "${includedir}/*"
+FILES_${PN} = "${libdir}/libmipc_msg.so"
+
+do_compile_prepend() {
+ tar zxvf ${S}mipc.release.tar.gz
+
+ sed -i -e 's/CC = gcc/#CC = gcc/g' ${S}/Makefile
+ sed -i -e 's/CXX = g++/#CXX = g++/g' ${S}/Makefile
+ sed -i -e 's/AR = ar/#AR = ar/g' ${S}/Makefile
+ sed -i -e 's/CC = gcc/#CC = gcc/g' ${S}/Makefile.build
+ sed -i -e 's/CXX = g++/#CXX = g++/g' ${S}/Makefile.build
+ sed -i -e 's/AR = ar/#AR = ar/g' ${S}/Makefile.build
+}
+
+CFLAGS_append = " -DENABLE_TRM"
+CXXFLAGS_append = " -DENABLE_TRM"
+LDFLAGS_append = " -ldl"
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${S}/out/libmipc_msg.so ${D}${libdir}
+
+ install -d ${D}${includedir}/mipc/common/
+ install -d ${D}${includedir}/mipc/msg/
+ install -d ${D}${includedir}/mipc/external/
+ install -m 0644 ${S}/include/common/*.h ${D}${includedir}/mipc/common/
+ install -m 0644 ${S}/include/msg/*.h ${D}${includedir}/mipc/msg/
+ install -m 0644 ${S}/include/external/*.h ${D}${includedir}/mipc/external/
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mita/mita_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mita/mita_1.0.0.bb
new file mode 100644
index 0000000..9812872
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mita/mita_1.0.0.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "MTK MiTA daemon"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+
+S = "${WORKDIR}"
+
+inherit workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/mita"
+
+DEPENDS += " mipc curl mosquitto libccci"
+
+RDEPENDS_${PN} += " python3 ntp ntpdate mipc curl mosquitto libccci"
+
+
+inherit systemd
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = " mita.service "
+
+# SRC_URI += "file://mita.service"
+
+FILES_${PN} += "${bindir}/mita"
+FILES_${PN} += "${bindir}/mita_core/* \
+ ${systemd_unitdir}/system/mita.service \
+"
+
+
+EXTRA_OEMAKE = 'PLATFORM="TELEMATICS"'
+EXTRA_OEMAKE += 'MITA_VERSION="${@time.strftime('MiTA\(Yocto\)_V01.%y%U.0%w',time.gmtime())}"'
+EXTRA_OEMAKE += 'CONFIG_MITA_MDM_SUPPORT="y"'
+EXTRA_OEMAKE += 'CONFIG_MITA_SERVER_AGENT_SUPPORT="y"'
+
+MITA_CFLAGS_ADD = " -I${STAGING_DIR_HOST}/usr/include/mipc/api \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/common \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/msg \
+ -I${STAGING_DIR_HOST}/usr/include \
+ -I${STAGING_DIR_HOST}/usr/include/curl \
+ -I${STAGING_DIR_HOST}/usr/include/libccci \
+ -I${STAGING_DIR_HOST}/${libdir} \
+ -D_LINUX -DTELEMATICS -fPIC -DSERVER_AGENT_ENABLE \
+"
+
+CFLAGS_append = "${MITA_CFLAGS_ADD}"
+CXXFLAGS_append = "${MITA_CFLAGS_ADD}"
+LDFLAGS_append = " -L${STAGING_DIR_HOST}/${libdir} -lmipc_msg -lpthread -ldl -lrt"
+EXTRA_OEMAKE += 'LIBS="-lmipc_msg -lpthread -ldl -lmosquitto -lcurl -luuid -lmdm_server"'
+
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${systemd_unitdir}/system/
+ install -d ${D}${bindir}/mita_core
+ install -m 0755 mita ${D}${bindir}/mita_core
+ install -m 0644 ${S}/*.so* ${D}${bindir}/mita_core
+ install -m 0644 ${S}/py/* ${D}${bindir}/mita_core
+ install -m 0644 ${S}/files/mita.service ${D}${systemd_unitdir}/system
+ ln -sr ${D}${bindir}/mita_core/mita ${D}${bindir}/mita
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/modem-init/modeminit_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/modem-init/modeminit_1.0.0.bb
new file mode 100644
index 0000000..870ef56
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/modem-init/modeminit_1.0.0.bb
@@ -0,0 +1,22 @@
+#Basic Configuration
+DESCRIPTION = "Modem-init implements modem initialization."
+SECTION = "base"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=33021e5683364ac70382851bdf2e4dbd"
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/ccci_mdinit/src"
+
+FILES_SOLIBSDEV = ""
+DEPENDS="libccci"
+
+#LIBS+="-lccci -lpthread"
+CFLAGS+="-I/${STAGING_DIR_HOST}/usr/include/libccci"
+
+inherit workonsrc
+
+do_install() {
+ install -d ${D}/${sysconfdir}/init.d/
+ install -m 755 ${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/ccci_mdinit/files/ccci_mdinit.init ${D}/${sysconfdir}/init.d/ccci_mdinit
+ install -d ${D}/usr/bin
+ install -m 755 ${S}/ccci_mdinit ${D}/usr/bin/
+}
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libfileop_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libfileop_1.0.0.bb
new file mode 100644
index 0000000..e1398b7
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libfileop_1.0.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "This package for mtk nvram implementation"
+LICENSE = "MediaTekProprietary"
+
+inherit deploy workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/mtk_nvram/src"
+
+DEPENDS = "libnvram"
+
+INSANE_SKIP_${PN} = "ldflags"
+FILES_SOLIBSDEV = ""
+FILES_${PN} = "${libdir}/libfile_op.so"
+
+do_compile() {
+ oe_runmake -f ${B}Makefile.libfile_op
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 libfile_op.so ${D}${libdir}
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libnvram_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libnvram_1.0.0.bb
new file mode 100644
index 0000000..6476c72
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/libnvram_1.0.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "This package for mtk nvram implementation"
+LICENSE = "MediaTekProprietary"
+
+inherit deploy workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/mtk_nvram/src"
+
+DEPENDS += "libubox"
+
+INSANE_SKIP_${PN} = "ldflags"
+INSANE_SKIP_${PN}-dev = "ldflags"
+
+FILES_SOLIBSDEV = ""
+FILES_${PN}-dev = "${includedir}/*"
+FILES_${PN} = "${libdir}/libnvram.so"
+
+do_compile() {
+ oe_runmake -f ${B}Makefile.libnvram
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 libnvram.so ${D}${libdir}
+ install -d ${D}${includedir}
+ install -m 0644 ${S}/libnvram/libnvram.h ${D}${includedir}
+}
+
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/nvram-daemon_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/nvram-daemon_1.0.0.bb
new file mode 100644
index 0000000..525aeab
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mtk-nvram/nvram-daemon_1.0.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "This package for mtk nvram implementation"
+LICENSE = "MediaTekProprietary"
+
+inherit deploy workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/mtk_nvram/src"
+
+TARGET_CC_ARCH += "-pthread"
+
+DEPENDS = "libfileop libnvram libubox"
+
+FILES_${PN} = "${bindir}/nvram_daemon"
+
+do_compile() {
+ oe_runmake -f ${B}Makefile.nvram_daemon
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 ${S}/nvram_daemon ${D}${bindir}
+}
+
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/files/LICENSE b/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/files/LICENSE
new file mode 100644
index 0000000..77f59ed
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK 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 MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK 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 MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/mtkfusionrild.bb b/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/mtkfusionrild.bb
new file mode 100644
index 0000000..e97afec
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/mtkfusionrild/mtkfusionrild.bb
@@ -0,0 +1,34 @@
+SUMMARY = "telephonyware layer to support interaction with modem"
+DESCRIPTION = "telephonyware RIL-Daemon. It provide channel to telephony framework & modem HW."
+FILESEXTRAPATHS_append := ":${THISDIR}/files"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+
+DEPENDS = "platform-libs mipc libuciwrapper netagent"
+
+#Skip strip check in QA test
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "dev-deps"
+INSANE_SKIP_${PN} += "ldflags dev-so"
+INSANE_SKIP_${PN}-dev += "ldflags"
+
+WORKONSRC="${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/hardware/ril"
+
+inherit cmake workonsrc systemd
+EXTRA_OECMAKE = "-DTELEMATICS=1 -DMIPC_MSG_INCDIR=${STAGING_DIR_HOST}/usr/include/mipc"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "mtkfusionrild.service"
+
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/lib*.so"
+FILES_${PN}-dev = "${includedir} "
+FILES_${PN} += "${systemd_unitdir}/system/mtkfusionrild.service"
+FILES_${PN} += "${datadir}/init/init_mtkfusionrild"
+
+do_install_append() {
+ install -d ${D}${datadir}/init
+ install -m 0755 ${S}/init_mtkfusionrild ${D}${datadir}/init/init_mtkfusionrild
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/mtkfusionrild.service ${D}${systemd_unitdir}/system
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.0.bb
new file mode 100644
index 0000000..da73e42
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "MTK netagent"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "libgcc libubox mipc ubus"
+inherit workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/netagent/"
+
+INSANE_SKIP_${PN} = "ldflags"
+INSANE_SKIP_${PN} += "dev-deps"
+inherit autotools
+
+do_configure_prepend () {
+ cp -f ${TOPDIR}/../meta/meta-mediatek-mt2735/recipes-telephonyware/netagent/files/Makefile ${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/netagent
+}
+
+do_install() {
+ install -d ${D}/usr/bin/
+ install -m 0755 ${S}mtk_netagent ${D}/usr/bin/
+ install -m 0755 ${S}mtk_ia ${D}/usr/bin/
+ install -m 0755 ${S}mtk_act_data_call ${D}/usr/bin/
+ install -m 0755 ${S}mtk_deact_data_call ${D}/usr/bin/
+}
\ No newline at end of file
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.1.bb b/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.1.bb
new file mode 100644
index 0000000..3c3bc94
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/netagent/netagent_1.0.1.bb
@@ -0,0 +1,56 @@
+DESCRIPTION = "MTK netagent"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+
+inherit workonsrc
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/netagent/src"
+
+DEPENDS += " libubox mipc ubus uci platform-libs"
+
+INSANE_SKIP_${PN} += "dev-deps ldflags"
+FILES_${PN} += "${libdir}/libnetagent.so"
+FILES_${PN}-dev = "${includedir}/*"
+FILES_SOLIBSDEV = ""
+
+export EXTRA_CFLAGS += "-Wl,--hash-style=gnu"
+
+LDFLAGS += "-Wl,--hash-style=gnu"
+
+NETAGENT_CFLAGS_ADD = " -I${STAGING_DIR_HOST}/usr/include/mipc/api \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/common \
+ -I${STAGING_DIR_HOST}/usr/include/mipc/msg \
+ -I${STAGING_DIR_HOST}/usr/include \
+ -I${WORKDIR}/${PN}-${PV}/include \
+ -D_LINUX \
+ -lpthread \
+"
+
+
+
+CFLAGS_append = "${NETAGENT_CFLAGS_ADD} -D __ANDROID__"
+CXXFLAGS_append = "${NETAGENT_CFLAGS_ADD} -D __ANDROID__"
+
+
+do_compile () {
+ oe_runmake all
+}
+
+
+do_install() {
+ install -d ${D}/usr/bin/
+
+ install -d ${D}/${libdir}/
+ install -d ${D}/usr/include/netagent
+ install -d ${D}/usr/include/netagent/sysutils
+ install -d ${D}/usr/include/netagent/ioutils
+ install -d ${D}/usr/include/netagent/netutils
+
+ install -m 0755 ${S}libnetagent/*.h ${D}/usr/include/netagent/
+ install -m 0755 ${S}libnetagent/nautils/include/sysutils/*.h ${D}/usr/include/netagent/sysutils/
+ install -m 0755 ${S}libnetagent/nautils/include/ioutils/netagent_io.h ${D}/usr/include/netagent/ioutils/
+ install -m 0755 ${S}libnetagent/nautils/include/netutils/ifc.h ${D}/usr/include/netagent/netutils/
+ install -m 0755 ${S}libnetagent.so ${D}/${libdir}/
+ install -m 0755 ${S}mtk_ia ${D}/usr/bin/
+ install -m 0755 ${S}mtk_act_data_call ${D}/usr/bin/
+ install -m 0755 ${S}mtk_deact_data_call ${D}/usr/bin/
+}
diff --git a/IC_meta/mtk/2735/mtk-telephonyware/tele-fwk/tele-fwk_1.0.0.bb b/IC_meta/mtk/2735/mtk-telephonyware/tele-fwk/tele-fwk_1.0.0.bb
new file mode 100644
index 0000000..cbb1220
--- /dev/null
+++ b/IC_meta/mtk/2735/mtk-telephonyware/tele-fwk/tele-fwk_1.0.0.bb
@@ -0,0 +1,80 @@
+#Basic Configuration
+DESCRIPTION = "Library for RILD"
+SECTION = "base"
+LICENSE = "MediaTekProprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS = "platform-libs platform-libs-common gstreamer1.0 glib-2.0 libapn libpal"
+
+WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/IC_src/mtk/telephonyware/3.0/libvendor-ril"
+
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+
+inherit deploy workonsrc systemd
+
+PLATFORM_CHIP = "MT6735"
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
+ 'ROOT=${STAGING_DIR_HOST}'\
+ 'PREFIX=${BACH_PREFIX}'\
+ 'PACKAGE_ARCH=${PACKAGE_ARCH}'\
+ 'PLATFORM_CHIP=${PLATFORM_CHIP}'\
+ 'BB_INCLUDE_ADD=${BB_INCLUDE_ADD}'\
+ 'BB_LDFLAGS_ADD=${BB_LDFLAGS_ADD}'\
+ 'BB_TELEFWK_OPTION=true'\
+ 'RAT_CONFIG_C2K_SUPPORT = ${RAT_CONFIG_C2K_SUPPORT}'\
+ 'MTK_MULTI_SIM_SUPPORT = ${MTK_MULTI_SIM_SUPPORT}' \
+ 'MTK_HAS_HAL2MNL_EXT_SERVER=true'"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "tele-fwk.service"
+
+FILES_${PN} = "${base_bindir}\
+ ${base_sbindir} \
+ /etc/dbus-1/system.d/"
+
+FILES_${PN}-dev = "/test \
+ ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+ ${base_libdir}/.debug \
+ ${base_sbindir}/.debug"
+
+FILES_${PN} += "${systemd_unitdir}/system/tele-fwk.service"
+FILES_${PN} += "${datadir}/init/init_telefwk"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+do_compile () {
+ if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
+ oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu"
+ elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
+ oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu"
+ else
+ oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu"
+ fi
+}
+
+do_install () {
+ oe_runmake install ROOT=${D}
+
+ if [ -d "${WORKONSRC}" ] ; then
+ install -d ${D}${datadir}/init
+ install -m 0755 ${S}/tele_fwk/init_telefwk ${D}${datadir}/init/init_telefwk
+ install -d ${D}${includedir}/vendor-ril
+ cp -af ${S}/include/telephony/ril.h ${D}${includedir}/vendor-ril
+ cp -af ${S}/include/telephony ${D}${includedir}/vendor-ril
+ install -d ${D}/etc/dbus-1/system.d
+ install -m 0644 ${S}/mtk-rilproxy/telephony/sdk/data_sdk.conf ${D}/etc/dbus-1/system.d
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/tele_fwk/tele-fwk.service ${D}${systemd_unitdir}/system
+ fi
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
diff --git a/IC_meta/mtk/2735/suspend-service/files/autosuspend_wakeup_count.c b/IC_meta/mtk/2735/suspend-service/files/autosuspend_wakeup_count.c
index dcb82a6..9720e5d 100755
--- a/IC_meta/mtk/2735/suspend-service/files/autosuspend_wakeup_count.c
+++ b/IC_meta/mtk/2735/suspend-service/files/autosuspend_wakeup_count.c
@@ -253,8 +253,6 @@
return -1;
}
- system("hwclock -w");
- RLOGD("TIME: sys to rtc\n");
system("echo \"autosuspend:Sys seek\" >/dev/console");
RLOGD("suspend_ctrl: start write reg_netsys\n");
@@ -267,6 +265,7 @@
return -1;
}
}
+
for(i=0;i<5;i++)
{
RLOGD("suspend_ctrl: start read wakeup_count\n");