[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6
MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF modem version: NA
Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/make/module/driver/audio/extern/audio.mak b/mcu/make/module/driver/audio/extern/audio.mak
new file mode 100644
index 0000000..642f963
--- /dev/null
+++ b/mcu/make/module/driver/audio/extern/audio.mak
@@ -0,0 +1,288 @@
+# Define source file folder to SRC_LIST
+# ifeq ($(strip $(DSP_SOLUTION)),DUALMACDSP)
+# AUDFOLDER = driver/audio/src/v2
+# AUD_SOLUTION = V2
+# else
+ AUDFOLDER = driver/audio/src/v1
+ AUD_SOLUTION = V1
+# endif
+
+######################################################
+# Temp solution #
+######################################################
+#SRC_LIST = $(strip $(AUDFOLDER))/dummy_audio.c \
+# $(strip $(AUDFOLDER))/L/dummy_audio_L.c
+
+
+######################################################
+# Should remove first "# " for normal mode #
+######################################################
+ ##ifeq ($(strip $(GERAN_MODE_SUPPORT)),NONE)
+ ifneq ($(strip $(TEST_LOAD_TYPE)),NONE)
+ SRC_LIST = $(strip $(AUDFOLDER))/dummy_audio.c \
+ $(strip $(AUDFOLDER))/L/dummy_audio_L.c
+ else
+
+ ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
+ ifeq ($(strip $(DHL_SUPPORT)),TRUE)
+ SRC_LIST = $(strip $(CUS_MTK_REL))/dhl/l1trace/l1audio_trace_utmd.c
+ SRC_LIST += $(strip $(CUS_MTK_REL))/dhl/l1trace/l1audio_voc_utmd.c
+ else
+ SRC_LIST = $(strip $(CUS_MTK_REL))/tst/l1trace/l1audio_trace_utmd.c
+ SRC_LIST += $(strip $(CUS_MTK_REL))/tst/l1trace/l1audio_voc_utmd.c
+ endif
+ else
+ SRC_LIST = $(strip $(CGEN_L1_OUTDIR))/l1audio_trace_utmd.c
+ SRC_LIST += $(strip $(CGEN_L1_OUTDIR))/l1audio_voc_utmd.c
+ endif
+
+ # Start Define source file lists to SRC_LIST
+ # Common part in v1 and v2
+ SRC_LIST += $(strip $(AUDFOLDER))/am.c \
+ $(strip $(AUDFOLDER))/audio_service.c \
+ $(strip $(AUDFOLDER))/l1audio_sph_srv.c \
+ $(strip $(AUDFOLDER))/media.c \
+ $(strip $(AUDFOLDER))/extcodec.c \
+ $(strip $(AUDFOLDER))/pcm4way.c \
+ $(strip $(AUDFOLDER))/sp_drv.c \
+ $(strip $(AUDFOLDER))/vm.c \
+ $(strip $(AUDFOLDER))/sp_cc.c \
+ driver/audio/src/audio_create.c \
+ $(strip $(AUDFOLDER))/sp_c2k.c \
+ $(strip $(AUDFOLDER))/speech_service.c \
+ $(strip $(AUDFOLDER))/sp_dsptone_drv.c \
+ $(strip $(AUDFOLDER))/L/am_L.c
+
+ # AFE part
+ AFE_SPLIT_DRIVER_PLATFORM = MT6763 MT6739 MT6771 MT6761 MT6295M MT6765 __MD95__ __MD97__ __MD97P__
+ ifneq ($(filter $(strip $(MODULE_DEFS)), $(AFE_SPLIT_DRIVER_PLATFORM)),)
+ SRC_LIST += $(strip $(AUDFOLDER))/afe_common.c \
+
+ ifeq ($(strip $(PLATFORM)),MT2735)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6297.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6890)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6297.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6880)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6297.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MERCURY)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6298.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6885)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6833)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6877)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6873)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6853)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6893)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6885.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6763)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6763.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6739)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6739.c
+ endif
+ ifeq ($(strip $(PLATFORM)),MT6779)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6779.c
+ endif
+ ifeq ($(strip $(PLATFORM)),MT6761)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6761.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6771)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6771.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6295M)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6295M.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT3967)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6295M.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6785)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6295M.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6765)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6765.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6297)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6297.c
+ endif
+
+ ifeq ($(strip $(PLATFORM)),MT6297P)
+ SRC_LIST += $(strip $(AUDFOLDER))/afes/afe_6297.c
+ endif
+ else
+ SRC_LIST += $(strip $(AUDFOLDER))/afe2.c
+ endif
+
+
+ # By Feature
+ ifneq ($(filter __ENABLE_SPEECH_DVT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/speech_dvt.c
+ endif
+
+ ifneq ($(filter __DATA_CARD_SPEECH__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_strm_drv.c
+ endif
+
+ ifneq ($(filter __CVSD_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/bt_sco_drv.c
+ endif
+
+ ifneq ($(filter __ECALL_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/eCall_drv.c
+ endif
+
+
+ ifeq ($(strip $(AUD_SOLUTION)),V1)
+ SRC_LIST += $(strip $(AUDFOLDER))/audio_idma.c \
+ $(strip $(AUDFOLDER))/sp_enhance.c \
+ $(strip $(AUDFOLDER))/sp_daca.c \
+ $(strip $(AUDFOLDER))/pcmRouter.c \
+ $(strip $(AUDFOLDER))/ExtBgSnd.c \
+ $(strip $(AUDFOLDER))/rawpcmrec_drv.c \
+ $(strip $(AUDFOLDER))/sp_gain.c \
+ $(strip $(AUDFOLDER))/PcmMixer2.c \
+ $(strip $(AUDFOLDER))/PcmMixer3.c
+ ifneq ($(strip $(SMART_PHONE_CORE)),NONE)
+ SRC_LIST += $(strip $(AUDFOLDER))/wm8904_config.c
+ ifneq ($(strip $(SMART_PHONE_CORE)),MODEM_ONLY)
+ SRC_LIST += $(strip $(AUDFOLDER))/spc_drv.c \
+ # $(strip $(AUDFOLDER))/spc_io.c
+ else
+# SRC_LIST += $(strip $(AUDFOLDER))/apAudSysConfig.c
+ endif
+ endif
+ endif
+
+ ifeq ($(strip $(AUD_SOLUTION)),V2)
+ SRC_LIST += $(strip $(AUDFOLDER))/vm_drv.c
+ ifneq ($(strip $(SMART_PHONE_CORE)),NONE)
+ SRC_LIST += $(strip $(AUDFOLDER))/spc_drv.c
+ endif
+ endif
+
+ ifneq ($(filter __VOLTE_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_codec_amr.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_codec_evs.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_codec_g.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_dsp_opt.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_aam.c
+ SRC_LIST += $(strip $(AUDFOLDER))/sp_ps_aamp.c
+
+ ifneq ($(filter __MCU_DTMF_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/VoLTETone.c
+ endif
+ #ifneq ($(filter __G_CODEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/pcmrb.c
+ SRC_LIST += $(strip $(AUDFOLDER))/streamrb.c
+ #endif
+ endif
+
+ ifneq ($(filter __UMTS_RAT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/amr_table.c \
+ $(strip $(AUDFOLDER))/sp_3g.c
+ else
+ ifneq ($(filter __UMTS_TDD128_MODE__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/amr_table.c \
+ $(strip $(AUDFOLDER))/sp_3g.c
+ endif
+ endif
+
+ # ifneq ($(filter BGSND_ENABLE, $(strip $(MODULE_DEFS))),)
+ # ifeq ($(strip $(AUD_SOLUTION)),V1)
+ # SRC_LIST += $(strip $(AUDFOLDER))/ExtBgSnd.c
+ # endif
+ # ifeq ($(strip $(AUD_SOLUTION)),V2)
+ # SRC_LIST += $(strip $(AUDFOLDER))/snd_effect.c
+ # endif
+ # endif
+
+ ifneq ($(filter __CTM_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += $(strip $(AUDFOLDER))/ctm_drv.c
+ endif
+
+ endif
+
+# Define include path lists to INC_DIR
+INC_DIR = $(strip $(AUDFOLDER)) \
+ $(strip $(AUDFOLDER))/inc \
+ interface/driver/audio \
+ driver/audio/src32_inc \
+ driver/audio/lib/MTKINC \
+ driver/sys_drv/init/inc \
+ interface/driver/peripheral \
+ ./interface/sap \
+ ./interface/sap/md \
+ interface/driver/devdrv/mdipc \
+ ./custom/driver/common \
+ interface/driver/sleep_drv \
+ interface/protocol/general \
+ interface/driver/sys_drv \
+ ./interface/service/dhl \
+ interface/driver/devdrv/cuif/inc \
+ ./interface/service/dhl \
+ interface/l1/cl1/rfd
+
+#ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297)
+INC_DIR += interface/protocol/enl2
+#else
+#INC_DIR += protocol/interface/el2
+#endif
+
+INC_DIR += interface/sap/md
+INC_DIR += interface/protocol/3g/csr
+
+# solution for 93/95 co-codebase re-arch for R3 auto-sync to UMOLYA TRUNK
+ifneq ($(wildcard interface/driver/dvfs_drv),)
+ INC_DIR += interface/driver/dvfs_drv/$(MD_VER_FOLDER)
+else
+ INC_DIR += driver/sleep_drv/public/inc
+endif
+
+ifneq ($(filter __CENTRALIZED_SLEEP_MANAGER__, $(strip $(MODULE_DEFS))),)
+ INC_DIR += driver/sleep_drv/public/inc
+endif
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = APCS_INTWORK
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH += $(strip $(AUDFOLDER))
+SRC_PATH += $(strip $(AUDFOLDER))/afes
+SRC_PATH += $(strip $(AUDFOLDER))/inc
+SRC_PATH += driver/audio/src
+
+#fdr_reorg
+INC_DIR += interface/l1/cl1/common \
+ interface/protocol/nas_c2k \
+ interface/protocol/l2_c2k/1xrtt
diff --git a/mcu/make/module/driver/datapath/pciedev.mak b/mcu/make/module/driver/datapath/pciedev.mak
new file mode 100644
index 0000000..ad36484
--- /dev/null
+++ b/mcu/make/module/driver/datapath/pciedev.mak
@@ -0,0 +1,33 @@
+#ifeq ($(strip $(HIF_PCIE_SUPPORT)),TRUE)
+##############################################################################
+# pcie part #
+##############################################################################
+ifneq ($(filter __PCIE_AT__, $(COM_DEFS)),)
+INC_DIR += driver/drvtest/hif/pcie_at/inc \
+ driver/hif/inc/hif_mhccifdev/
+endif
+
+INC_DIR += driver/devdrv/common/inc \
+ driver/hif/inc/hif_pciedev/ \
+ driver/hif/inc/ \
+ interface/driver/hif/hif_pciedev \
+ interface/driver/devdrv/pcie/ \
+ driver/hif/src/hif_pciedev/ \
+ interface/driver/peripheral/ \
+ interface/driver/hif/hif_mhccifdev/ \
+ interface/driver/devdrv/us_counter/ \
+ interface/service/hif/
+
+SRC_LIST += driver/hif/src/hif_pciedev/hif_pcie.c \
+ driver/hif/src/hif_pciedev/drv_pciedev.c \
+ driver/hif/src/hif_pciedev/pcie_i2c.c
+
+COMP_DEFS +=
+
+SRC_PATH += driver/hif/src/hif_pciedev
+
+ifeq ($(strip $(HIF_PCIE_DETECT)),TRUE)
+COMP_DEFS += __HIF_PCIE_DETECT__
+endif
+
+#endif
diff --git a/mcu/make/module/driver/driver_config.mak b/mcu/make/module/driver/driver_config.mak
new file mode 100644
index 0000000..6e1c426
--- /dev/null
+++ b/mcu/make/module/driver/driver_config.mak
@@ -0,0 +1,20 @@
+ifeq ($(strip $(RTOS)),MERTOS)
+ CATEGORY_INCDIRS += ./service/mertos/include
+ CATEGORY_INCDIRS += ./service/kal/common/include
+ CATEGORY_INCDIRS += ./service/kal/os/mertos/include
+ CATEGORY_INCDIRS += ./service/kal/lib/mlib/include
+endif
+
+
+# *************************************************************************
+# From Global include path
+# *************************************************************************
+CATEGORY_INCDIRS += driver/sys_drv/init/inc
+
+CATEGORY_DEFS +=
+
+ifeq ($(strip $(LTO_BUILD)),TRUE)
+ ifeq ($(strip $(NO_LTO)),)
+ CFLAGS += -flto -fno-fat-lto-objects
+ endif
+endif
diff --git a/mcu/make/module/driver/legacy/bmt.mak b/mcu/make/module/driver/legacy/bmt.mak
new file mode 100644
index 0000000..5f9c3f9
--- /dev/null
+++ b/mcu/make/module/driver/legacy/bmt.mak
@@ -0,0 +1,19 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/peripheral/src/bmt.c \
+driver/peripheral/src/bmt_create.c \
+driver/peripheral/src/bmt_main.c \
+driver/peripheral/src/bmtutil.c \
+driver/peripheral/src/dcl_bmt.c \
+driver/peripheral/src/bmt_ext_charger.c \
+driver/peripheral/src/bmt_ext_cable_fac_if.c
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/peripheral/inc \
+ driver/drv/include \
+ driver/peripheral/inc
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = BMT_KAL_DEBUG
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/peripheral/src
diff --git a/mcu/make/module/driver/legacy/extern/mtd.mak b/mcu/make/module/driver/legacy/extern/mtd.mak
new file mode 100644
index 0000000..b04a6e2
--- /dev/null
+++ b/mcu/make/module/driver/legacy/extern/mtd.mak
@@ -0,0 +1,73 @@
+# Define source file lists to SRC_LIST
+# flash_mtd.c is necessary for L1 to call NOR_GetReturnReadyLatency
+SRC_LIST = driver/storage/flash/mtd/src/flash_mtd.c
+
+ifeq ($(strip $(SERIAL_FLASH_SUPPORT)),TRUE)
+ SRC_LIST += driver/storage/flash/mtd/src/mtd_dal_spi.c \
+ driver/storage/flash/mtd/src/drv_spi.c
+ ifeq ($(strip $(FLASH_TEST_SELECT)),NOR_FLASH)
+ SRC_LIST += driver/storage/flash/mtd/src/flash_mtd_sf_ut.c
+ endif
+endif
+
+# NOR/SF driver
+ifeq ($(filter _NAND_FLASH_BOOTING_, $(strip $(MODULE_DEFS))),)
+ifeq ($(filter __EMMC_BOOTING__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += \
+ driver/storage/flash/mtd/src/flash_mtd.ramdisk.c \
+ driver/storage/flash/mtd/src/flash_cfi.c \
+ driver/storage/flash/mtd/src/flash_disk.c \
+ driver/storage/flash/mtd/src/flash_mtd_pf_dal.c \
+ driver/storage/flash/mtd/src/flash_mtd.amd.c \
+ driver/storage/flash/mtd/src/flash_mtd.intel.c
+ ifneq ($(filter __SERIAL_FLASH_EN__, $(strip $(MODULE_DEFS))),)
+ #SRC_LIST += \
+ #driver/storage/flash/mtd/src/flash_mtd_sf_common.c \
+ #driver/storage/flash/mtd/src/flash_mtd_sf_dal.c \
+ #driver/storage/flash/mtd/src/flash_mtd_sf_ut.c
+ endif
+endif
+endif
+
+ifeq ($(strip $(NAND_SUPPORT)),TRUE)
+# NAND driver build condition
+SRC_LIST += driver/storage/flash/mtd/src/NAND_MTD.c \
+ driver/storage/flash/mtd/src/flash_user.c
+endif
+# #if ( defined(__NAND_FDM_50__) && (defined(__NFI_VERSION2__)||defined(__NFI_VERSION3_1__)) )
+ifneq ($(filter __NAND_FDM_50__, $(strip $(MODULE_DEFS))),)
+ ifneq ($(filter __NFI_VERSION2__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_DAL.c
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_MTD_FDM50.c
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_DevConfig.c
+ else
+ ifneq ($(filter __NFI_VERSION3_1__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_DAL.c
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_MTD_FDM50.c
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_DevConfig.c
+ SRC_LIST += driver/storage/flash/mtd/src/NAND_MTD_DRV.c
+ endif
+ endif
+endif
+
+# RAM Disk for smartphone modem-only projects
+ifneq ($(filter __FS_RAMDISK__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/storage/flash/mtd/src/flash_mtd.ramdisk.c
+endif
+
+# Define include path lists to INC_DIR
+INC_DIR = ./service/sss/interface/inc \
+ ./service/sst/include \
+ driver/storage/flash/fdm/inc \
+ driver/storage/flash/mtd/inc \
+ driver/peripheral/inc \
+ ./service/fs/common/include \
+ ./service/sys_svc/gfh/public \
+ driver/devdrv/common/inc
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/storage/flash/mtd/src
+
diff --git a/mcu/make/module/driver/legacy/peripheral.mak b/mcu/make/module/driver/legacy/peripheral.mak
new file mode 100644
index 0000000..c239ec7
--- /dev/null
+++ b/mcu/make/module/driver/legacy/peripheral.mak
@@ -0,0 +1,142 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/peripheral/src/dcl_rtc.c \
+ driver/peripheral/src/dcl_aux.c \
+ driver/peripheral/src/auxmain.c \
+ driver/peripheral/src/i2c.c \
+ driver/peripheral/src/rtc.c \
+ driver/peripheral/src/drv_comm.c \
+ driver/peripheral/src/drv_hisr.c \
+ driver/peripheral/src/lpwr.c \
+ driver/peripheral/src/dcl_gpio.c \
+ driver/peripheral/src/dcl_i2c.c \
+ driver/peripheral/src/dcl_wdt.c \
+ driver/peripheral/src/dcl_gpt.c \
+ driver/peripheral/src/dcl_gpt_hw.c \
+ driver/peripheral/src/dcl_pwm.c \
+ driver/peripheral/src/dcl_adc.c \
+ driver/peripheral/src/adc.c \
+ driver/peripheral/src/adcmeasure.c \
+ driver/peripheral/src/adcsche.c \
+ driver/peripheral/src/gpio.c \
+ driver/peripheral/src/wdt.c \
+ driver/peripheral/src/pwm.c \
+ driver/peripheral/src/dcl_15_segment.c \
+ driver/peripheral/src/alerter.c \
+ driver/peripheral/src/dcl_chr_det.c \
+ driver/peripheral/src/dcl_pmu.c \
+ driver/peripheral/src/dcl_pmu_common.c \
+ driver/peripheral/src/dcl_pw.c \
+ driver/peripheral/src/kbdmain.c\
+ driver/peripheral/src/DclS_kbd.c\
+ driver/peripheral/src/DclH_kbd.c\
+ driver/peripheral/src/dbgprint.c\
+ driver/peripheral/src/Dcl_SeriPortDrv.c\
+ driver/peripheral/src/uart.c\
+ driver/peripheral/src/uart_vfifo.c\
+ driver/peripheral/src/uart_handler.c\
+ driver/peripheral/src/i2c_dual.c \
+ driver/peripheral/src/spi.c \
+ driver/peripheral/src/spi_hal.c \
+ driver/peripheral/src/hif_v2.c \
+ driver/peripheral/src/dcl_hts.c \
+ driver/peripheral/src/dcl_sts.c \
+ driver/peripheral/src/f32k_clk.c \
+ driver/peripheral/src/dcl_f32k_clk.c \
+ driver/peripheral/src/nli_arb.c\
+ driver/peripheral/src/gpio_setting.c
+# accdet
+ifneq ($(filter __ACCDET_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ ifeq ($(filter __L1_STANDALONE__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/peripheral/src/accdet.c
+ endif
+endif
+ifneq ($(filter __ACCDET_HYBRID_SOLUTION_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ ifeq ($(filter __L1_STANDALONE__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/peripheral/src/accdet.c
+ endif
+endif
+
+
+# PMU
+ifeq ($(strip $(PMIC)),MT6235PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6235.c
+endif
+ifneq ($(filter MT6236PMU MT6921PMU, $(strip $(PMIC))),)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6236.c
+ SRC_LIST += driver/peripheral/src/pmic_MT6236PMU_drv.c
+endif
+ifeq ($(strip $(PMIC)),MT6253PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6253.c
+endif
+ifeq ($(strip $(PMIC)),MT6326_CCCI)
+ SRC_LIST += driver/peripheral/src/dcl_pmic6326_ccci.c
+endif
+ifeq ($(strip $(PMIC)),MT6326)
+ SRC_LIST += driver/peripheral/src/dcl_pmic6326.c
+endif
+ifeq ($(strip $(PMIC)),MT6251PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6251.c
+ SRC_LIST += driver/peripheral/src/pmic_MT6251PMU_drv.c
+endif
+ifeq ($(strip $(PMIC)),MT6252PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6252.c
+endif
+ifeq ($(strip $(PMIC)),MT6253ELPMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6252.c
+endif
+ifeq ($(strip $(PMIC)),MT6256PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6256.c \
+ driver/peripheral/src/dcl_pmu6256_init.c
+endif
+ifeq ($(strip $(PMIC)),MT6255PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6255.c \
+ driver/peripheral/src/dcl_pmu6255_init.c
+endif
+ifeq ($(strip $(PMIC)),MT6276PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6276.c
+ SRC_LIST += driver/peripheral/src/pmic_MT6276PMU_drv.c
+endif
+ifeq ($(strip $(PMIC)),MT6573PMU)
+ SRC_LIST += driver/peripheral/src/dcl_pmu6573.c
+endif
+ifeq ($(strip $(PMIC)),MT6329)
+ SRC_LIST += driver/peripheral/src/dcl_pmic6329.c \
+ driver/peripheral/src/dcl_pmic6329_init.c
+endif
+ifeq ($(strip $(PMIC)),MT6327)
+ SRC_LIST += driver/peripheral/src/dcl_pmic6327.c \
+ driver/peripheral/src/dcl_pmic6327_init.c \
+ driver/peripheral/src/i2c_pmic.c
+endif
+
+ifneq ($(filter __DMA_UART_VIRTUAL_FIFO__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/peripheral/src/uart_vfifo.c
+endif
+
+# HIF
+# for HQA HIF/NFI concurrency test
+ifneq ($(filter __NAND_FLASH_HARDWARE_TEST__, $(strip $(MODULE_DEFS))),)
+ ifneq ($(filter __MAUI_BASIC__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/peripheral/src/hif_v2_test.c
+ endif
+endif
+
+COMP_DEFS += DRV_HTS_OFF
+COMP_DEFS += DRV_STS_OFF
+
+
+# Define include path lists to INC_DIR
+INC_DIR = \
+ driver/peripheral/inc \
+ interface/driver/connectivity/usb_driver \
+ driver/connectivity/usb_driver/inc \
+ driver/drv/include \
+ ./custom/driver/drv/ast \
+ $(strip $(BUILD_CODEGENDIR)) \
+ $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/misc_drv)
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = __DRV_COMM_INIT_DEINIT__
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/peripheral/src
+
diff --git a/mcu/make/module/driver/legacy/sdio_device.mak b/mcu/make/module/driver/legacy/sdio_device.mak
new file mode 100644
index 0000000..1d8a9f7
--- /dev/null
+++ b/mcu/make/module/driver/legacy/sdio_device.mak
@@ -0,0 +1,20 @@
+SRC_LIST = driver/connectivity/sdio_device/src/sdio_custom.c \
+ driver/connectivity/sdio_device/src/sdio_hw.c \
+ driver/connectivity/sdio_device/src/sdio_queue.c \
+ driver/connectivity/sdio_device/src/sdio_fw.c \
+ driver/connectivity/sdio_device/src/sdio_interrupt.c \
+ driver/connectivity/sdio_device/src/sdio_test_util.c
+
+
+# Define include path lists to INC_DIR
+INC_DIR = interface/driver/drv_def \
+ driver/connectivity/sdio_device/inc \
+ driver/regbase/inc \
+ driver/sleep_drv
+
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/connectivity/sdio_device/src
diff --git a/mcu/make/module/driver/legacy/sim_driver.mak b/mcu/make/module/driver/legacy/sim_driver.mak
new file mode 100644
index 0000000..46a52ee
--- /dev/null
+++ b/mcu/make/module/driver/legacy/sim_driver.mak
@@ -0,0 +1,27 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/storage/sim/src/dcl_sim.c \
+ driver/storage/sim/src/icc_sim_common_mtk.c \
+ driver/storage/sim/src/icc_switchControl0.c \
+ driver/storage/sim/src/icc_switchControl1.c \
+ driver/storage/sim/src/icc_switchControl2.c \
+ driver/storage/sim/src/icc_switchControl_al.c \
+ driver/storage/sim/src/icc_switchControl_mtk_0.c \
+ driver/storage/sim/src/icc_switchControl_mtk_1.c \
+ driver/storage/sim/src/MT6302_SPI.c
+
+
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/drv/include \
+ driver/storage/sim/inc \
+ ./service/sst/include \
+ ./service/ssf/inc \
+ interface/driver/regbase
+
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/storage/sim/src
+
diff --git a/mcu/make/module/driver/legacy/usb.mak b/mcu/make/module/driver/legacy/usb.mak
new file mode 100644
index 0000000..37a1017
--- /dev/null
+++ b/mcu/make/module/driver/legacy/usb.mak
@@ -0,0 +1,94 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/connectivity/usb_class/src/usb.c \
+ driver/connectivity/usb_class/src/usb_adap.c \
+ driver/connectivity/usb_class/src/usb_resource.c \
+ driver/connectivity/usb_class/src/usb_mode.c \
+ driver/connectivity/usb_class/src/usb_task.c \
+ driver/connectivity/usb_class/src/usb_debug_tool.c
+
+
+# USB LOGGING
+ifneq ($(filter __USB_LOGGING__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbacm_logging.c
+endif
+
+
+# USB CDC ACM CLASS
+ifneq ($(filter __USB_COM_PORT_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbacm_drv.c \
+ driver/connectivity/usb_class/src/usbacm_adap.c \
+ driver/connectivity/usb_class/src/usbacm_ft.c
+endif
+
+
+# USB STRESS TEST
+ifneq ($(filter __USB_STRESS_TEST__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbacm_echo.c
+endif
+
+
+# USB MASS STORAGE CLASS
+ifneq ($(filter __USB_MASS_STORAGE_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbms_drv.c \
+ driver/connectivity/usb_class/src/usbms_adap.c \
+ driver/connectivity/usb_class/src/usbms_state.c
+endif
+
+
+
+# USB MTP CLASS
+ifneq ($(filter __USB_IMAGE_CLASS__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/ptp_state.c \
+ driver/connectivity/usb_class/src/usbimage_drv.c \
+ driver/connectivity/usb_class/src/usbimage_mtp_state.c
+endif
+
+
+
+# USB WEBCAM CLASS
+ifneq ($(filter WEBCAM_SUPPORT,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbvideo_drv.c \
+ driver/connectivity/usb_class/src/usbvideo_state.c
+endif
+
+
+
+# USB OTG
+ifneq ($(filter __OTG_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/usbd.c \
+ driver/connectivity/usb_class/src/usb_host_default_drv.c \
+ driver/connectivity/usb_class/src/usb_host_ms_drv.c \
+ driver/connectivity/usb_class/src/usb_host_ms_state.c \
+ driver/connectivity/usb_class/src/usb_host_ms_adap.c \
+ driver/connectivity/usb_class/src/usb_host_acm_drv.c \
+ driver/connectivity/usb_class/src/otg.c
+endif
+
+
+
+# ICUSB
+ifneq ($(filter __IC_USB_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_class/src/icusb_debug_tool.c \
+ driver/connectivity/usb_class/src/icusb_eem_adap.c \
+ driver/connectivity/usb_class/src/icusb_eem_drv.c \
+ driver/connectivity/usb_class/src/icusb_iccd_adap.c \
+ driver/connectivity/usb_class/src/icusb_iccd_drv.c
+endif
+
+
+
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/connectivity/usb_driver/inc \
+ driver/connectivity/usb_class/include \
+ interface/driver/connectivity/usb_driver \
+ ./service/fs/common/include \
+ protocol/layer4/l4/include \
+ interface/driver/peripheral \
+ driver/dsp_ram
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = APCS_INTWOR
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/connectivity/usb_class/src
+
diff --git a/mcu/make/module/driver/legacy/usb_driver.mak b/mcu/make/module/driver/legacy/usb_driver.mak
new file mode 100644
index 0000000..3a3a06d
--- /dev/null
+++ b/mcu/make/module/driver/legacy/usb_driver.mak
@@ -0,0 +1,57 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/connectivity/usb_driver/src/usb_phy_drv.c \
+ driver/connectivity/usb_driver/src/upll_ctrl.c \
+ driver/connectivity/usb_driver/src/dcl_usb_drv.c \
+ driver/connectivity/usb_driver/src/dcl_usb_hcd.c
+
+
+
+# USB Dummy API
+ifeq ($(filter __USB_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_driver/src/usb_dummy.c
+endif
+
+
+# USB LOGGING
+ifneq ($(filter __USB_LOGGING__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_driver/src/usblog_drv.c
+endif
+
+
+
+# USB MASS STORAGE CLASS
+ifneq ($(filter __USB_RAMDISK__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_driver/src/usbms_ram.c
+endif
+
+
+# USB CD ROM CLASS
+ifneq ($(filter __USB_MASS_STORAGE_CDROM_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_driver/src/usbms_cdrom.c
+endif
+
+
+
+# USB OTG
+ifneq ($(filter __OTG_ENABLE__,$(strip $(MODULE_DEFS))),)
+SRC_LIST +=driver/connectivity/usb_driver/src/dcl_otg_drv.c
+endif
+
+
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/drv/include \
+ driver/connectivity/usb_driver/inc \
+ driver/connectivity/usb_class/include \
+ interface/driver/drv_def \
+ interface/driver/connectivity/usb_driver \
+ interface/driver/regbase \
+ driver/peripheral/inc \
+ driver/sleep_drv/public/inc
+
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = APCS_INTWORK
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/connectivity/usb_driver/src
diff --git a/mcu/make/module/driver/media/extern/media.mak b/mcu/make/module/driver/media/extern/media.mak
new file mode 100644
index 0000000..21b5e92
--- /dev/null
+++ b/mcu/make/module/driver/media/extern/media.mak
@@ -0,0 +1,40 @@
+# Define source file lists to SRC_LIST
+
+SRC_LIST = driver/audio/med/common/src/med_main.c \
+ driver/audio/med/common/src/med_utility.c \
+ driver/audio/med/common/src/med_ext_smalloc.c
+
+ifeq ($(filter MED_NOT_PRESENT, $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/audio/med/audio/src/aud_main.c \
+ driver/audio/med/audio/src/aud_audio.c \
+ driver/audio/med/audio/src/aud_speech.c \
+ driver/audio/med/audio/src/aud_keytone.c \
+ driver/audio/med/audio/src/aud_tone.c \
+ driver/audio/med/audio/src/aud_ilm.c \
+ driver/audio/med/audio/src/aud_utility.c \
+ driver/audio/med/audio/src/aud_media.c
+
+else
+ ifneq ($(filter __VOLTE_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/audio/med/audio/src/aud_ilm.c \
+ driver/audio/med/audio/src/aud_main.c \
+ driver/audio/med/audio/src/aud_utility.c \
+ driver/audio/med/common/src/med_spc_io.c
+ endif
+endif
+
+ ifneq ($(filter __ECALL_SUPPORT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/audio/med/audio/src/aud_ecall.c
+endif
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/audio/med/common/include \
+ driver/audio/med/audio/include \
+ interface/driver/hwdrv \
+ interface/driver/drv_sw_def \
+ interface/driver/drv_def \
+ interface/driver/connectivity/usb_driver \
+ interface/driver/peripheral
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv.mak b/mcu/make/module/driver/peripheral/extern/devdrv.mak
new file mode 100644
index 0000000..6adbf15
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv.mak
@@ -0,0 +1,129 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/devdrv/common/src/devdrv_common.c \
+ driver/devdrv/asm/src/drv_asm.c
+
+ifeq ($(filter __ARM7EJ_S__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/devdrv/common/src/$(COMPILER)/mon_counter.S
+endif
+
+#SRC_LIST = driver/devdrv/common/src/drv_comm.c \
+ driver/devdrv/common/src/$(COMPILER)/mon_counter.S
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/devdrv/common/inc \
+ driver/devdrv/trace \
+ driver/sys_drv/cache/inc \
+ driver/sys_drv/cache/inc/$(MD_VER_FOLDER) \
+ driver/sys_drv/mpu/inc/$(MD_VER_FOLDER) \
+ driver/sys_drv/pmu/inc \
+ driver/sys_drv/pmu/inc/$(MD_VER_FOLDER) \
+ interface/driver/devdrv/ect \
+ interface/l1/el1/external \
+ ./service/sst/include \
+ ./service/sst/include \
+ ./service/sss/interface/inc \
+ ./service/sys_svc/gfh/public \
+ ./interface/service/sys_svc \
+ interface/driver/devdrv/busmpu \
+ $(strip $(PROJDIR))/custom/driver/drv_gen \
+ ./interface/service/sst \
+ driver/devdrv/asm/inc \
+ interface/driver/sib_drv/scc \
+ interface/driver/sleep_drv \
+ driver/sib_drv/mtad/inc \
+ ./interface/service/prbm \
+ ./interface/driver/hif/hif_pccif4dev \
+ ./interface/driver/hif/hif_pccif5dev \
+ ./interface/driver/hif/hif_mhccifdev
+
+INC_DIR += ./interface/driver/storage/sim
+INC_DIR += driver/devdrv/pcie/inc
+
+#fdr_reorg
+INC_DIR += interface/protocol/as_c2k/common \
+ interface/service/sbp \
+ custom/protocol/common/ps
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/devdrv/common/src \
+ driver/devdrv/common/src/$(COMPILER)
+
+-include make/module/driver/peripheral/extern/devdrv/gpt.mak
+-include make/module/driver/peripheral/extern/devdrv/pcmon.mak
+-include make/module/driver/peripheral/extern/devdrv/uart.mak
+-include make/module/driver/peripheral/extern/devdrv/gdma_ps.mak
+-include make/module/driver/peripheral/extern/devdrv/l1gdma.mak
+-include make/module/driver/peripheral/extern/devdrv/usim.mak
+-include make/module/driver/peripheral/extern/devdrv/coresight.mak
+-include make/module/driver/peripheral/extern/devdrv/gpio.mak
+-include make/module/driver/peripheral/extern/devdrv/eint.mak
+-include make/module/driver/peripheral/extern/devdrv/dem.mak
+#-include make/module/driver/peripheral/extern/devdrv/pfc.mak
+-include make/module/driver/peripheral/extern/devdrv/idc.mak
+-include make/module/driver/peripheral/extern/devdrv/cirq.mak
+-include make/module/driver/peripheral/extern/devdrv/us_counter.mak
+-include make/module/driver/peripheral/extern/devdrv/devdrv_fakeapi.mak
+-include make/module/driver/peripheral/extern/devdrv/auxadc.mak
+#-include make/module/driver/mc.mak
+-include make/module/driver/peripheral/extern/devdrv/rtc.mak
+#-include make/module/driver/devdrv/malmo.mak
+-include make/module/driver/peripheral/extern/devdrv/pmic.mak
+-include make/module/driver/peripheral/extern/devdrv/pmic_wrap.mak
+-include make/module/driver/peripheral/extern/devdrv/spmi.mak
+-include make/module/driver/peripheral/extern/devdrv/bsi.mak
+-include make/module/driver/peripheral/extern/devdrv/cfgctl.mak
+-include make/module/driver/peripheral/extern/devdrv/f32k_clk.mak
+-include make/module/driver/peripheral/extern/devdrv/dcm.mak
+-include make/module/driver/peripheral/extern/devdrv/emi.mak
+-include make/module/driver/peripheral/extern/devdrv/pll.mak
+-include make/module/driver/peripheral/extern/devdrv/iomux.mak
+-include make/module/driver/peripheral/extern/devdrv/busmon.mak
+-include make/module/driver/peripheral/extern/devdrv/pdn.mak
+-include make/module/driver/peripheral/extern/devdrv/arm7wdt.mak
+-include make/module/driver/peripheral/extern/devdrv/boot_init.mak
+-include make/module/driver/peripheral/extern/devdrv/pw.mak
+-include make/module/driver/peripheral/extern/devdrv/chr_det.mak
+-include make/module/driver/peripheral/extern/devdrv/bus.mak
+-include make/module/driver/peripheral/extern/devdrv/busmpu.mak
+-include make/module/driver/peripheral/extern/devdrv/i2c.mak
+-include make/module/driver/peripheral/extern/devdrv/rstctl.mak
+-include make/module/driver/peripheral/extern/devdrv/mdl_ebc.mak
+-include make/module/driver/peripheral/extern/devdrv/log_seq.mak
+-include make/module/driver/peripheral/extern/devdrv/ect.mak
+-include make/module/driver/peripheral/extern/devdrv/elm.mak
+-include make/module/driver/peripheral/extern/devdrv/mdap_interface.mak
+-include make/module/driver/peripheral/extern/devdrv/cmif.mak
+-include make/module/driver/peripheral/extern/devdrv/cuif.mak
+-include make/module/driver/peripheral/extern/devdrv/csif.mak
+-include make/module/driver/peripheral/extern/devdrv/cs_pmu.mak
+-include make/module/driver/peripheral/extern/devdrv/d2d.mak
+-include make/module/driver/peripheral/extern/devdrv/dsp_bus.mak
+-include make/module/driver/peripheral/extern/devdrv/cs_sram_ctrl.mak
+-include make/module/driver/peripheral/extern/devdrv/soe.mak
+-include make/module/driver/peripheral/extern/devdrv/pms.mak
+-include make/module/driver/peripheral/extern/devdrv/digrf_platform.mak
+-include make/module/driver/peripheral/extern/devdrv/btdma.mak
+-include make/module/driver/peripheral/extern/devdrv/l3cache.mak
+-include make/module/driver/peripheral/extern/devdrv/pcie.mak
+-include make/module/driver/peripheral/extern/devdrv/tia.mak
+
+# 2016/05/31, temp comment this option due to Yuri Huang's request
+#ifeq ($(strip $(COMPILER)),GCC)
+# CFLAGS += -Werror
+#endif
+
+ifneq ($(filter TRUE,$(SIM_SWTICH_CONTROLLER_MT6306)),)
+ -include make/module/driver/peripheral/extern/devdrv/mt6306.mak
+endif
+
+# These modules have no HW & Drv now, only fake api for compile
+#-include make\bsp\devdrv\lcd.mak
+
+ifeq ($(strip $(TEST_LOAD_TYPE)),BASIC)
+ INC_DIR += ./interface/service/hif \
+ ./interface/service/hif
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/arm7wdt.mak b/mcu/make/module/driver/peripheral/extern/devdrv/arm7wdt.mak
new file mode 100644
index 0000000..0c8315f
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/arm7wdt.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/arm7wdt #
+##############################################################################
+SRC_LIST += driver/devdrv/arm7wdt/src/drv_arm7wdt.c \
+ driver/devdrv/arm7wdt/src/dcl_arm7wdt.c
+
+SRC_PATH += driver/devdrv/arm7wdt/src
+
+INC_DIR += driver/devdrv/arm7wdt/inc
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/auxadc.mak b/mcu/make/module/driver/peripheral/extern/devdrv/auxadc.mak
new file mode 100644
index 0000000..489a274
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/auxadc.mak
@@ -0,0 +1,13 @@
+##############################################################################
+# devdrv/eint #
+##############################################################################
+SRC_LIST += driver/devdrv/auxadc/src/dcl_adc.c \
+ driver/devdrv/auxadc/src/adc.c \
+ driver/devdrv/auxadc/src/drv_thermal_protect.c \
+
+SRC_PATH += driver/devdrv/auxadc/src
+
+INC_DIR += driver/devdrv/auxadc/inc \
+ interface/driver/devdrv/emi \
+ interface/driver/devdrv/thermal \
+ $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/misc_drv)
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/boot_init.mak b/mcu/make/module/driver/peripheral/extern/devdrv/boot_init.mak
new file mode 100644
index 0000000..c0a243d
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/boot_init.mak
@@ -0,0 +1,20 @@
+##############################################################################
+# devdrv/boot_init #
+##############################################################################
+SRC_LIST += driver/devdrv/boot_init/src/drv_boot_init.c \
+ driver/devdrv/boot_init/src/abm_init.c \
+ driver/devdrv/boot_init/src/arm7_init.c \
+ driver/devdrv/boot_init/src/bootrom_init.c \
+ driver/devdrv/boot_init/src/busmon_init.c \
+ driver/devdrv/boot_init/src/ca7_init.c \
+ driver/devdrv/boot_init/src/ccif_init.c \
+ driver/devdrv/boot_init/src/cldma_init.c \
+ driver/devdrv/boot_init/src/cr4pcmon_init.c \
+ driver/devdrv/boot_init/src/dbgsys_init.c \
+ driver/devdrv/boot_init/src/ehpi_master_init.c \
+ driver/devdrv/boot_init/src/ehpi_slave_init.c \
+ #driver/devdrv/boot_init/src/gdma_init.c
+
+SRC_PATH += driver/devdrv/boot_init/src
+
+INC_DIR += driver/devdrv/boot_init/inc
\ No newline at end of file
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/bsi.mak b/mcu/make/module/driver/peripheral/extern/devdrv/bsi.mak
new file mode 100644
index 0000000..332a10b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/bsi.mak
@@ -0,0 +1,10 @@
+##############################################################################
+# devdrv/bsi #
+##############################################################################
+ifneq ($(filter MT6290, $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/bsi/src/drv_bsi.c
+
+SRC_PATH += driver/devdrv/bsi/src
+
+INC_DIR += driver/devdrv/bsi/inc
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/btdma.mak b/mcu/make/module/driver/peripheral/extern/devdrv/btdma.mak
new file mode 100644
index 0000000..c07b8ac
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/btdma.mak
@@ -0,0 +1,10 @@
+##############################################################################
+# devdrv/btdma #
+##############################################################################
+ifneq ($(filter __MD97__ __MD97P__, $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/btdma/src/btdma.c
+SRC_PATH += driver/devdrv/btdma/src
+
+INC_DIR += driver/devdrv/btdma/inc
+INC_DIR += interface/driver/devdrv/btdma
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/bus.mak b/mcu/make/module/driver/peripheral/extern/devdrv/bus.mak
new file mode 100644
index 0000000..15d4913
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/bus.mak
@@ -0,0 +1,8 @@
+##############################################################################
+# devdrv/bus #
+##############################################################################
+SRC_LIST += driver/devdrv/bus/$(MD_VER_FOLDER)/src/bus_drv.c
+
+SRC_PATH += driver/devdrv/bus/$(MD_VER_FOLDER)/src
+
+INC_DIR += driver/devdrv/bus/$(MD_VER_FOLDER)/inc
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/busmon.mak b/mcu/make/module/driver/peripheral/extern/devdrv/busmon.mak
new file mode 100644
index 0000000..3e74680
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/busmon.mak
@@ -0,0 +1,12 @@
+##############################################################################
+# devdrv/busmon #
+##############################################################################
+
+SRC_LIST += driver/devdrv/busmon/src/$(MD_VER_FOLDER)/drv_busmon.c
+
+SRC_PATH += driver/devdrv/busmon/src/$(MD_VER_FOLDER)
+
+INC_DIR += interface/driver/devdrv/busmon/$(MD_VER_FOLDER)
+
+
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/busmpu.mak b/mcu/make/module/driver/peripheral/extern/devdrv/busmpu.mak
new file mode 100644
index 0000000..1583397
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/busmpu.mak
@@ -0,0 +1,8 @@
+##############################################################################
+# devdrv/bus #
+##############################################################################
+SRC_LIST += driver/devdrv/busmpu/src/$(MD_VER_FOLDER)/drv_busmpu.c
+
+SRC_PATH += driver/devdrv/busmpu/src/$(MD_VER_FOLDER)
+
+INC_DIR += driver/devdrv/busmpu/inc/$(MD_VER_FOLDER)
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cfgctl.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cfgctl.mak
new file mode 100755
index 0000000..6472cac
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cfgctl.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/cfgctl #
+##############################################################################
+SRC_LIST += driver/devdrv/cfgctl/src/drv_cfgctl.c
+
+SRC_PATH += driver/devdrv/cfgctl/src
+
+INC_DIR += driver/devdrv/cfgctl/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/chr_det.mak b/mcu/make/module/driver/peripheral/extern/devdrv/chr_det.mak
new file mode 100644
index 0000000..9649180
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/chr_det.mak
@@ -0,0 +1,14 @@
+##############################################################################
+# NOTICE : We have no HW for this IP (rtc) now. #
+# But for SW complie request, #
+# temporarily add the 'fake api' to make compile success. #
+##############################################################################
+
+SRC_LIST += driver/devdrv/chr_det/src/dcl_chr_det.c
+
+
+SRC_PATH += driver/devdrv/chr_det/src
+
+INC_DIR += driver/devdrv/chr_det/inc
+
+COMP_DEFS +=
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cirq.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cirq.mak
new file mode 100644
index 0000000..a95d08c
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cirq.mak
@@ -0,0 +1,15 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+ifeq ($(filter __ARM7EJ_S__, $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cirq/$(MD_VER_FOLDER)/src/drv_mdcirq.c
+else
+SRC_LIST += driver/devdrv/cirq/src/drv_arm7cirq.c
+endif
+SRC_LIST += driver/devdrv/cirq/$(MD_VER_FOLDER)/src/drv_vpe_irq.c
+SRC_LIST += driver/devdrv/cirq/$(MD_VER_FOLDER)/src/isrentry.c \
+ driver/devdrv/cirq/$(MD_VER_FOLDER)/src/$(COMPILER)/mips_vic_entry.S
+SRC_PATH += driver/devdrv/cirq/$(MD_VER_FOLDER)/src
+INC_DIR += driver/devdrv/cirq/$(MD_VER_FOLDER)/inc \
+ driver/sys_drv/init/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cmif.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cmif.mak
new file mode 100644
index 0000000..86f416f
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cmif.mak
@@ -0,0 +1,32 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+
+
+SRC_LIST += driver/devdrv/cmif/src/drv_cmif.c
+SRC_LIST += driver/devdrv/cmif/src/drv_cmif_l1core.c
+SRC_PATH += driver/devdrv/cmif/src
+
+INC_DIR += interface/driver/devdrv/cmif/inc
+INC_DIR += driver/devdrv/cmif/inc
+INC_DIR += $(UNIVERSAL_COMMON)/interface/driver/sys_drv/config
+
+ifneq ($(filter __SSDVT_CMIF_TEST__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/cmif_test.c
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/cmif_test_l1core.c
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/memory_test.c
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cmif/cmif_test/src
+INC_DIR += driver/devdrv/cmif/cmif_test/inc
+INC_DIR += $(UNIVERSAL_COMMON)/interface/modem
+endif
+
+ifneq ($(filter __MEM_ACCESS_PATH_DVT__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cmif/mem_access_path_test/src/mem_access_path_test.c
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/memory_test.c
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cmif/cmif_test/src
+SRC_PATH += driver/devdrv/cmif/mem_access_path_test/src
+INC_DIR += driver/devdrv/cmif/cmif_test/inc
+INC_DIR += driver/devdrv/cmif/mem_access_path_test/inc
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cs_pmu.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cs_pmu.mak
new file mode 100755
index 0000000..20b9b0d
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cs_pmu.mak
@@ -0,0 +1,16 @@
+##############################################################################
+# devdrv/cs_pmu #
+##############################################################################
+ifneq ($(filter __MD97__ __MD97P__, $(strip $(MODULE_DEFS))),)
+# SRC_LIST += driver/devdrv/cs_pmu/src/
+# SRC_LIST += driver/devdrv/cs_pmu/src/
+# SRC_PATH += driver/devdrv/cs_pmu/src
+
+INC_DIR += driver/devdrv/cs_pmu/inc
+# INC_DIR += interface/driver/devdrv/csif
+# INC_DIR += $(UNIVERSAL_COMMON)/interface/driver/sys_drv/csif
+
+ifneq ($(filter __CS_PMU_HW_DVT__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cs_pmu/src/cs_pmu_dvt_main.c
+endif
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cs_sram_ctrl.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cs_sram_ctrl.mak
new file mode 100755
index 0000000..795cbd9
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cs_sram_ctrl.mak
@@ -0,0 +1,10 @@
+##############################################################################
+# devdrv/cs_sram_ctrl #
+##############################################################################
+SRC_LIST += driver/devdrv/cs_sram_ctrl/src/cs_sram_ctrl.c
+
+SRC_PATH += driver/devdrv/cs_sram_ctrl/src
+
+INC_DIR += driver/devdrv/cs_sram_ctrl/inc \
+ interface/driver/devdrv/cs_sram_ctrl
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/csif.mak b/mcu/make/module/driver/peripheral/extern/devdrv/csif.mak
new file mode 100644
index 0000000..44bfa9b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/csif.mak
@@ -0,0 +1,33 @@
+##############################################################################
+# devdrv/csif #
+##############################################################################
+ifneq ($(filter __MD97__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/csif/mt6297/src/drv_csif_init.c
+SRC_LIST += driver/devdrv/csif/mt6297/src/drv_csif_main.c
+SRC_PATH += driver/devdrv/csif/mt6297/src
+
+INC_DIR += driver/devdrv/csif/mt6297/inc
+INC_DIR += interface/driver/devdrv/csif
+INC_DIR += interface/driver/devdrv/csif/mt6297
+INC_DIR += $(UNIVERSAL_COMMON)/interface/driver/sys_drv/csif
+
+ifneq ($(filter __SSDVT_CSIF_TEST__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/csif/mt6297/src/csif_dvt_main.c
+endif
+ifneq ($(filter __CSIF_PROFILING__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/csif/mt6297/src/csif_profiling_main.c
+endif
+endif
+
+ifneq ($(filter __MD97P__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/csif/mt6297p/src/drv_csif_init.c
+SRC_LIST += driver/devdrv/csif/mt6297p/src/drv_csif_main.c
+SRC_PATH += driver/devdrv/csif/mt6297p/src
+
+INC_DIR += driver/devdrv/csif/mt6297p/inc
+INC_DIR += interface/driver/devdrv/csif
+INC_DIR += interface/driver/devdrv/csif/mt6297p
+INC_DIR += $(UNIVERSAL_COMMON)/interface/driver/sys_drv/csif
+endif
+
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/cuif.mak b/mcu/make/module/driver/peripheral/extern/devdrv/cuif.mak
new file mode 100644
index 0000000..e570b29
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/cuif.mak
@@ -0,0 +1,52 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+
+
+SRC_LIST += driver/devdrv/cuif/src/drv_cuif.c
+SRC_LIST += driver/devdrv/cuif/src/drv_cuif_l1core.c
+SRC_PATH += driver/devdrv/cuif/src
+
+INC_DIR += driver/devdrv/cuif/inc
+INC_DIR += interface/driver/devdrv/cuif/inc
+
+ifneq ($(filter __CUIF_DRV_TEST__ , $(strip $(MODULE_DEFS))),)
+INC_DIR += $(UNIVERSAL_COMMON)/interface/modem/
+endif
+
+ifneq ($(filter __SSDVT_CUIF_TEST__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cuif/cuif_test/src/cuif_test.c
+SRC_LIST += driver/devdrv/cuif/cuif_test/src/cuif_test_l1core.c
+SRC_LIST += driver/devdrv/cuif/cuif_test/src/memory_test.c
+SRC_LIST += driver/devdrv/cuif/cuif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cuif/cuif_test/src
+INC_DIR += driver/devdrv/cuif/cuif_test/inc
+INC_DIR += $(UNIVERSAL_COMMON)/interface/modem/
+endif
+
+ifneq ($(filter __USIP_POWER_ON_OFF_DVT__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cuif/usip_power_test/src/usip_power_test.c
+SRC_PATH += driver/devdrv/cuif/usip_power_test/src
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cmif/cmif_test/src
+INC_DIR += driver/devdrv/cuif/usip_power_test/inc/
+INC_DIR += driver/devdrv/cmif/cmif_test/inc
+endif
+
+ifneq ($(filter __DSP_SRAM_CTRL_DVT__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cuif/dsp_sram_ctrl_dvt/src/dsp_sram_ctrl_dvt.c
+SRC_PATH += driver/devdrv/cuif/dsp_sram_ctrl_dvt/src
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cmif/cmif_test/src
+INC_DIR += driver/devdrv/cmif/cmif_test/inc
+INC_DIR += driver/devdrv/cmif/mem_access_path_test/inc
+endif
+
+ifneq ($(filter __USIP_PMUCC_ON_OFF_DVT__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/cuif/pmu_cc_test/src/pmu_cc_test.c
+SRC_PATH += driver/devdrv/cuif/pmu_cc_test/src
+SRC_LIST += driver/devdrv/cmif/cmif_test/src/ssdvt_util.c
+SRC_PATH += driver/devdrv/cmif/cmif_test/src
+INC_DIR += driver/devdrv/cuif/pmu_cc_test/inc/
+INC_DIR += driver/devdrv/cmif/cmif_test/inc
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/d2d.mak b/mcu/make/module/driver/peripheral/extern/devdrv/d2d.mak
new file mode 100644
index 0000000..969cad3
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/d2d.mak
@@ -0,0 +1,16 @@
+##############################################################################
+# devdrv/d2d #
+##############################################################################
+ifneq ($(filter MT6297 MT6297P, $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/d2d/src/drv_d2d_init.c
+SRC_LIST += driver/devdrv/d2d/src/drv_d2d_main.c
+SRC_PATH += driver/devdrv/d2d/src
+
+INC_DIR += driver/devdrv/d2d/inc
+INC_DIR += interface/driver/devdrv/d2d/inc
+
+ifneq ($(filter __SSDVT_D2D_TEST__ , $(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/d2d/src/d2d_dvt_main.c
+endif
+
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/dcm.mak b/mcu/make/module/driver/peripheral/extern/devdrv/dcm.mak
new file mode 100644
index 0000000..d859e14
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/dcm.mak
@@ -0,0 +1,20 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+SRC_LIST += driver/devdrv/dcm/$(MD_VER_FOLDER)/src/drv_dcm.c \
+ driver/devdrv/dcm/$(MD_VER_FOLDER)/src/drv_lpm.c
+
+ifeq ($(strip $(MD_VER_FOLDER)),md93)
+ SRC_LIST += driver/devdrv/dcm/$(MD_VER_FOLDER)/src/dcm_service.c
+else
+ ifeq ($(strip $(MD_VER_FOLDER)),md95)
+ SRC_LIST += driver/devdrv/dcm/$(MD_VER_FOLDER)/src/dcm_service.c
+ else
+ #No dcm_service.c
+ endif
+endif
+
+SRC_PATH += driver/devdrv/dcm/$(MD_VER_FOLDER)/src
+
+INC_DIR += driver/devdrv/dcm/$(MD_VER_FOLDER)/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/dem.mak b/mcu/make/module/driver/peripheral/extern/devdrv/dem.mak
new file mode 100644
index 0000000..6bb536b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/dem.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/dem #
+##############################################################################
+SRC_LIST += driver/devdrv/dem/src/drv_dem.c
+
+SRC_PATH += driver/devdrv/dem/src
+
+INC_DIR += driver/devdrv/dem/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/devdrv_fakeapi.mak b/mcu/make/module/driver/peripheral/extern/devdrv/devdrv_fakeapi.mak
new file mode 100644
index 0000000..52299f0
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/devdrv_fakeapi.mak
@@ -0,0 +1,10 @@
+##############################################################################
+# devdrv/tty #
+##############################################################################
+SRC_LIST += driver/devdrv/devdrv_fakeapi/src/devdrv_fakeapi.c
+
+
+SRC_PATH += driver/devdrv/devdrv_fakeapi/src
+
+INC_DIR += driver/devdrv/devdrv_fakeapi/src
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/digrf_platform.mak b/mcu/make/module/driver/peripheral/extern/devdrv/digrf_platform.mak
new file mode 100644
index 0000000..908b50a
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/digrf_platform.mak
@@ -0,0 +1,36 @@
+##############################################################################
+# devdrv/digrf_platform #
+##############################################################################
+ifneq ($(filter __MD97__ __MD97P__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_bus_ao.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_bus_off.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_dsb.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_global_con.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_mipi.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_off_clk.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_on_clk.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_on_irq.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_platform_init.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_cos_prep.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_iomux.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_busmon.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_exception.c
+SRC_LIST += driver/devdrv/digrf_platform/src/digrf_por.c
+
+ifneq ($(filter __DIGRF_PLATFORM_TEST__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/digrf_platform/src/ssdvt/digrf_dvt_test.c
+SRC_LIST += driver/devdrv/digrf_platform/src/ssdvt/digrf_busmon_dvt.c
+SRC_LIST += driver/devdrv/digrf_platform/src/ssdvt/digrf_mipi_dvt.c
+SRC_LIST += driver/devdrv/digrf_platform/src/ssdvt/digrf_dsb_dvt.c
+SRC_LIST += driver/devdrv/digrf_platform/src/ssdvt/digrf_on_irq_dvt.c
+endif
+
+
+SRC_PATH += driver/devdrv/cuif/src
+
+INC_DIR += driver/devdrv/digrf_platform/inc
+INC_DIR += interface/driver/devdrv/digrf_platform
+INC_DIR += interface/driver/dvfs_drv/md97
+INC_DIR += driver/devdrv/pmic_wrap/inc
+INC_DIR += interface/driver/sleep_drv
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/dsp_bus.mak b/mcu/make/module/driver/peripheral/extern/devdrv/dsp_bus.mak
new file mode 100644
index 0000000..ea2513b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/dsp_bus.mak
@@ -0,0 +1,12 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+
+
+SRC_LIST += driver/devdrv/dsp_bus/src/dsp_bus_config.c
+SRC_LIST += driver/devdrv/dsp_bus/src/dsp_bus_dump.c
+SRC_PATH += driver/devdrv/dsp_bus/src
+
+INC_DIR += driver/devdrv/dsp_bus/inc
+
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/ect.mak b/mcu/make/module/driver/peripheral/extern/devdrv/ect.mak
new file mode 100755
index 0000000..87e6b26
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/ect.mak
@@ -0,0 +1,6 @@
+##############################################################################
+# devdrv/ect #
+##############################################################################
+
+SRC_LIST += driver/devdrv/ect/src/ect.c
+SRC_LIST += driver/devdrv/ect/src/ect_dsp_cti_status.c
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/eint.mak b/mcu/make/module/driver/peripheral/extern/devdrv/eint.mak
new file mode 100644
index 0000000..c5350f2
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/eint.mak
@@ -0,0 +1,13 @@
+##############################################################################
+# devdrv/eint #
+##############################################################################
+SRC_LIST += driver/devdrv/eint/src/dcl_eint.c \
+ driver/devdrv/eint/src/drv_eint.c \
+ driver/devdrv/eint/src/eint_setting_init.c
+
+SRC_PATH += driver/devdrv/eint/src
+
+INC_DIR += driver/devdrv/eint/inc \
+ $(strip $(PROJDIR))/custom/driver/drv_gen \
+ $(call CUSTOM_FLD_MAPPING,./custom/driver/drv/misc_drv)
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/elm.mak b/mcu/make/module/driver/peripheral/extern/devdrv/elm.mak
new file mode 100644
index 0000000..762d9d8
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/elm.mak
@@ -0,0 +1,22 @@
+##############################################################################
+# devdrv/elm #
+##############################################################################
+SRC_LIST += driver/devdrv/elm/src/$(MD_VER_FOLDER)/elm.c
+
+#SRC_LIST += $(strip $(CGEN_L1_OUTDIR))/elm_trace_utmd.c
+ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ ifeq ($(filter BASIC,$(TEST_LOAD_TYPE)),)
+ ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
+ ifeq ($(strip $(DHL_SUPPORT)),TRUE)
+ SRC_LIST += $(strip $(CUS_MTK_REL))/dhl/l1trace/elm_trace_utmd.c
+ else
+ SRC_LIST += $(strip $(CUS_MTK_REL))/tst/l1trace/elm_trace_utmd.c
+ endif
+ else
+ SRC_LIST += $(strip $(CGEN_L1_OUTDIR))/elm_trace_utmd.c
+ endif
+ endif
+endif
+
+SRC_PATH += driver/devdrv/elm/src/$(MD_VER_FOLDER)
+INC_DIR += driver/devdrv/elm/inc
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/emi.mak b/mcu/make/module/driver/peripheral/extern/devdrv/emi.mak
new file mode 100644
index 0000000..e011740
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/emi.mak
@@ -0,0 +1,11 @@
+#############################################
+# EMI Driver #
+#############################################
+# Define source file lists to SRC_LIST
+SRC_LIST += driver/devdrv/emi/src/emimpu.c
+
+# Define include path lists to INC_DIR
+INC_DIR += driver/devdrv/emi/inc/
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH += driver/devdrv/emi/src
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/f32k_clk.mak b/mcu/make/module/driver/peripheral/extern/devdrv/f32k_clk.mak
new file mode 100644
index 0000000..8a9f6c3
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/f32k_clk.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+SRC_LIST += driver/devdrv/f32k/src/dcl_f32k_clk.c \
+
+SRC_PATH += driver/devdrv/f32k/src
+
+INC_DIR += driver/devdrv/f32k/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/gdma_l1.mak b/mcu/make/module/driver/peripheral/extern/devdrv/gdma_l1.mak
new file mode 100755
index 0000000..59e1e7b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/gdma_l1.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/gdma #
+##############################################################################
+SRC_LIST += driver/devdrv/gdma_l1/src/drv_gdma.c \
+
+SRC_PATH += driver/devdrv/gdma_l1/src
+
+INC_DIR += driver/devdrv/gdma_l1/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/gdma_ps.mak b/mcu/make/module/driver/peripheral/extern/devdrv/gdma_ps.mak
new file mode 100755
index 0000000..bbdf661
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/gdma_ps.mak
@@ -0,0 +1,40 @@
+##############################################################################
+# devdrv/gdma #
+##############################################################################
+
+####################################################
+# For Gen93 GDMA
+####################################################
+ifeq ($(strip $(MTK_MODEM_ARCH)), MT6293)
+ SRC_LIST += driver/devdrv/gdma_ps/src/md93/drv_gdma.c
+ SRC_PATH += driver/devdrv/gdma_ps/src/md93
+ INC_DIR += driver/devdrv/gdma_ps/inc/md93
+endif
+
+####################################################
+# For Gen95 GDMA
+####################################################
+ifeq ($(strip $(MTK_MODEM_ARCH)), MT6295)
+ SRC_LIST += driver/devdrv/gdma_ps/src/md95/drv_gdma.c
+ SRC_PATH += driver/devdrv/gdma_ps/src/md95
+ INC_DIR += driver/devdrv/gdma_ps/inc/md95
+ COMP_DEFS += GDMA_PRIO_DISABLE #GDMA_PRIO_DISABLE is used to disable PRIORITY COMMON QUEUE;
+endif
+
+####################################################
+# For Gen97 GDMA
+####################################################
+ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297)
+ SRC_LIST += driver/devdrv/gdma_ps/src/md97/drv_gdma.c
+ SRC_PATH += driver/devdrv/gdma_ps/src/md97
+ INC_DIR += driver/devdrv/gdma_ps/inc/md97
+endif
+
+####################################################
+# For Gen97P GDMA
+####################################################
+ifeq ($(strip $(MTK_MODEM_ARCH)), MT6297P)
+ SRC_LIST += driver/devdrv/gdma_ps/src/md97/drv_gdma.c
+ SRC_PATH += driver/devdrv/gdma_ps/src/md97
+ INC_DIR += driver/devdrv/gdma_ps/inc/md97
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/gpio.mak b/mcu/make/module/driver/peripheral/extern/devdrv/gpio.mak
new file mode 100644
index 0000000..cd5f36d
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/gpio.mak
@@ -0,0 +1,12 @@
+##############################################################################
+# devdrv/gpio #
+##############################################################################
+SRC_LIST += driver/devdrv/gpio/src/dcl_gpio.c \
+ driver/devdrv/gpio/src/drv_gpio.c \
+ driver/devdrv/gpio/src/gpio_setting.c \
+
+SRC_PATH += driver/devdrv/gpio/src
+
+INC_DIR += driver/devdrv/gpio/inc \
+ $(strip $(PROJDIR))/custom/driver/drv_gen
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/gpt.mak b/mcu/make/module/driver/peripheral/extern/devdrv/gpt.mak
new file mode 100644
index 0000000..5550736
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/gpt.mak
@@ -0,0 +1,11 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+SRC_LIST += driver/devdrv/gpt/src/dcl_gpt.c \
+ driver/devdrv/gpt/src/drv_gpt.c \
+ driver/devdrv/gpt/src/drv_litegpt.c
+
+SRC_PATH += driver/devdrv/gpt/src
+
+INC_DIR += driver/devdrv/gpt/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/i2c.mak b/mcu/make/module/driver/peripheral/extern/devdrv/i2c.mak
new file mode 100644
index 0000000..a9e4ec3
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/i2c.mak
@@ -0,0 +1,11 @@
+
+##############################################################################
+# devdrv/i2c #
+##############################################################################
+SRC_LIST += driver/devdrv/i2c/src/dcl_i2c.c \
+ driver/devdrv/i2c/src/drv_i2c.c \
+
+
+SRC_PATH += driver/devdrv/i2c/src
+
+INC_DIR += driver/devdrv/i2c/inc
\ No newline at end of file
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/idc.mak b/mcu/make/module/driver/peripheral/extern/devdrv/idc.mak
new file mode 100644
index 0000000..7f21c87
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/idc.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/idc #
+##############################################################################
+SRC_LIST += driver/devdrv/idc/src/dcl_idc.c \
+ driver/devdrv/idc/src/drv_idc.c \
+
+SRC_PATH += driver/devdrv/idc/src
+
+INC_DIR += driver/devdrv/idc/inc
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/iomux.mak b/mcu/make/module/driver/peripheral/extern/devdrv/iomux.mak
new file mode 100644
index 0000000..d51720c
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/iomux.mak
@@ -0,0 +1,11 @@
+##############################################################################
+# devdrv/iomux #
+##############################################################################
+ifeq ($(strip $(PLATFORM)), TK6291)
+SRC_LIST += driver/devdrv/iomux/src/drv_iomux.c
+
+SRC_PATH += driver/devdrv/iomux/src
+
+INC_DIR += driver/devdrv/iomux/inc
+endif
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/l3cache.mak b/mcu/make/module/driver/peripheral/extern/devdrv/l3cache.mak
new file mode 100644
index 0000000..1c52722
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/l3cache.mak
@@ -0,0 +1,7 @@
+
+ifneq ($(filter __MD97__ __MD97P__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/l3cache/src/$(MD_VER_FOLDER)/drv_l3cache_hw.c
+SRC_PATH += driver/devdrv/l3cache/src/$(MD_VER_FOLDER)
+
+INC_DIR += driver/devdrv/l3cache/inc/$(MD_VER_FOLDER)
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/lcd.mak b/mcu/make/module/driver/peripheral/extern/devdrv/lcd.mak
new file mode 100644
index 0000000..bc68746
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/lcd.mak
@@ -0,0 +1,14 @@
+##############################################################################
+# NOTICE : We have no HW for this IP (lcd) now. #
+# But for SW complie request, #
+# temporarily add the 'fake api' to make compile success. #
+##############################################################################
+
+SRC_LIST += driver/devdrv/lcd/src/wfd_lcd_adapter.c
+
+SRC_PATH += driver/devdrv/lcd/src
+
+INC_DIR += driver/devdrv/lcd/inc \
+ interface/driver/display/ddv1/ \
+
+COMP_DEFS +=
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/log_seq.mak b/mcu/make/module/driver/peripheral/extern/devdrv/log_seq.mak
new file mode 100755
index 0000000..143ebb6
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/log_seq.mak
@@ -0,0 +1,29 @@
+##############################################################################
+# log_seq #
+##############################################################################
+ifeq ($(strip $(MTK_MODEM_ARCH)),MT6295)
+COMP_DEFS += __MD95__
+SRC_LIST += driver/devdrv/log_seq/src/${MD_VER_FOLDER}/logseq_drv_gen95.c
+else ifeq ($(strip $(MTK_MODEM_ARCH)),MT6293)
+COMP_DEFS += __MD93__
+SRC_LIST += driver/devdrv/log_seq/src/${MD_VER_FOLDER}/logseq_drv_gen93.c
+else ifeq ($(strip $(MTK_MODEM_ARCH)),MT6297)
+COM_DEFS += __MD97__
+SRC_LIST += driver/devdrv/log_seq/src/${MD_VER_FOLDER}/logseq_drv_gen97.c
+else ifeq ($(strip $(MTK_MODEM_ARCH)),MT6297P)
+COM_DEFS += __MD97P__
+SRC_LIST += driver/devdrv/log_seq/src/md97/logseq_drv_gen97.c
+else
+endif
+#SRC_LIST += driver/devdrv/log_seq/src/logseq_drv.c
+
+SRC_PATH += driver/devdrv/log_seq/src/${MD_VER_FOLDER}/
+
+INC_DIR += driver/devdrv/common/inc \
+ driver/devdrv/log_seq/inc \
+ interface/driver/devdrv/log_seq
+
+#ifeq ($(strip $(COMPILER)),GCC)
+# CFLAGS += -Werror
+#endif
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/malmo.mak b/mcu/make/module/driver/peripheral/extern/devdrv/malmo.mak
new file mode 100644
index 0000000..0b30f1d
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/malmo.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/dnt #
+##############################################################################
+SRC_LIST += driver/devdrv/malmo/src/MalmoDriver.c
+
+SRC_PATH += driver/devdrv/malmo/src
+
+#INC_DIR += driver/devdrv/malmo/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/mdap_interface.mak b/mcu/make/module/driver/peripheral/extern/devdrv/mdap_interface.mak
new file mode 100755
index 0000000..4af80f9
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/mdap_interface.mak
@@ -0,0 +1,27 @@
+##############################################################################
+# devdrv/bus #
+##############################################################################
+SRC_LIST += driver/devdrv/mdap_interface/src/drv_mdap_interface.c
+SRC_LIST += driver/devdrv/mdap_interface/src/$(MD_VER_FOLDER)/drv_mdap_interface_hw.c
+
+ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ifeq ($(filter BASIC,$(TEST_LOAD_TYPE)),)
+ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
+ ifeq ($(strip $(DHL_SUPPORT)),TRUE)
+ SRC_LIST += $(strip $(CUS_MTK_REL))/dhl/l1trace/amif_trace_utmd.c
+ else
+ SRC_LIST += $(strip $(CUS_MTK_REL))/tst/l1trace/amif_trace_utmd.c
+ endif
+else
+ SRC_LIST += $(strip $(CGEN_L1_OUTDIR))/amif_trace_utmd.c
+endif
+endif
+endif
+
+SRC_PATH += driver/devdrv/mdap_interface/src
+SRC_PATH += driver/devdrv/mdap_interface/src/$(MD_VER_FOLDER)
+
+INC_DIR += interface/driver/devdrv/mdap_interface
+INC_DIR += driver/devdrv/mdap_interface/inc
+INC_DIR += driver/devdrv/mdap_interface/inc/$(MD_VER_FOLDER)
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/mdl_ebc.mak b/mcu/make/module/driver/peripheral/extern/devdrv/mdl_ebc.mak
new file mode 100755
index 0000000..3b1792e
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/mdl_ebc.mak
@@ -0,0 +1,15 @@
+##############################################################################
+# mdl_ebc #
+##############################################################################
+#SRC_LIST += driver/devdrv/mdl_ebc/src/ebc_drv.c
+
+#SRC_PATH += driver/devdrv/mdl_ebc/src
+
+#INC_DIR += driver/devdrv/common/inc \
+# interface/driver/devdrv/mdl_ebc \
+# driver/devdrv/mdl_ebc/inc
+
+#ifeq ($(strip $(COMPILER)),GCC)
+ #CFLAGS += -Werror
+#endif
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/mdm_trc.mak b/mcu/make/module/driver/peripheral/extern/devdrv/mdm_trc.mak
new file mode 100644
index 0000000..1348f0b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/mdm_trc.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/mdm_trc #
+##############################################################################
+SRC_LIST += driver/devdrv/mdm_trc/src/mdm_trc.c
+
+SRC_PATH += driver/devdrv/mdm_trc/src
+
+#INC_DIR += driver/devdrv/mdm_trc/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/mt6306.mak b/mcu/make/module/driver/peripheral/extern/devdrv/mt6306.mak
new file mode 100755
index 0000000..e7edd1b
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/mt6306.mak
@@ -0,0 +1,25 @@
+# Define source file lists to SRC_LIST
+SRC_LIST += driver/devdrv/usim/mt6306/src/icc_switchControl0_mt6306.c \
+ driver/devdrv/usim/mt6306/src/icc_switchControl1_mt6306.c \
+ driver/devdrv/usim/mt6306/src/icc_switchControl2_mt6306.c \
+ driver/devdrv/usim/mt6306/src/MT6306_HW_I2C.c \
+ driver/devdrv/usim/mt6306/src/MT6306_I2C.c
+
+
+# Define include path lists to INC_DIR
+INC_DIR += driver/devdrv/usim/inc \
+ ./service/sst/include \
+ ./service/ssf/inc \
+ driver/devdrv/usim/mt6306/inc
+
+ #interface/driver/devdrv/usim
+ #driver/sys_drv/regbase/inc \
+ #driver/sys_drv/dma/inc \
+ # driver/sys_drv/counter/inc \
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS +=
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH += driver/devdrv/usim/mt6306/src
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pcie.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pcie.mak
new file mode 100644
index 0000000..a69103a
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pcie.mak
@@ -0,0 +1,31 @@
+##############################################################################
+# devdrv/pcie #
+##############################################################################
+ifneq ($(filter MT6297 , $(strip $(MODULE_DEFS))),)
+
+SRC_LIST += driver/devdrv/pcie/src/pcie.c \
+ driver/hif/src/hif_pciedev/pcie_mac.c
+
+SRC_PATH += driver/devdrv/pcie/src \
+ driver/hif/src/hif_pciedev
+
+INC_DIR += interface/driver/devdrv/pcie \
+ driver/hif/inc/hif_pciedev \
+ interface/driver/hif/hif_pciedev
+
+endif
+ifneq ($(filter MT6880 MT6890, $(strip $(MODULE_DEFS))),)
+
+SRC_LIST += driver/devdrv/pcie/src/pcie.c \
+ driver/hif/src/hif_pciedev/pcie_mac.c \
+ driver/hif/src/hif_pciedev/pcie_phy.c
+
+SRC_PATH += driver/devdrv/pcie/src \
+ driver/hif/src/hif_pciedev
+
+INC_DIR += interface/driver/devdrv/pcie \
+ driver/hif/inc/hif_pciedev \
+ interface/driver/hif/hif_pciedev
+
+endif
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pcmon.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pcmon.mak
new file mode 100644
index 0000000..ddeb770
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pcmon.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/pcmon #
+##############################################################################
+SRC_LIST += driver/devdrv/pcmon/src/drv_pdamon.c
+
+SRC_PATH += driver/devdrv/pcmon/src
+
+INC_DIR += driver/devdrv/pcmon/inc/$(MD_VER_FOLDER)
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pdn.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pdn.mak
new file mode 100644
index 0000000..b22c991
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pdn.mak
@@ -0,0 +1,8 @@
+##############################################################################
+# devdrv/pdn #
+##############################################################################
+SRC_LIST += driver/devdrv/pdn/src/drvpdn.c
+
+SRC_PATH += driver/devdrv/pdn/src
+
+INC_DIR += interface/driver/devdrv/pdn
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pfb.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pfb.mak
new file mode 100644
index 0000000..258da0a
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pfb.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/pfb #
+##############################################################################
+SRC_LIST += driver/devdrv/pfb/src/drv_pfb.c
+
+SRC_PATH += driver/devdrv/pfb/src
+
+INC_DIR += driver/devdrv/pfb/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pll.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pll.mak
new file mode 100644
index 0000000..d4ffc1a
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pll.mak
@@ -0,0 +1,17 @@
+##############################################################################
+# devdrv/pll #
+##############################################################################
+
+ifneq ($(filter __MD93__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/pll/src/pll_gen93m17.c
+else ifneq ($(filter __MD95__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/pll/src/pll_gen95.c
+else ifneq ($(filter __MD97__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/pll/src/pll_gen97.c
+else ifneq ($(filter __MD97P__,$(strip $(MODULE_DEFS))),)
+SRC_LIST += driver/devdrv/pll/src/pll_gen97p.c
+endif
+
+SRC_PATH += driver/devdrv/pll/src
+
+INC_DIR += interface/driver/devdrv/pll
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pmic.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pmic.mak
new file mode 100644
index 0000000..2189f79
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pmic.mak
@@ -0,0 +1,113 @@
+##############################################################################
+# devdrv/pmic #
+##############################################################################
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmu.c \
+ driver/devdrv/pmic/src/dcl_pmu_common.c \
+
+ifeq ($(strip $(PMIC)),NONE)
+COMP_DEFS += DRV_PMIC_OFF
+endif
+
+ifeq ($(strip $(PMIC)),MT6356)
+
+ifeq ($(strip $(PLATFORM)), MT6763)
+COMP_DEFS += MT6356 DRV_PMIC_WRAP_6763_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6739)
+COMP_DEFS += MT6356 DRV_PMIC_WRAP_6739_REG DRV_PMIC_WRAP_V2
+endif
+
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmic6356.c \
+ driver/devdrv/pmic/src/dcl_pmic6356_init.c
+INC_DIR += driver/devdrv/pmic_wrap/inc
+endif
+
+ifeq ($(strip $(PMIC)),MT6357)
+
+ifeq ($(strip $(PLATFORM)), MT6739)
+COMP_DEFS += MT6357 DRV_PMIC_WRAP_6739_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6765)
+COMP_DEFS += MT6357 DRV_PMIC_WRAP_6765_REG DRV_PMIC_WRAP_V2
+endif
+
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmic6357.c \
+ driver/devdrv/pmic/src/dcl_pmic6357_init.c
+INC_DIR += driver/devdrv/pmic_wrap/inc
+endif
+
+ifeq ($(strip $(PMIC)),MT6358)
+
+ifeq ($(strip $(PLATFORM)), MT6771)
+COMP_DEFS += MT6358 DRV_PMIC_WRAP_6771_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT3967)
+COMP_DEFS += MT6358 DRV_PMIC_WRAP_3967_REG DRV_PMIC_WRAP_V2
+endif
+
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmic6358.c \
+ driver/devdrv/pmic/src/dcl_pmic6358_init.c
+INC_DIR += driver/devdrv/pmic_wrap/inc
+endif
+
+ifeq ($(strip $(PMIC)),MT6359)
+
+ifeq ($(strip $(PLATFORM)), MT6779)
+COMP_DEFS += MT6359 DRV_PMIC_WRAP_6779_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6297)
+COMP_DEFS += MT6297 DRV_PMIC_WRAP_6297_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6297P)
+COMP_DEFS += MT6297P DRV_PMIC_WRAP_6297_REG DRV_PMIC_WRAP_V2
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6885)
+COMP_DEFS += MT6359 DRV_PMIC_WRAP_6885_REG DRV_PMIC_WRAP_V2
+endif
+
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmic6359.c \
+ driver/devdrv/pmic/src/dcl_pmic6359_init.c
+INC_DIR += driver/devdrv/pmic_wrap/inc
+endif
+
+ifeq ($(strip $(PMIC)),MT6359P)
+
+ifeq ($(strip $(PLATFORM)), MT6885)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6885_REG DRV_PMIC_WRAP_V3
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6873)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6885_REG DRV_PMIC_WRAP_V3
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6853)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6853_REG DRV_PMIC_WRAP_V3
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6893)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6893_REG DRV_PMIC_WRAP_V3
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6833)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6833_REG DRV_PMIC_WRAP_V3
+endif
+
+ifeq ($(strip $(PLATFORM)), MT6877)
+COMP_DEFS += MT6359P DRV_PMIC_WRAP_6877_REG DRV_PMIC_WRAP_V3
+endif
+
+SRC_LIST += driver/devdrv/pmic/src/dcl_pmic6359p.c \
+ driver/devdrv/pmic/src/dcl_pmic6359p_init.c
+INC_DIR += driver/devdrv/pmic_wrap/inc
+endif
+
+SRC_PATH += driver/devdrv/pmic/src
+
+INC_DIR += driver/devdrv/pmic/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pmic_wrap.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pmic_wrap.mak
new file mode 100644
index 0000000..152e760
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pmic_wrap.mak
@@ -0,0 +1,28 @@
+##############################################################################
+# devdrv/pmic_wrap #
+##############################################################################
+PMIC_WRAP_V2_COMPILER_FILTER_LIST = MT6356 MT6357 MT6358 MT6359
+
+PMIC_WRAP_V3_COMPILER_FILTER_LIST = MT6359P
+
+ifneq ($(filter $(PMIC_WRAP_V2_COMPILER_FILTER_LIST),$(PMIC)),)
+
+SRC_LIST += driver/devdrv/pmic_wrap/src/pmic_wrap_v2.c
+
+SRC_PATH += driver/devdrv/pmic_wrap/src
+
+INC_DIR += driver/devdrv/pmic_wrap/inc \
+ driver/devdrv/pmic/inc
+
+endif
+
+ifneq ($(filter $(PMIC_WRAP_V3_COMPILER_FILTER_LIST),$(PMIC)),)
+
+SRC_LIST += driver/devdrv/pmic_wrap/src/pmic_wrap_v3.c
+
+SRC_PATH += driver/devdrv/pmic_wrap/src
+
+INC_DIR += driver/devdrv/pmic_wrap/inc \
+ driver/devdrv/pmic/inc
+
+endif
\ No newline at end of file
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pms.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pms.mak
new file mode 100644
index 0000000..0cb4797
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pms.mak
@@ -0,0 +1,10 @@
+##############################################################################
+# devdrv/pms #
+##############################################################################
+SRC_LIST += driver/devdrv/pms/src/pms.c
+
+SRC_PATH += driver/devdrv/pms/src
+
+INC_DIR += driver/devdrv/pms/inc
+
+COMP_DEFS +=
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/pw.mak b/mcu/make/module/driver/peripheral/extern/devdrv/pw.mak
new file mode 100644
index 0000000..ae76daf
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/pw.mak
@@ -0,0 +1,14 @@
+##############################################################################
+# NOTICE : We have no HW for this IP (rtc) now. #
+# But for SW complie request, #
+# temporarily add the 'fake api' to make compile success. #
+##############################################################################
+
+SRC_LIST += driver/devdrv/pw/src/dcl_pw.c
+
+
+SRC_PATH += driver/devdrv/pw/src
+
+INC_DIR += driver/devdrv/pw/inc
+
+COMP_DEFS +=
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/rstctl.mak b/mcu/make/module/driver/peripheral/extern/devdrv/rstctl.mak
new file mode 100644
index 0000000..9c2dcf0
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/rstctl.mak
@@ -0,0 +1,9 @@
+##############################################################################
+# devdrv/rstctl #
+##############################################################################
+SRC_LIST += driver/devdrv/rstctl/src/dcl_rstctl.c \
+ driver/devdrv/rstctl/src/drv_rstctl.c
+
+SRC_PATH += driver/devdrv/rstctl/src
+
+INC_DIR += driver/devdrv/rstctl/inc
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/rtc.mak b/mcu/make/module/driver/peripheral/extern/devdrv/rtc.mak
new file mode 100644
index 0000000..7fe9ee7
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/rtc.mak
@@ -0,0 +1,14 @@
+##############################################################################
+# NOTICE : We have no HW for this IP (rtc) now. #
+# But for SW complie request, #
+# temporarily add the 'fake api' to make compile success. #
+##############################################################################
+
+SRC_LIST += driver/devdrv/rtc/src/dcl_rtc.c
+
+
+SRC_PATH += driver/devdrv/rtc/src
+
+INC_DIR += driver/devdrv/rtc/inc
+
+COMP_DEFS +=
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/soe.mak b/mcu/make/module/driver/peripheral/extern/devdrv/soe.mak
new file mode 100644
index 0000000..f163251
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/soe.mak
@@ -0,0 +1,11 @@
+##############################################################################
+# devdrv/soe #
+##############################################################################
+SRC_LIST += driver/devdrv/soe/src/drv_soe.c
+
+SRC_PATH += driver/devdrv/soe/src
+
+INC_DIR += interface/driver/devdrv/pdn \
+ driver/devdrv/soe/inc
+
+COMP_DEFS += __COMPILE_DRIVER__
\ No newline at end of file
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/spmi.mak b/mcu/make/module/driver/peripheral/extern/devdrv/spmi.mak
new file mode 100755
index 0000000..7febf20
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/spmi.mak
@@ -0,0 +1,19 @@
+##############################################################################
+# devdrv/spmi #
+##############################################################################
+SRC_LIST += driver/devdrv/spmi/src/dcl_spmi.c
+
+ifeq ($(strip $(SPMI)),TRUE)
+ SRC_LIST += driver/devdrv/spmi/src/spmi_common.c \
+ driver/devdrv/spmi/src/spmi.c \
+ driver/devdrv/spmi/src/spmi_dbg.c \
+ driver/devdrv/spmi/src/pmif.c
+else
+ COMP_DEFS += DRV_SPMI_OFF
+endif
+
+SRC_PATH += driver/devdrv/spmi/src
+
+INC_DIR += driver/devdrv/spmi/inc \
+ driver/devdrv/pmic/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/tia.mak b/mcu/make/module/driver/peripheral/extern/devdrv/tia.mak
new file mode 100755
index 0000000..218e503
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/tia.mak
@@ -0,0 +1,22 @@
+##############################################################################
+# devdrv/tia #
+##############################################################################
+
+ifeq ($(strip $(MD_TFWK)),TRUE)
+# Define source file lists to SRC_LIST
+SRC_LIST += driver/devdrv/tia/src/tia.c \
+ driver/devdrv/tia/src/tia_adc.c \
+ driver/devdrv/tia/src/tia_atcmd.c \
+ driver/devdrv/tia/src/tia_task.c
+
+# Define include path lists to INC_DIR
+INC_DIR += driver/devdrv/tia/inc \
+ interface/driver/devdrv/tia \
+ interface/driver/tfwk_drv
+
+# Define the specified compile options to COMP_DEFS
+#COMP_DEFS +=
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH += driver/devdrv/tia/src
+endif
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/uart.mak b/mcu/make/module/driver/peripheral/extern/devdrv/uart.mak
new file mode 100644
index 0000000..32f33d0
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/uart.mak
@@ -0,0 +1,18 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+SRC_LIST += driver/devdrv/uart/src/dbgprint.c \
+ driver/devdrv/uart/src/uart_handler.c \
+ driver/devdrv/uart/src/uart.c
+
+SRC_PATH += driver/devdrv/uart/src
+
+INC_DIR += driver/devdrv/uart/inc
+
+ifneq ($(filter ATEST_SLT_U3, $(strip $(MODULE_DEFS))),)
+COMP_DEFS += __SLT_TOOL_SUPPORT__
+endif # FOR SLT_TOOL U3 device
+
+ifneq ($(filter ATEST_SLT_SDIO, $(strip $(MODULE_DEFS))),)
+COMP_DEFS += __SLT_TOOL_SUPPORT__
+endif # FOR SLT_TOOL SDIO device
\ No newline at end of file
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/us_counter.mak b/mcu/make/module/driver/peripheral/extern/devdrv/us_counter.mak
new file mode 100644
index 0000000..7cc90a2
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/us_counter.mak
@@ -0,0 +1,11 @@
+##############################################################################
+# devdrv/gpt #
+##############################################################################
+SRC_LIST += driver/devdrv/us_counter/src/uscounter.c
+
+SRC_PATH += driver/devdrv/us_counter/src
+
+INC_DIR += interface/driver/devdrv/us_counter \
+ driver/sleep_drv/public/inc \
+ driver/sys_drv/init/inc
+
diff --git a/mcu/make/module/driver/peripheral/extern/devdrv/usim.mak b/mcu/make/module/driver/peripheral/extern/devdrv/usim.mak
new file mode 100644
index 0000000..baab84d
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/devdrv/usim.mak
@@ -0,0 +1,44 @@
+##############################################################################
+# devdrv/usim #
+##############################################################################
+SRC_LIST += driver/devdrv/usim/src/dcl_sim.c \
+ driver/devdrv/usim/src/icc_sim_common_mtk.c \
+ driver/devdrv/usim/src/icc_switchControl_al.c \
+ driver/devdrv/usim/src/icc_switchControl_mtk_0.c \
+ driver/devdrv/usim/src/icc_switchControl_mtk_1.c \
+ driver/devdrv/usim/src/usim_smt.c
+
+
+SRC_PATH += driver/devdrv/usim/src
+
+# Define the specified compile options to COMP_DEFS
+#COMP_DEFS += __NO_PMU__ \
+# __No_2G_Timer__ \
+ # __temp_mask__ \
+#open this flag to enable drv_trace
+#COMP_DEFS += __SIM_DRV_TRACE__ \
+
+#In drvtest, we need these flags to do unit test
+ifeq ($(strip $(ATEST_ENABLE)),TRUE)
+ ifeq ($(strip $(ATEST_DRV_ENABLE)),TRUE)
+COMP_DEFS += __T1_HIGT_PRIORITY__ \
+ __CHAINING_TEST__ \
+ __SPEED_TEST__
+ endif
+endif
+
+#COMP_DEFS += __DBG_MSG__ \
+
+COMP_DEFS += __DBG_MSG__ \
+ __TBD__
+
+#INC_DIR += driver/devdrv/usim/inc \
+# ps/sim2/include \
+# dp_engine/che \
+# base/inc/chip/MT6290 \
+
+# Define include path lists to INC_DIR
+INC_DIR += driver/devdrv/usim/inc \
+ ./service/sst/include \
+ interface/driver/regbase \
+ ./interface/service/hif \
diff --git a/mcu/make/module/driver/peripheral/extern/drv.mak b/mcu/make/module/driver/peripheral/extern/drv.mak
new file mode 100644
index 0000000..85ace45
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/extern/drv.mak
@@ -0,0 +1,32 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/drv/src/bf.c \
+ driver/drv/src/e_compass_sensor.c \
+ driver/drv/src/e_compass_main.c \
+ driver/drv/src/BC_drv.c
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/drv/include \
+ interface/driver/connectivity/usb_driver \
+ driver/connectivity/usb_driver/inc \
+ driver/storage/flash/mtd/inc \
+ driver/storage/flash/fdm/inc \
+ driver/storage/mc/inc \
+ driver/connectivity/usb_class/include \
+ ./service/sst/include \
+ ./service/sst/include \
+ ./service/ssf/inc \
+ interface/driver/drv_def \
+ interface/driver/regbase \
+ driver/peripheral/inc
+
+ifeq ($(strip $(LGE_SECURITY)), TRUE)
+ INC_DIR += custom/modem/lgesecurity
+endif
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = APCS_INTWORK
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/drv/src \
+ driver/connectivity/usb_driver/src \
+ driver/storage/mc/src
diff --git a/mcu/make/module/driver/peripheral/mc.mak b/mcu/make/module/driver/peripheral/mc.mak
new file mode 100644
index 0000000..fdce0f0
--- /dev/null
+++ b/mcu/make/module/driver/peripheral/mc.mak
@@ -0,0 +1,39 @@
+# Define source file\ lists to SRC_LIST
+ SRC_LIST += driver/storage/mc/src/dcl_memory_card.c \
+ driver/storage/mc/src/msdc.c \
+ driver/storage/mc/src/usbms_msdc.c
+ ifneq ($(filter __MSDC2_SD_MMC__, $(strip $(COM_DEFS))),)
+ SRC_LIST += driver/storage/mc/src/msdc_fake_kal.c \
+ driver/storage/mc/src/msdc2.c \
+ driver/storage/mc/src/sdio_drv.c \
+ #driver/storage/mc/src/msdc_test.c
+ endif
+## SD/MMC memory card select.
+ ifneq ($(filter __MSDC_SD_MMC__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/storage/mc/src/sd.c \
+ driver/storage/mc/src/sd_drv.c
+ ifneq ($(filter __MSDC2_SD_MMC__, $(strip $(COM_DEFS))),)
+ SRC_LIST += driver/storage/mc/src/sd2.c \
+ driver/storage/mc/src/sd_drv2.c \
+ driver/storage/mc/src/sd_adap.c
+ endif
+ endif
+
+
+
+# Define include path lists to INC_DIR
+INC_DIR += interface/driver/drv_def \
+ driver/storage/mc/inc \
+ ./service/sst/include \
+ interface/driver/regbase \
+ ./service/fs/common/include \
+ driver/sys_drv/cache/inc \
+ driver/sys_drv/cache/inc/$(MD_VER_FOLDER) \
+ $(strip $(PROJDIR))/custom/driver/drv_gen
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS +=
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH += driver/storage/mc/src
+
diff --git a/mcu/make/module/driver/simulation/drv_sim.mak b/mcu/make/module/driver/simulation/drv_sim.mak
new file mode 100644
index 0000000..2efda22
--- /dev/null
+++ b/mcu/make/module/driver/simulation/drv_sim.mak
@@ -0,0 +1,32 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = MoDIS_VC9/drv_sim/src/w32_audio.c \
+ MoDIS_VC9/drv_sim/src/w32_dummy_drv.c \
+ MoDIS_VC9/drv_sim/src/w32_keys_dcl.c \
+ MoDIS_VC9/drv_sim/src/w32_l1.c \
+ MoDIS_VC9/drv_sim/src/w32_l4c.c \
+ MoDIS_VC9/drv_sim/src/w32_uart.c \
+ MoDIS_VC9/drv_sim/src/w32_gpt_dcl.c \
+ MoDIS_VC9/drv_sim/src/w32_memory_card.c
+
+ifneq ($(filter __FS_MODIS_FDM__,$(strip $(MODULE_DEFS))),)
+ SRC_LIST += MoDIS_VC9/drv_sim/src/w32_file_disk.c
+endif
+
+# If TCPIP_SUPPORT = NONE => Do not build modis_vc9\drv_sim\src\w32_socket.c
+#ifneq ($(strip $(TCPIP_SUPPORT)),NONE)
+# SRC_LIST += .\MoDIS_VC9\drv_sim\src\w32_socket.c \
+# .\MoDIS_VC9\drv_sim\src\w32_abm.c
+#endif
+
+# Define include path lists to INC_DIR
+INC_DIR = MoDIS_VC9/MoDIS \
+ MoDIS_VC9/drv_sim/include \
+ driver/devdrv/emi/inc
+
+INC_DIR += driver/peripheral/inc
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = MoDIS_VC9/drv_sim/include/src
diff --git a/mcu/make/module/driver/system/sys_drv.mak b/mcu/make/module/driver/system/sys_drv.mak
new file mode 100644
index 0000000..ffda28e
--- /dev/null
+++ b/mcu/make/module/driver/system/sys_drv.mak
@@ -0,0 +1,420 @@
+##############################################################
+# Define bootloader folder path
+##############################################################
+
+ifneq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ MD_VER_FOLDER = md97
+endif
+
+# Define source file lists to SRC_LIST
+SRC_LIST =driver/sys_drv/init/src/$(MD_VER_FOLDER)/idle_task.c \
+ driver/sys_drv/dormant/src/$(MD_VER_FOLDER)/dormant_service.c
+# driver/sys_drv/init/src/info.c
+# driver/sys_drv/init/src/nfb_loader.c \
+
+ifeq ($(strip $(ESL_COSIM_LTE)),FALSE)
+ ifeq ($(strip $(COMPILER)),GCC)
+ CFLAGS += -Werror
+ endif
+endif
+
+ifneq ($(strip $(MD_VER_FOLDER)),md93)
+ SRC_LIST += driver/sys_drv/sfu/src/$(MD_VER_FOLDER)/drv_sfu.c
+ SRC_LIST += driver/sys_drv/spu/src/$(MD_VER_FOLDER)/drv_spu.c
+endif
+
+ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ifeq ($(filter BASIC,$(TEST_LOAD_TYPE)),)
+ifeq ($(strip $(CUSTOM_RELEASE)),TRUE)
+ ifeq ($(strip $(DHL_SUPPORT)),TRUE)
+ SRC_LIST += $(strip $(CUS_MTK_REL))/dhl/l1trace/spu_trace_utmd.c
+ else
+ SRC_LIST += $(strip $(CUS_MTK_REL))/tst/l1trace/spu_trace_utmd.c
+ endif
+else
+ SRC_LIST += $(strip $(CGEN_L1_OUTDIR))/spu_trace_utmd.c
+endif
+endif
+endif
+
+#ifneq ($(filter __DSP_FCORE4__, $(strip $(MODULE_DEFS))),)
+# SRC_LIST += driver/sys_drv/init/src/dmdsp_init.c
+#endif
+
+ifneq ($(filter __LP_SCHEDULE_ENABLE__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/task_agent/src/tg_hisr.c
+endif
+
+ifneq ($(filter __SMART_PHONE_MODEM__ , $(strip $(MODULE_DEFS))),)
+# SRC_LIST += driver/sys_drv/emi/src/emimpu.c
+endif
+
+ifeq ($(filter __SMART_PHONE_MODEM__, $(strip $(MODULE_DEFS))),)
+# SRC_LIST += driver/sys_drv/emi/src/emi.c
+else
+# SRC_LIST += driver/sys_drv/emi/src/emi.c
+endif
+
+ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ ifneq ($(filter __DSP_FCORE4__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/ipc/src/mdci.c
+ endif
+endif
+
+ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ #SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init.c
+ #SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_comm.c
+ #SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_trc.c
+ #SRC_LIST += driver/sys_drv/init/src/boot_cert_pattern.c
+endif
+
+ifeq ($(strip $(COMPILER)), GCC)
+ ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ ifeq ($(strip $(MD_VER_FOLDER)),md93)
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_gpr.S
+ endif
+ ifeq ($(strip $(MD_VER_FOLDER)),md97)
+ ifeq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_vpe0.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_vpe2.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_tc.S
+ endif
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/cache_dpdl2.c
+ endif
+ ifeq ($(strip $(MD_VER_FOLDER)),md97p)
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_vpe0.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_vpe2.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_tc.S
+ endif
+
+ ifneq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/init/src/md97ia/bootarm_gcc.S
+ SRC_LIST += driver/sys_drv/init/src/md97ia/stack_init.S
+ SRC_LIST += driver/sys_drv/init/src/md97ia/init_vpe1.S
+ SRC_LIST += driver/sys_drv/init/src/md97ia/init_cm.S
+ SRC_LIST += driver/sys_drv/init/src/md97ia/join_domain.S
+ SRC_LIST += driver/sys_drv/init/src/md97ia/init.c
+ SRC_LIST += driver/sys_drv/init/src/md97ia/init_comm.c
+ SRC_LIST += driver/sys_drv/init/src/md97ia/init_trc.c
+ SRC_LIST += driver/sys_drv/cache/src/md95/l1caches.S
+ SRC_LIST += driver/sys_drv/cache/src/md95/l2cache.S
+ SRC_LIST += driver/sys_drv/cache/src/md95/cache.c
+ SRC_LIST += driver/sys_drv/cache/src/md95/cache_util.c
+ else
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/bootarm_gcc.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/stack_init.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_vpe1.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_cm.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/join_domain.S
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init.c
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_comm.c
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/init_trc.c
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/l1caches.S
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/l2cache.S
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/cache.c
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/cache_util.c
+ ifeq ($(strip $(MD_VER_FOLDER)),md93)
+ #No idle_service.c
+ else
+ ifeq ($(strip $(MD_VER_FOLDER)),md95)
+ #No idle_service.c
+ else
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/idle_service.c
+ endif
+ endif
+ endif
+ #SRC_LIST += driver/sys_drv/init/src/set_gpr_boot_values.S
+ #SRC_LIST += driver/sys_drv/init/common/copy_c2_ram.S
+ #SRC_LIST += driver/sys_drv/init/common/init_caches.S
+ #SRC_LIST += driver/sys_drv/init/common/init_cp0.S
+ #SRC_LIST += driver/sys_drv/init/common/init_itc.S
+ #SRC_LIST += driver/sys_drv/init/common/init_L2_CM3.S
+ #SRC_LIST += driver/sys_drv/init/common/init_L23caches.S
+ #SRC_LIST += driver/sys_drv/init/common/init_segmentation.S
+ #SRC_LIST += driver/sys_drv/init/src/release_mp.S
+ #SRC_LIST += driver/sys_drv/init/common/init_CoreFPGA6_mem.S
+ #SRC_LIST += driver/sys_drv/init/common/init_caches2.S
+ #SRC_LIST += driver/sys_drv/cache/src/init_l1caches.S
+ #SRC_LIST += driver/sys_drv/init/common/init_L2_CM2.S
+ #SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/l1caches.S
+ #SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/l2cache.S
+ SRC_LIST += driver/sys_drv/hw_itc/src/hw_itc.c
+ SRC_LIST += driver/sys_drv/hw_itc/src/hw_itc_init.S
+ SRC_LIST += driver/sys_drv/cache/src/cm2_drv.c
+ SRC_LIST += driver/sys_drv/mpu/src/$(MD_VER_FOLDER)/mpu.c
+ SRC_LIST += driver/sys_drv/dormant/src/$(MD_VER_FOLDER)/interAptiv-dormantMode_gcc.S
+ endif
+
+else # RVCT
+ SRC_LIST += driver/sys_drv/cache/src/cp15_rvct.S
+ ifneq ($(filter __MTK_TARGET__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/bootarm_rvct.S
+ endif
+endif
+
+ifneq ($(filter __ARM9_MMU__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/cache/src/mmu.c
+endif
+
+ifneq ($(filter __ARM11_MMU__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/cache/src/mmu.c
+endif
+
+ifneq ($(filter __CR4__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/cache/src/mpu.c
+endif
+
+ifneq ($(filter __MIPS_IA__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mips_ia_pmu_montr.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mips_ia_cm_pmu.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mips_ia_cm_pmu_service.c
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/mips_ia_utils.c
+
+ MIPS_IA_MR1_SRC_LIST := driver/sys_drv/init/src/md93/mips_ia_mr1_utils.c
+ MIPS_IA_MR2_SRC_LIST := driver/sys_drv/init/src/md93/mips_ia_mr2_utils.c
+ MIPS_IA_MR3_SRC_LIST := driver/sys_drv/init/src/md95/mips_ia_mr3_utils.c\
+ driver/sys_drv/pmu/src/md95/mips_ia_icm_pmu.c
+
+ MIPS_IA_MR_VERSION_MT6763:=MR2
+ MIPS_IA_MR_VERSION_MT6739:=MR2
+ MIPS_IA_MR_VERSION_MT6771:=MR2
+ MIPS_IA_MR_VERSION_MT6765:=MR2
+ MIPS_IA_MR_VERSION_MT6295M:=MR3
+ MIPS_IA_MR_VERSION_MT3967:=MR3
+ MIPS_IA_MR_VERSION_MT6785:=MR3
+ MIPS_IA_MR_VERSION_GEN_md92:=MR1
+ MIPS_IA_MR_VERSION_GEN_md93:=MR2
+ MIPS_IA_MR_VERSION_GEN_md95:=MR3
+ # check platform first
+ MIPS_IA_MR_VERSION:=$(MIPS_IA_MR_VERSION_$(strip ${PLATFORM}))
+ # if no platform, check generation
+ MIPS_IA_MR_VERSION:=$(if ${MIPS_IA_MR_VERSION}, ${MIPS_IA_MR_VERSION}, $(MIPS_IA_MR_VERSION_GEN_$(strip ${MD_VER_FOLDER})))
+ # otherwise, use default setting
+ MIPS_IA_MR_VERSION:=$(if ${MIPS_IA_MR_VERSION}, ${MIPS_IA_MR_VERSION}, MR2)
+
+ MIPS_IA_MR_SRC_LIST:=$(MIPS_IA_$(strip ${MIPS_IA_MR_VERSION})_SRC_LIST)
+ SRC_LIST += ${MIPS_IA_MR_SRC_LIST}
+
+mips_ia_pmu_montr.obj: CFLAGS += -minline-intermix
+
+else
+# For I7200
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mdmcu_core_pmu.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mdmcu_l2_pmu.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mdmcu_pmu_drv.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mdmcu_pmu_srv.c
+ SRC_LIST += driver/sys_drv/pmu/src/$(MD_VER_FOLDER)/mdmcu_pmu_cfg.c
+
+ SRC_LIST += driver/sys_drv/init/src/$(MD_VER_FOLDER)/mdmcu_init.c
+endif
+
+ifneq ($(filter __MTK_MMU_V2__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/cache/src/mpu_mtk_mmu_v2_int.c
+endif
+
+
+###################################################################
+# Define include path lists to INC_DIR
+INC_DIR = ./service/sst/include \
+ ./service/sst/include \
+ $(strip $(PROJDIR))/verno \
+ ./service/sss/interface/inc \
+ driver/peripheral/inc \
+ driver/storage/flash/fdm/inc \
+ driver/sys_drv/mpu/inc/$(MD_VER_FOLDER) \
+ driver/sys_drv/init/inc \
+ interface/driver/sys_drv \
+ interface/driver/devdrv/pcmon \
+ driver/sys_drv/cache/inc \
+ driver/sys_drv/mmu/inc \
+ driver/sys_drv/pmu/inc \
+ driver/sys_drv/pmu/inc/$(MD_VER_FOLDER) \
+ ./service/sys_svc/region/inc \
+ ./service/sys_svc/excep_hdlr/inc \
+ ./service/sys_svc/gfh/public \
+ ./service/sys_svc/profile/inc \
+ ./service/sys_svc/dspfm_lte/inc \
+ driver/devdrv/emi/inc \
+ driver/devdrv/iomux/inc \
+ driver/devdrv/cfgctl/inc \
+ driver/devdrv/pms/inc \
+ driver/sys_drv/dormant/inc/$(MD_VER_FOLDER) \
+ driver/sys_drv/dormant/src/$(MD_VER_FOLDER) \
+ ./interface/service/sys_svc \
+ ./interface/service/sst \
+ ./interface/service/dhl \
+ driver/sys_drv/hw_itc/inc \
+ interface/driver/devdrv/mdipc \
+ interface/driver/devdrv/busmpu \
+ interface/driver/regbase \
+ interface/driver/devdrv/ect \
+ driver/devdrv/rstctl/inc \
+ driver/sleep_drv/internal/inc \
+ interface/driver/che \
+ driver/devdrv/elm/inc \
+ interface/driver/sib_drv/scc
+ifneq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ INC_DIR += driver/devdrv/cirq/md97/inc \
+ driver/devdrv/bus/md97/inc \
+ driver/sys_drv/init/inc/md97ia\
+ driver/sys_drv/cache/inc/md95
+else
+ INC_DIR += driver/devdrv/cirq/$(MD_VER_FOLDER)/inc \
+ driver/devdrv/bus/$(MD_VER_FOLDER)/inc \
+ driver/sys_drv/init/inc/$(MD_VER_FOLDER)\
+ driver/sys_drv/cache/inc/$(MD_VER_FOLDER)
+endif
+
+ifneq ($(filter __CACHE_TEST__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/cache/src/cachetest/cachetest.c
+ INC_DIR += driver/sys_drv/cache/src/cachetest
+ ifeq ($(strip $(MD_VER_FOLDER)),md97)
+ SRC_LIST += driver/sys_drv/cache/src/$(MD_VER_FOLDER)/drvtest_cache_dpdl2.c
+ endif
+endif
+
+ifneq ($(strip $(MD_VER_FOLDER)),md93)
+ifneq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ INC_DIR += driver/sys_drv/sfu/inc/md95
+ INC_DIR += driver/sys_drv/spu/inc/md97
+else
+ INC_DIR += driver/sys_drv/sfu/inc/$(MD_VER_FOLDER)
+ INC_DIR += driver/sys_drv/spu/inc/$(MD_VER_FOLDER)
+endif
+endif
+# solution for 93/95 co-codebase re-arch for R3 auto-sync to UMOLYA TRUNK
+ifneq ($(wildcard interface/driver/dvfs_drv),)
+ INC_DIR += interface/driver/dvfs_drv/$(MD_VER_FOLDER)
+else
+ INC_DIR += driver/sleep_drv/public/inc
+endif
+
+ifneq ($(wildcard interface/driver/tfwk_drv),)
+ INC_DIR += interface/driver/tfwk_drv
+endif
+
+ifndef __MAUI_BASIC__
+ INC_DIR += interface/l1/mml1/external
+endif
+
+ifneq ($(filter __ESL_COSIM_LTE__, $(strip $(MODULE_DEFS))),)
+ INC_DIR += driver/devdrv/hsl/inc
+endif
+
+L1_UTMD_FILES += driver/sys_drv/spu/src/spu_trace_utmd.json
+INC_DIR += $(strip $(COMP_L1_TRC_DIR))
+###################################################################
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS = APCS_INTWORK
+
+COMP_DEFS += $(strip $(PLATFORM))
+
+COMP_DEFS += CACHE_FLUSH_IN_DORMANT=1
+
+ifeq ($(strip $(ENHANCED_SINGLE_BANK_NOR_FLASH_SUPPORT)),TRUE)
+ COMP_DEFS += SINGLE_BANK_SUPPORT
+endif
+
+ifeq ($(TS_PROFILING),TRUE)
+ COMP_DEFS += __TIME_STAMP__\
+ __TIME_STAMP_UTIL__\
+ __TIME_STAMP_TDMA_TIMER__\
+ __TIME_STAMP_FORCE_ENABLE__
+endif
+
+ifeq ($(strip $(call Upper,$(UE_SIMULATOR))),TRUE)
+ COMP_DEFS += L1_SIM
+endif
+
+ifeq ($(strip $(TEST_LOAD_TYPE)),BASIC)
+ INC_DIR += ./interface/service/hif \
+ ./interface/service/hif
+endif
+
+ifneq ($(strip $(filter __ESL_ENABLE__,$(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/esl/src/esl_profile.c
+ ifeq ($(strip $(MD_VER_FOLDER)),md97)
+ SRC_LIST += driver/sys_drv/esl/src/md97_esl_test.c
+ else
+ SRC_LIST += driver/sys_drv/esl/src/esl_test.c
+ endif
+ ifneq ($(strip $(MD_VER_FOLDER)),md97)
+ SRC_LIST += driver/sys_drv/esl/src/esl_dspr2.c
+ SRC_LIST += driver/sys_drv/init/$(MD_VER_FOLDER)/src/release_mp.S
+ endif
+ INC_DIR += driver/sys_drv/esl/inc
+endif
+
+ifneq ($(strip $(filter __SPV_UFPS_LOAD__,$(MODULE_DEFS))),)
+ INC_DIR += driver/sys_drv/esl/inc
+ SRC_LIST += driver/sys_drv/esl/src/esl_profile.c
+ ifeq ($(strip $(MD_VER_FOLDER)),md97)
+ SRC_LIST += driver/sys_drv/esl/src/md97_esl_test.c
+ else
+ SRC_LIST += driver/sys_drv/esl/src/esl_profile.c
+ SRC_LIST += driver/sys_drv/esl/src/spv_test.c
+ SRC_LIST += driver/sys_drv/esl/src/esl_dspr2.c
+ INC_DIR += driver/devdrv/elm/inc
+ endif
+endif
+
+ifneq ($(strip $(filter __ESL_BENCHMARK_COREMARK__,$(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/esl/src/coremark/core_list_join.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/core_main.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/core_matrix.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/core_state.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/core_util.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/barebones/core_portme.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/barebones/cvt.c
+ SRC_LIST += driver/sys_drv/esl/src/coremark/barebones/ee_printf.c
+ INC_DIR += driver/sys_drv/esl/src/coremark
+ INC_DIR += driver/sys_drv/esl/src/coremark/barebones
+
+ %/core_list_join.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/core_main.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/core_matrix.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/core_state.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/core_util.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/core_portme.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/cvt.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+ %/ee_printf.obj: CFLAGS := -Wall -O3 -funroll-all-loops -falign-jumps=16 -falign-functions=16 -fgcse-sm -fgcse-las -finline-functions -finline-limit=1000 -msoft-float -mtune=i7200 -march=32r6 -mno-imadd -save-temps -fdollars-in-identifiers
+
+ TEMPspace :=
+ TEMPspace +=
+ #core_main.obj: CFLAGS += -DCOMPILER_FLAGS=\"$(subst $(TEMPspace),:,$(filter -f% -m% -E% -O%,$(CFLAGS)))\"
+ %/core_main.obj: CFLAGS += -DCOMPILER_FLAGS=\"$(subst $(TEMPspace),:,$(filter-out -W% -f%,$(CFLAGS)))\"
+endif
+
+ifneq ($(strip $(filter __ESL_BENCHMARK_DHRYSTONE__,$(MODULE_DEFS))),)
+ SRC_LIST += driver/sys_drv/esl/src/dhrystone/dhry_1.c
+ SRC_LIST += driver/sys_drv/esl/src/dhrystone/dhry_2.c
+ INC_DIR += driver/sys_drv/esl/src/dhrystone
+
+ %/dhry_1.obj: CFLAGS := $(filter-out -O1 -O2 -O3 -Os -Werror=%,$(CFLAGS)) -O3
+ %/dhry_2.obj: CFLAGS := $(filter-out -O1 -O2 -O3 -Os -Werror=%,$(CFLAGS)) -O3
+endif
+
+#fdr_reorg
+INC_DIR += interface/service/sbp \
+ interface/protocol/as_c2k/common \
+ custom/protocol/common/ps
+ifneq ($(filter __MIPS_IA__, $(strip $(MODULE_DEFS))),)
+%/esl_test.obj: CFLAGS += -DDSPR2_TEST
+%/esl_profile.obj: CFLAGS += -DDSPR2_TEST
+%/esl_dspr2.obj: CFLAGS += -mdspr2
+%/interAptiv-dormantMode_gcc.obj: AFLAGS := $(filter-out -mips16 -mips16e2, $(AFLAGS))
+endif
+
+%/bootarm_gcc.obj: AFLAGS := $(filter-out -mips16 -mips16e2, $(AFLAGS))
+ifeq ($(strip $(MD_VER_FOLDER)),md95)
+%/init_cm.obj: AFLAGS := $(filter-out -mips16 -mips16e2, $(AFLAGS))
+endif
+ifneq ($(filter MT6297_IA, $(strip $(MODULE_DEFS))),)
+ifeq ($(strip $(MD_VER_FOLDER)),md97)
+%/init_cm.obj: AFLAGS := $(filter-out -mips16 -mips16e2, $(AFLAGS))
+endif
+endif
+
+ifeq ($(strip $(LTO_BUILD)),TRUE)
+%/dormant_service.obj: CFLAGS := $(filter-out -flto -fno-fat-lto-objects, $(CFLAGS))
+endif
diff --git a/mcu/make/module/driver/tty/extern/tty.mak b/mcu/make/module/driver/tty/extern/tty.mak
new file mode 100644
index 0000000..4913a73
--- /dev/null
+++ b/mcu/make/module/driver/tty/extern/tty.mak
@@ -0,0 +1,33 @@
+#######################################################################
+# tty #
+#######################################################################
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/tty/src/dcl_tty.c
+
+ifneq ($(filter __TTY_UT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/tty/src/tty_ut.c
+endif
+
+ifneq ($(filter __EXCEPT_TTY_UT__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/tty/src/excp_tty_ut.c
+endif
+
+ifneq ($(filter ATEST_SYS_TTYCORE, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/tty/src/tty_unit_test.c
+endif
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/tty/inc \
+ driver/devdrv/common/inc \
+ interface/protocol/l2_utility/flc2_v2
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/tty/src
+
+#fdr_reorg
+INC_DIR += interface/service/sbp \
+ interface/protocol/as_c2k/common \
+ custom/protocol/common/ps
\ No newline at end of file
diff --git a/mcu/make/module/driver/ut/drvtest.mak b/mcu/make/module/driver/ut/drvtest.mak
new file mode 100644
index 0000000..65d5f24
--- /dev/null
+++ b/mcu/make/module/driver/ut/drvtest.mak
@@ -0,0 +1,89 @@
+# Define source file lists to SRC_LIST
+SRC_LIST = driver/drvtest/common/src/drvtest_common.c \
+ driver/drvtest/common/src/drvtest_dummy.c
+ifeq ($(filter __ARM7EJ_S__, $(strip $(MODULE_DEFS))),)
+ SRC_LIST += driver/drvtest/common/src/drvtest_sm.c
+endif
+
+# Define include path lists to INC_DIR
+INC_DIR = driver/devdrv/common/inc \
+ driver/devdrv/iomux/inc \
+ driver/drvtest/common/inc \
+ driver/sys_drv/cache/inc \
+ driver/sys_drv/cache/inc/$(MD_VER_FOLDER) \
+ driver/sys_drv/init/inc \
+ interface/driver/sys_drv \
+ ./service/sst/include \
+ ./service/sst/include \
+ interface/driver/devdrv/mdipc \
+ driver/devdrv/mdipc/inc \
+ driver/devdrv/gpt/inc \
+ driver/sleep_drv/internal/inc \
+ driver/devdrv/cirq/$(MD_VER_FOLDER)/inc
+
+# Define the specified compile options to COMP_DEFS
+COMP_DEFS =
+
+# Define the source file search paths to SRC_PATH
+SRC_PATH = driver/drvtest/common/src
+
+include make/module/driver/ut/drvtest/test.mak
+ifeq ($(strip $(HIF_USB_SUPPORT)),TRUE)
+include make/module/driver/drv_hif.mak
+endif
+-include make/module/driver/peripheral/extern/devdrv/iomux.mak
+include make/module/driver/ut/drvtest/gpt.mak
+-include make/module/driver/ut/drvtest/l2_copro.mak
+include make/module/driver/ut/drvtest/spic.mak
+include make/module/driver/ut/drvtest/nfi.mak
+-include make/module/driver/ut/drvtest/mac_phy_cosim.mak
+-include make/module/driver/ut/drvtest/l2_hw_logging.mak
+include make/module/driver/ut/drvtest/gdma_ps.mak
+include make/module/driver/ut/drvtest/hif.mak
+include make/module/driver/ut/drvtest/usim.mak
+include make/module/driver/ut/drvtest/rstctl.mak
+include make/module/driver/ut/drvtest/cpu.mak
+include make/module/driver/ut/drvtest/coresight.mak
+include make/module/driver/ut/drvtest/gpio.mak
+include make/module/driver/ut/drvtest/eint.mak
+
+include make/module/driver/ut/drvtest/dem.mak
+
+include make/module/driver/ut/drvtest/pfc.mak
+include make/module/driver/ut/drvtest/uart.mak
+include make/module/driver/ut/drvtest/idc.mak
+include make/module/driver/ut/drvtest/stress.mak
+include make/module/driver/ut/drvtest/drvtest_slt.mak
+include make/module/driver/ut/drvtest/mc_drvtest.mak
+include make/module/driver/ut/drvtest/dspfm.mak
+include make/module/driver/ut/drvtest/busmon.mak
+include make/module/driver/ut/drvtest/bsi.mak
+include make/module/driver/ut/drvtest/dormant.mak
+-include make/module/driver/ut/drvtest/ss.mak
+include make/module/driver/ut/drvtest/log_seq.mak
+include make/module/driver/ut/drvtest/bwl.mak
+-include make/module/driver/ut/drvtest/stp.mak
+-include make/module/driver/ut/drvtest/sdf.mak
+include make/module/driver/ut/drvtest/mtad.mak
+include make/module/driver/ut/drvtest/lp.mak
+include make/module/driver/ut/drvtest/sleep_it.mak
+-include make/module/driver/ut/drvtest/scc.mak
+include make/module/driver/ut/drvtest/pcmon.mak
+include make/module/driver/ut/drvtest/ect.mak
+include make/module/driver/ut/drvtest/asm.mak
+include make/module/driver/ut/drvtest/soe.mak
+include make/module/driver/ut/drvtest/lhif.mak
+include make/module/driver/ut/drvtest/dpcopro_at.mak
+-include make/module/driver/ut/drvtest/pcc.mak
+include make/module/driver/ut/drvtest/hifcldma_ap.mak
+include make/module/driver/ut/drvtest/dpmaif.mak
+include make/module/driver/ut/drvtest/mdcirq.mak
+include make/module/driver/peripheral/devdrv_sec.mak
+include make/module/driver/ut/drvtest/dhl_ulsp.mak
+include make/module/driver/ut/drvtest/pcie_at.mak
+include make/module/driver/ut/drvtest/cos.mak
+include make/module/driver/ut/drvtest/cldmadev_drvtest.mak
+include make/module/driver/ut/drvtest/che_drv.mak
+include make/module/driver/ut/drvtest/tia.mak
+
+#CFLAGS += -Werror