add cpe min

Change-Id: Idf6aacefa780b917f5dbd753710976cf94b6af48
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8f1db97
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+AP_PRJ ?= prj_cpe_min
+BOOT_PRJ ?= ufi_mini
+PACK_PRJ ?= prj_cpe
+RF_TYPE ?= 230A
+DCXO ?= yes
+PRJ_PATH ?= lynq/CPE
+
+.PHONY:all
+all:copy boot ap pack
+	@echo OK
+.PHONY:pack
+pack:
+	make -C allbins/zx297520v3/$(PACK_PRJ)/scripts_linux/
+.PHONY:boot
+boot:
+	make -C boot/prj/zx297520v3/$(BOOT_PRJ)/build/ allclean all
+.PHONY:ap
+ap:
+	make -C ap/project/zx297520v3/$(AP_PRJ)/build/ allclean all RF_TYPE=$(RF_TYPE) DCXO=$(DCXO)
+.PHONY:ap_normal2
+ap_normal2:
+	make -C ap/project/zx297520v3/$(AP_PRJ)/build/ normal2 RF_TYPE=$(RF_TYPE) DCXO=$(DCXO)
+.PHONY:copy
+copy:
+	cp -rf $(PRJ_PATH)/* .
+.PHONY:help
+help:
+	@echo example : make or make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini.
+	@echo The default value of AP_PRJ is prj_cpe_min. The following values are optional :
+	@ls ap/project/zx297520v3/*/ -d | xargs -I {} basename "{}" | tr '\n' '   '
+	@echo
+	@echo
+	@echo The default value of BOOT_PRJ is ufi_mini. The following values are optional :
+	@ls boot/prj/zx297520v3/*/ -d | xargs -I {} basename "{}" | tr '\n' '   '
+	@echo
+	
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage.ini
new file mode 100644
index 0000000..9bdaa41
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage.ini
@@ -0,0 +1,28 @@
+[GeneralSetting]

+;0:NorFlash; 1:NandFlash; 2:emmc; 3:sata

+storage_type=1

+is_nv_coalition=1

+TLoaderAddr=0x80000

+

+[Output]

+FilePath=7520V3SC_CPE.bin

+

+[TLoader]

+FilePath=../allbins/tloader.bin

+

+[TBoot]

+FilePath=../allbins/tboot.bin

+

+[Partition]

+FilePath=../allbins/partition.bin

+

+[ProductInfo]

+FilePath=../allbins/product.ini

+

+[Image]

+../allbins/ap_imagefs.img

+../allbins/ap_userdata.img

+../allbins/ap_rootfs.img

+../allbins/uboot.bin

+../allbins/uboot-mirr.bin

+../allbins/zloader.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_min.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_min.ini
new file mode 100644
index 0000000..a9ecda5
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_min.ini
@@ -0,0 +1,28 @@
+[GeneralSetting]

+;0:NorFlash; 1:NandFlash; 2:emmc; 3:sata

+storage_type=1

+is_nv_coalition=1

+TLoaderAddr=0x80000

+

+[Output]

+FilePath=7520V3SC_CPE_MIN.bin

+

+[TLoader]

+FilePath=../allbins_min/tloader.bin

+

+[TBoot]

+FilePath=../allbins_min/tboot.bin

+

+[Partition]

+FilePath=../allbins_min/partition.bin

+

+[ProductInfo]

+FilePath=../allbins_min/product.ini

+

+[Image]

+../allbins_min/ap_imagefs.img

+../allbins_min/ap_userdata.img

+../allbins_min/ap_rootfs.img

+../allbins_min/uboot.bin

+../allbins_min/uboot-mirr.bin

+../allbins_min/zloader.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_switch.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_switch.ini
new file mode 100644
index 0000000..f23de16
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/AllInOneImage_switch.ini
@@ -0,0 +1,28 @@
+[GeneralSetting]

+;0:NorFlash; 1:NandFlash; 2:emmc; 3:sata

+storage_type=1

+is_nv_coalition=1

+TLoaderAddr=0x80000

+

+[Output]

+FilePath=7520V3SC_CPE_SWITCH.bin

+

+[TLoader]

+FilePath=../allbins_switch/tloader.bin

+

+[TBoot]

+FilePath=../allbins_switch/tboot.bin

+

+[Partition]

+FilePath=../allbins_switch/partition.bin

+

+[ProductInfo]

+FilePath=../allbins_switch/product.ini

+

+[Image]

+../allbins_switch/ap_imagefs.img

+../allbins_switch/ap_userdata.img

+../allbins_switch/ap_rootfs.img

+../allbins_switch/uboot.bin

+../allbins_switch/uboot-mirr.bin

+../allbins_switch/zloader.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage.ini
new file mode 100644
index 0000000..10e9b70
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage.ini
@@ -0,0 +1,19 @@
+

+;NV合并

+[FS]

+Count=1

+fs0=../allbins/ap_imagefs.img

+fs1=../allbins/ap_nvrofs.img

+

+

+[fs0]

+../allbins/ap_cpuap.bin

+../allbins/ap_recovery.bin

+../allbins/evb_cpuphy.bin

+../allbins/evb_cpurpm.img

+../allbins/nvrwall.bin

+../allbins/nvrwoall.bin

+

+[fs1]

+../allbins/nvroall.bin

+../allbins/nvrowall.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_min.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_min.ini
new file mode 100644
index 0000000..b592626
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_min.ini
@@ -0,0 +1,19 @@
+

+;NV合并

+[FS]

+Count=1

+fs0=../allbins_min/ap_imagefs.img

+fs1=../allbins_min/ap_nvrofs.img

+

+

+[fs0]

+../allbins_min/ap_cpuap.bin

+;../allbins_min/ap_recovery.bin

+../allbins_min/evb_cpuphy.bin

+../allbins_min/evb_cpurpm.img

+../allbins_min/nvrwall.bin

+../allbins_min/nvrwoall.bin

+

+[fs1]

+../allbins_min/nvroall.bin

+../allbins_min/nvrowall.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_switch.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_switch.ini
new file mode 100644
index 0000000..cde600c
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/FsImage_switch.ini
@@ -0,0 +1,19 @@
+

+;NV合并

+[FS]

+Count=1

+fs0=../allbins_switch/ap_imagefs.img

+fs1=../allbins_switch/ap_nvrofs.img

+

+

+[fs0]

+../allbins_switch/ap_cpuap.bin

+../allbins_switch/ap_recovery.bin

+../allbins_switch/evb_cpuphy.bin

+../allbins_switch/evb_cpurpm.img

+../allbins_switch/nvrwall.bin

+../allbins_switch/nvrwoall.bin

+

+[fs1]

+../allbins_switch/nvroall.bin

+../allbins_switch/nvrowall.bin

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/Image b/allbins/zx297520v3/prj_cpe/scripts_linux/Image
new file mode 100755
index 0000000..f631954
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/Image
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/Makefile b/allbins/zx297520v3/prj_cpe/scripts_linux/Makefile
new file mode 100644
index 0000000..797a286
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/Makefile
@@ -0,0 +1,4 @@
+.PHONY:pack
+pack:
+	./copybin_cpe_min.sh
+	./merge.sh
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage.ini
new file mode 100644
index 0000000..d9c9b0b
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage.ini
@@ -0,0 +1,21 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwPath=../allbins/nvrwall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRW]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins/ati_nvrw_0x00000800.bin

+../allbins/at_nvrw_0x00001000.bin

+../allbins/drv_nvrw_0x00012000.bin

+../allbins/phycfg_nvrw_0x00001400.bin

+../allbins/psPriData_nvrw_0x00002000.bin

+../allbins/psPubData_nvrw_0x00001C00.bin

+../allbins/Ref_nvrw_0x26C00.bin

+../allbins/tsp_nvrw_0x00000000.bin

+../allbins/voice_nvrw_0x00016000.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_min.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_min.ini
new file mode 100644
index 0000000..be1e1ab
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_min.ini
@@ -0,0 +1,21 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwPath=../allbins_min/nvrwall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRW]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins_min/ati_nvrw_0x00000800.bin

+../allbins_min/at_nvrw_0x00001000.bin

+../allbins_min/drv_nvrw_0x00012000.bin

+../allbins_min/phycfg_nvrw_0x00001400.bin

+../allbins_min/psPriData_nvrw_0x00002000.bin

+../allbins_min/psPubData_nvrw_0x00001C00.bin

+../allbins_min/Ref_nvrw_0x26C00.bin

+../allbins_min/tsp_nvrw_0x00000000.bin

+../allbins_min/voice_nvrw_0x00016000.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_switch.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_switch.ini
new file mode 100644
index 0000000..18cd9a3
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWInOneImage_switch.ini
@@ -0,0 +1,21 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwPath=../allbins_switch/nvrwall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRW]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins_switch/ati_nvrw_0x00000800.bin

+../allbins_switch/at_nvrw_0x00001000.bin

+../allbins_switch/drv_nvrw_0x00012000.bin

+../allbins_switch/phycfg_nvrw_0x00001400.bin

+../allbins_switch/psPriData_nvrw_0x00002000.bin

+../allbins_switch/psPubData_nvrw_0x00001C00.bin

+../allbins_switch/Ref_nvrw_0x26C00.bin

+../allbins_switch/tsp_nvrw_0x00000000.bin

+../allbins_switch/voice_nvrw_0x00016000.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage.ini
new file mode 100644
index 0000000..3b0e730
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage.ini
@@ -0,0 +1,23 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwoPath=../allbins/nvrwoall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRWO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins/phycom_nvrwo_0x0002BC00.bin

+../allbins/phyGgeAmtUser_nvrwo_0x00003400.bin

+../allbins/phyGgeCom_nvrwo_0x0000EC00.bin

+../allbins/phyLteaAmtUser_nvrwo_0x00007800.bin

+../allbins/phyLteaCom_nvrwo_0x00012C00.bin

+../allbins/phyLtetxtable_nvrwo_0x0001BC00.bin

+../allbins/phyTdsAmtUser_nvrwo_0x00002800.bin

+../allbins/phyTdsCom_nvrwo_0x0000E400.bin

+../allbins/phyWcdmaAmtUser_nvrwo_0x00005000.bin

+../allbins/phyWcdmaCom_nvrwo_0x00012400.bin

+../allbins/zxRfM0_nvrwo_0x00016C00.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_min.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_min.ini
new file mode 100644
index 0000000..ebe1a9c
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_min.ini
@@ -0,0 +1,23 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwoPath=../allbins_min/nvrwoall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRWO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins_min/phycom_nvrwo_0x0002BC00.bin

+../allbins_min/phyGgeAmtUser_nvrwo_0x00003400.bin

+../allbins_min/phyGgeCom_nvrwo_0x0000EC00.bin

+../allbins_min/phyLteaAmtUser_nvrwo_0x00007800.bin

+../allbins_min/phyLteaCom_nvrwo_0x00012C00.bin

+../allbins_min/phyLtetxtable_nvrwo_0x0001BC00.bin

+../allbins_min/phyTdsAmtUser_nvrwo_0x00002800.bin

+../allbins_min/phyTdsCom_nvrwo_0x0000E400.bin

+../allbins_min/phyWcdmaAmtUser_nvrwo_0x00005000.bin

+../allbins_min/phyWcdmaCom_nvrwo_0x00012400.bin

+../allbins_min/zxRfM0_nvrwo_0x00016C00.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_switch.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_switch.ini
new file mode 100644
index 0000000..b31f19a
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/NVRWOInOneImage_switch.ini
@@ -0,0 +1,23 @@
+

+;NV合并

+[NVIMAGE]

+;NvroPath=modem_nvro.bin

+NvrwoPath=../allbins_switch/nvrwoall.bin

+

+[NVRO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\amtComm_nvro_0x00000000.bin

+

+[NVRWO]

+;举例..\..\..\zx297520\nv\CA_3M_BX\at_nvrw_0x00022000.bin

+../allbins_switch/phycom_nvrwo_0x0002BC00.bin

+../allbins_switch/phyGgeAmtUser_nvrwo_0x00003400.bin

+../allbins_switch/phyGgeCom_nvrwo_0x0000EC00.bin

+../allbins_switch/phyLteaAmtUser_nvrwo_0x00007800.bin

+../allbins_switch/phyLteaCom_nvrwo_0x00012C00.bin

+../allbins_switch/phyLtetxtable_nvrwo_0x0001BC00.bin

+../allbins_switch/phyTdsAmtUser_nvrwo_0x00002800.bin

+../allbins_switch/phyTdsCom_nvrwo_0x0000E400.bin

+../allbins_switch/phyWcdmaAmtUser_nvrwo_0x00005000.bin

+../allbins_switch/phyWcdmaCom_nvrwo_0x00012400.bin

+../allbins_switch/zxRfM0_nvrwo_0x00016C00.bin

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/7za.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/7za.exe
new file mode 100755
index 0000000..7f6bf86
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/7za.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/ap_imagefs.img b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/ap_imagefs.img
new file mode 100755
index 0000000..2c899dd
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/ap_imagefs.img
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tar b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tar
new file mode 100644
index 0000000..c7104fc
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tar
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tgz b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tgz
new file mode 100644
index 0000000..467c2aa
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs.tgz
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_00.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_00.lzma
new file mode 100644
index 0000000..45e017a
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_00.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_01.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_01.lzma
new file mode 100644
index 0000000..0bfac1d
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_01.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_02.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_02.lzma
new file mode 100644
index 0000000..c36d956
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_02.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_03.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_03.lzma
new file mode 100644
index 0000000..238b272
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_03.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_04.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_04.lzma
new file mode 100644
index 0000000..f6621dd
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_04.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_05.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_05.lzma
new file mode 100644
index 0000000..5ba28cb
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_05.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_06.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_06.lzma
new file mode 100644
index 0000000..2a4b8c0
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_06.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_07.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_07.lzma
new file mode 100644
index 0000000..29f418e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_07.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_08.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_08.lzma
new file mode 100644
index 0000000..ebe8080
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_08.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_09.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_09.lzma
new file mode 100644
index 0000000..5fb6625
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_09.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_10.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_10.lzma
new file mode 100644
index 0000000..b505914
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_10.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_11.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_11.lzma
new file mode 100644
index 0000000..9d6d3e6
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_11.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_12.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_12.lzma
new file mode 100644
index 0000000..4d302e7
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_12.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_13.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_13.lzma
new file mode 100644
index 0000000..2634715
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_13.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_14.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_14.lzma
new file mode 100644
index 0000000..3b1d0dd
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_14.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_15.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_15.lzma
new file mode 100644
index 0000000..0e09373
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_15.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_16.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_16.lzma
new file mode 100644
index 0000000..8085cae
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_16.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_17.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_17.lzma
new file mode 100644
index 0000000..18f937e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_17.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_18.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_18.lzma
new file mode 100644
index 0000000..247a5d4
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuap_18.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_00.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_00.lzma
new file mode 100644
index 0000000..8abac39
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_00.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_01.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_01.lzma
new file mode 100644
index 0000000..dae7244
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_01.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_02.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_02.lzma
new file mode 100644
index 0000000..ca3f38b
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_02.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_03.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_03.lzma
new file mode 100644
index 0000000..7cd6728
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_03.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_04.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_04.lzma
new file mode 100644
index 0000000..6842739
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_04.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_05.lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_05.lzma
new file mode 100644
index 0000000..40b4430
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/cpuphy_05.lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/evb_cpurpm.img b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/evb_cpurpm.img
new file mode 100644
index 0000000..91a387a
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/evb_cpurpm.img
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/fotaflag b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/fotaflag
new file mode 100644
index 0000000..044478e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/fotaflag
@@ -0,0 +1 @@
+ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.bin b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.bin
new file mode 100644
index 0000000..8b86a81
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.bin
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.hash b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.hash
new file mode 100644
index 0000000..36d4df2
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwall.hash
@@ -0,0 +1 @@
+aec41c619264fc043fc656a393194dea
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwoall.bin b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwoall.bin
new file mode 100644
index 0000000..b4d18c6
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs/nvrwoall.bin
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/_hashlib.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/_hashlib.pyd
new file mode 100755
index 0000000..7d25690
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/_hashlib.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/base_class.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/base_class.exe
new file mode 100755
index 0000000..56c0228
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/base_class.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/bz2.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/bz2.pyd
new file mode 100755
index 0000000..4a5e564
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/bz2.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/library.zip b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/library.zip
new file mode 100755
index 0000000..d96144c
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/library.zip
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/python27.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/python27.dll
new file mode 100755
index 0000000..cdd5d35
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/python27.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/select.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/select.pyd
new file mode 100755
index 0000000..dc50785
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/select.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/unicodedata.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/unicodedata.pyd
new file mode 100755
index 0000000..9bd28c9
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/unicodedata.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/w9xpopen.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/w9xpopen.exe
new file mode 100755
index 0000000..ad17977
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/base_class/w9xpopen.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cyggcc_s-1.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cyggcc_s-1.dll
new file mode 100755
index 0000000..21934d1
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cyggcc_s-1.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygiconv-2.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygiconv-2.dll
new file mode 100755
index 0000000..e4d7b95
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygiconv-2.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygintl-8.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygintl-8.dll
new file mode 100755
index 0000000..532a46a
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygintl-8.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygwin1.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygwin1.dll
new file mode 100755
index 0000000..317c51e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/cygwin1.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/dd.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/dd.exe
new file mode 100755
index 0000000..ff2e79d
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/dd.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/ls.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/ls.exe
new file mode 100755
index 0000000..f471213
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/ls.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma
new file mode 100755
index 0000000..918c8b1
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma.exe
new file mode 100755
index 0000000..75275ad
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/minilzma.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma
new file mode 100755
index 0000000..edcb0c9
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma.exe
new file mode 100755
index 0000000..2b2493e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/miniunlzma.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2 b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2
new file mode 100755
index 0000000..9832e45
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2.exe
new file mode 100755
index 0000000..51fd1eb
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2_lzma b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2_lzma
new file mode 100755
index 0000000..915cbac
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/mkfs.jffs2_lzma
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/pack_image.py b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/pack_image.py
new file mode 100755
index 0000000..904fcb0
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/pack_image.py
@@ -0,0 +1,398 @@
+# -*- coding: utf-8 -*-   

+import subprocess

+import argparse

+from subprocess import *

+import threading

+import time

+import ConfigParser

+import os,sys

+import commands

+import string 

+import shutil

+import hashlib

+from collections import OrderedDict

+

+sys.path.append("../../../")

+Imagefs_name            = ""

+compress_alg            = ""

+partition_name          = ""

+COMPRESS_ALG_LZMA       = "lzma"

+FS_CMD_SPLIT_IMAGE 	    = "split"

+FS_CMD_MERGE_BINS_FOR_UPLOAD = "merge"

+FS_CMD_PACK_IMAGE_MKJFFS2 = "mkjffs2"

+NVRWALL_FILE_NAME       = "nvrwall.bin"

+NVRWALL_HASH_FILE       = "nvrwall.hash" 

+FOTA_FLAG_RENEW_IMGNAME = "ap_imagefs.img"

+CMD_PARTITION_SEPARATOR = ","

+SPLIT_EXE_PATH      = "split"

+MINILZMA_EXE_PATH   = "./minilzma"

+MINIUNLZMA_EXE_PATH = "./miniunlzma"

+MKFS_JFFS2_PATH      = "./mkfs.jffs2_lzma"

+

+class si_subprocess (threading.Thread):

+	def __init__(self, threadID, name, procmd):

+		try:

+			threading.Thread.__init__(self)

+			self.threadID = threadID

+			self.name = name

+			self.p = subprocess.Popen(procmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell = False)

+			results = self.p.communicate()

+			if results:

+				print results

+			self.outlist = []

+			self.lock = threading.Lock()

+

+		except Exception as e:

+			print "Error %s" %e

+

+	def run(self):

+		try:

+			curline = self.p.stdout.readline()

+			while(curline):

+				self.lock.acquire()

+				self.outlist.append(curline)

+				self.lock.release()

+				curline = self.p.stdout.readline()

+		except Exception as e: 

+			print "si_subprocess get excption" 

+			raise e 

+		finally:

+			print "Exiting " + self.name

+

+	def terminate(self):

+		self.p.kill()

+

+#***********************************************************************

+#Interface: gererate md5

+#Interface: read config file

+#Interface: check param is valid

+#***********************************************************************

+class special_handle_method(object):

+	def __init__(self):

+		pass

+

+	def file_md5_hexdigest(self, filename):

+		fmd5 = hashlib.md5()

+		f = open(filename, 'rb')

+		fmd5.update(f.read())

+		f.close()

+		return fmd5.hexdigest()

+

+	def read_configfile(self, configfile_path, field):

+		review = ConfigParser.ConfigParser()  

+		review.read(configfile_path)  

+		global partition_name

+		if review.has_option(partition_name, field) == False:

+			raise Exception('field of partition is not exist !',partition_name, field)

+		field_value = review.get(partition_name, field)

+		return field_value

+

+	def prepare_check_params(self, cmd_type, srcbins_path, product_ini_file, out_path):

+		if not os.path.isfile(product_ini_file):

+			raise Exception('check: Wrong input param,please check product_ini_file!',\

+				os.path.isfile(product_ini_file))

+

+		if cmd_type == FS_CMD_PACK_IMAGE_MKJFFS2:

+			image_path = os.path.dirname(out_path)

+			if srcbins_path == image_path:

+				raise Exception('when you mkjffs2, srcbins_path and out_path should be deferent!',image_path)

+			if (not os.path.isdir(srcbins_path)) or (not os.path.isdir(image_path)):

+				raise Exception('Wrong input param, please check srcbins_path out_path!',\

+					os.path.isdir(srcbins_path), os.path.isdir(image_path))

+

+		elif cmd_type == FS_CMD_SPLIT_IMAGE:

+			if (not os.path.isfile(srcbins_path)) or (not os.path.isdir(out_path)):

+				raise Exception('Wrong input param, please check srcbins_path out_path!',\

+					os.path.isfile(srcbins_path), os.path.isdir(out_path))

+

+		elif cmd_type == FS_CMD_MERGE_BINS_FOR_UPLOAD:

+			if (not os.path.isdir(srcbins_path)) or (not os.path.isfile(product_ini_file)):

+				raise Exception('Wrong input param, please check srcbins_path!',\

+					os.path.isdir(srcbins_path))

+

+#***********************************************************************

+#Interface: pack imagefs using mkjffs2

+#Interface: split bins

+#Interface: uncompress bins

+#Interface: merge bins for upload

+#Interface: compress bins

+#***********************************************************************

+class  imagefs_operation(object):

+	def __init__(self):

+		pass

+

+	def opcmd_get_suffix(self): 

+		if Imagefs_name.find("_") == -1:

+			suffix = Imagefs_name

+		else:

+			str_img   = os.path.splitext(Imagefs_name)[0]

+			suffix = str_img.split("_")[-1]

+		return suffix

+

+	def opcmd_packimgfs_mkjffs2(self, srcbins_dir, configfile_path, out_dir): 

+		handle = special_handle_method()

+		review = ConfigParser.ConfigParser()  

+		review.read(configfile_path)  

+		action_Image_cmd = handle.read_configfile(configfile_path, "mkfs_jffs2")

+		makejffs2_allinone_cmd = MKFS_JFFS2_PATH + " " + action_Image_cmd + " -d " + srcbins_dir + " -o " + out_dir

+		print "cmd is %s" %makejffs2_allinone_cmd

+		print "path %s" %os.getcwd()

+		os.system(makejffs2_allinone_cmd)

+		#si_subprocess(1, "file system pack thread", makejffs2_allinone_cmd)

+		print "Generating %s ok!"%out_dir

+

+	def opcmd_split_binfs(self, srcbins_dir, configfile_path, out_dir): 

+		mycase = special_handle_method()

+		suffix = self.opcmd_get_suffix()

+		split_block_size = mycase.read_configfile(configfile_path, "split_block_size")

+		block_figure = mycase.read_configfile(configfile_path, "split_figure")

+		block_name = suffix + "_"

+		small_bin_file = os.path.join(out_dir, block_name)

+		split_Image_cmd = SPLIT_EXE_PATH + " -b " + split_block_size + " " + srcbins_dir + " -d -a " + block_figure + " " + small_bin_file

+		os.system(split_Image_cmd)

+		os.remove(srcbins_dir)

+

+	def opcmd_uncompress_bins(self, srcbins_dir): 

+		suffix = self.opcmd_get_suffix()

+		if compress_alg == COMPRESS_ALG_LZMA:

+			#Miniunlzma -k -o  E:\imagefs_tool_new\fs\cpuap_00  E:\imagefs_tool_new\fs\cpuap_00.lzma

+			lzmafiles = os.listdir(srcbins_dir)

+			if len(lzmafiles)==0:

+				raise Exception('uncompress binfiles error: srcdir is Null!')

+			for each in lzmafiles:

+				if (each.find("_") == -1) or (each.split("_")[0] != suffix) or (each.find(".lzma") == -1):

+					continue

+				bin_file		= each.split(".lzma")[0]

+				bin_file		= os.path.join(srcbins_dir, bin_file)

+				lzmabin_file	= os.path.join(srcbins_dir, each)

+				unlzma_cmd		= MINIUNLZMA_EXE_PATH + " -o " + bin_file + " " + lzmabin_file

+				os.system(unlzma_cmd)

+				#os.remove(lzmabin_file)

+

+	def opcmd_merge_bins_for_upload(self, srcbins_dir, out_dir): 

+		suffix = self.opcmd_get_suffix()

+		if compress_alg == COMPRESS_ALG_LZMA:

+			path_list = os.listdir(srcbins_dir)

+			path_name = []

+			keyword = suffix + "_"

+			for i in path_list:

+				if (i.find(keyword) !=-1):

+					path_name.append(i.split("\n")[0])

+

+			if len(path_name)==0:

+				raise Exception('merge bins error: no src small bin file')

+			# sort

+			path_name.sort()

+

+			if  os.path.exists(out_dir):

+				os.remove(out_dir)

+			for file_name in path_name:

+				# "a" zhuijia

+				fullname = os.path.join(srcbins_dir, file_name)

+				with open(fullname, "rb") as file_object:

+					file_info = file_object.read()

+					with open(out_dir, "ab") as f:

+						f.write(file_info)

+						print "fullname %s"%fullname

+					f.close()

+					file_object.close()

+					os.remove(fullname)

+

+	def opcmd_compress_bins(self, out_dir):

+		suffix = self.opcmd_get_suffix()

+		if compress_alg == COMPRESS_ALG_LZMA:

+			#ls cpuap_* | ..\bin\xargs -I {} ..\bin\minilzma -t  512 {}

+			members = os.listdir(out_dir)

+			key_word = suffix + "_"

+			for member in members:

+				smallbin_file = os.path.join(out_dir, member)

+				if ((member.find(key_word) != -1) and (member.find(".lzma") != -1)):

+					os.remove(smallbin_file)

+

+			members = os.listdir(out_dir)

+			for member in members:

+				if (member.find("_") == -1) or (member.split("_")[0] != suffix):

+					continue

+				member = member.split("\n")[0]

+				smallbin_file = os.path.join(out_dir, member)

+				lzma_cmd = MINILZMA_EXE_PATH + " -t " + lzma_dict + " " + smallbin_file

+				os.system(lzma_cmd)

+				#si_subprocess(4, "file lzma compress thread", lzma_cmd)

+

+#***********************************************************************

+#for 16M download

+#first:  split big bin to small bins according to product.ini

+#second: using lzma alg to compress small bins

+#***********************************************************************

+def split_image_start(srcbins_dir, config_file_dir, out_dir):

+	try:

+		Instance = imagefs_operation()

+		if split_enable=="yes":

+			#Instance.check_bins_valid(srcbins_dir)

+			Instance.opcmd_split_binfs(srcbins_dir, config_file_dir, out_dir)

+			Instance.opcmd_compress_bins(out_dir)

+			print "Split and compress bins complete!"

+		else:

+			raise Exception('largefile_split_enable is no, please check!')

+

+	except Exception as e:

+		print "Error %s" %e

+

+#***********************************************************************

+#for 16M upload

+#first:  uncompress small lzma bins

+#second: write all small bins to a big bin

+#***********************************************************************

+def merge_image_for_upload_start(srcbins_dir, combin_dir):

+	try:

+		#Instance.check_bins_valid(srcbins_dir)

+		if split_enable=="yes":

+			Instance = imagefs_operation()

+			print "----------uncompress begin---------------"

+			Instance.opcmd_uncompress_bins(srcbins_dir)

+			print "----------merge begin--------------------"

+			Instance.opcmd_merge_bins_for_upload(srcbins_dir, combin_dir)

+			print "Uncompress and merge bins complete!"

+		else:

+			pass

+	except Exception as e:

+		print "Error %s" %e

+

+#***********************************************************************

+#function:for mkjffs2 pack imagefs

+#first:    check bins valid:

+#second:   generate fotaflag and nvrwall.hash file

+#***********************************************************************

+def package_check_bins_valid(newbins_path, product_path):

+		bins_list = os.listdir(newbins_path)

+		nvrwall_file = os.path.join(newbins_path, NVRWALL_FILE_NAME)

+		if os.path.exists(product_path):

+			if os.path.exists(nvrwall_file):

+				md5_object = special_handle_method()

+				hash = md5_object.file_md5_hexdigest(nvrwall_file)

+				nvrwall_hash   = os.path.join(newbins_path, NVRWALL_HASH_FILE)

+				if os.path.exists(nvrwall_hash) == True:

+					os.remove(nvrwall_hash)

+				with open(nvrwall_hash, "w+") as fp:

+					fp.write(hash)

+

+			if Imagefs_name == FOTA_FLAG_RENEW_IMGNAME:

+				fotaflag_path  = os.path.join(newbins_path, "fotaflag")

+				if not os.path.exists(fotaflag_path):

+					with open(fotaflag_path, "wb+") as fotafp:

+						fotafp.write(b'\xFF' * 1024)

+						fotafp.close()

+			return "True"

+		else:

+			raise Exception('product config file not exist, please check!') 

+

+#***********************************************************************

+#function:mkjffs2 code

+#first:    check bins valid:fotaflag and hash

+#second:   package all bins to imagfs using mkjffs2 exe 

+#***********************************************************************

+def package_image_start(newbins_dir, product_dir, allinone_dir):

+	try:

+		if not os.path.exists(newbins_dir):

+			raise Exception('imgfs_dir not exist, please check!') 

+		if not os.path.exists(product_dir):

+			raise Exception('product_dir not exist, please check!') 

+		if not os.path.exists(os.path.dirname(allinone_dir)):

+			raise Exception('allinone_dir not exist, please check!')

+		package_check_bins_valid(newbins_dir, product_dir)

+		#mkjffs2

+		Instance = imagefs_operation()

+		Instance.opcmd_packimgfs_mkjffs2(newbins_dir, product_dir, allinone_dir)

+	except Exception as e:

+		print "Error %s" %e

+		#jp.end()

+

+#***********************************************************************

+#function:main fun

+#first:    check params and read product.ini config file

+#second:   support three kinds of command: mkjffs2\split\merge

+#***********************************************************************

+def main():

+	parser = argparse.ArgumentParser()

+

+	parser.add_argument('-d', '--srcdir', type=str, help="srcdir")

+	parser.add_argument('-c', '--cmd', type=str, help="cmd type")

+	parser.add_argument('-p', '--configfile', type=str, help="product.ini config file path")

+	parser.add_argument('-o', '--outdir', type=str, help='destination directory')

+	parser.add_argument('-r', '--keyword', type=str, help='read keyword from product.ini ')

+

+	args = parser.parse_args()

+	object = special_handle_method()

+	global partition_name

+

+	if (args.keyword != None and args.configfile != None):

+		key_word = unicode(args.keyword,'utf-8')

+		if (key_word.find(CMD_PARTITION_SEPARATOR) == -1):

+			print('Exception: key_word param error: usage [-h] [-d SRCDIR] [-c KEYWORD,PARTITION] [-p CONFIGFILE] [-o OUTDIR]')

+			return

+		key_name		 = key_word.split(CMD_PARTITION_SEPARATOR)[0]

+		partition_name	 = key_word.split(CMD_PARTITION_SEPARATOR)[1]

+		product_ini_file = unicode(args.configfile,'utf-8')

+		print object.read_configfile(product_ini_file, key_name)

+		return object.read_configfile(product_ini_file, key_name)

+

+	if (args.srcdir == None or args.cmd == None or args.configfile == None or args.outdir == None):

+		print(''' Exception: cmd:mkjffs2 usage:[-h] [-d SRCDIR] [-c CMD] [-p CONFIGFILE] [-o OUTDIR] \n

+		cmd:split or merge usage:[-h] [-d SRCDIR] [-c CMD,PARTITION] [-p CONFIGFILE] [-o OUTDIR]\n

+		keyword read from Product.ini usage:[-h] [-p CONFIGFILE] [-r KEYWORD,PARTITION]''')

+		return

+

+	srcbins_path	= unicode(args.srcdir, 'utf-8')

+	cmd				= unicode(args.cmd, 'utf-8')

+	out_path		= unicode(args.outdir,'utf-8')

+	product_ini_file = unicode(args.configfile,'utf-8')

+

+	print "srcbins_path %s ^^^^^^^^" %srcbins_path

+	print "out_path %s ^^^^^^^^" %out_path

+	print "product config file %s ^^^^^^^^" %product_ini_file

+

+	global split_enable

+	global Imagefs_name

+

+	if cmd == FS_CMD_PACK_IMAGE_MKJFFS2:

+		Imagefs_name = os.path.basename(out_path)

+		if Imagefs_name.find("_") == -1:

+			partition_name = Imagefs_name

+		else:

+			str_img   = os.path.splitext(Imagefs_name)[0]

+			partition_name = str_img.split("_")[-1]

+		object.prepare_check_params(cmd, srcbins_path, product_ini_file, out_path)

+		package_image_start(srcbins_path, product_ini_file, out_path)

+		return

+	else: 	#split/merge bins

+		if (cmd.find(CMD_PARTITION_SEPARATOR) == -1):

+			print('Exception: cmd param error: usage [-h] [-d SRCDIR] [-c CMD,PARTITION] [-p CONFIGFILE] [-o OUTDIR]')

+			return

+		cmd_type       = cmd.split(CMD_PARTITION_SEPARATOR)[0]

+		partition_name = cmd.split(CMD_PARTITION_SEPARATOR)[1]

+		object.prepare_check_params(cmd_type, srcbins_path, product_ini_file, out_path)

+		split_enable = object.read_configfile(product_ini_file, "largefile_split_enable")

+		if split_enable  == "yes":

+			global lzma_dict

+			global compress_alg

+			lzma_dict = object.read_configfile(product_ini_file, "lzma_dict")

+			compress_alg = object.read_configfile(product_ini_file, "compress_algorithm")

+			if compress_alg != COMPRESS_ALG_LZMA:

+				print "Exception: Now %s is not supported, please choose lzma as compress_algorithm!"%compress_alg

+				return

+

+	if cmd_type == FS_CMD_SPLIT_IMAGE:

+		Imagefs_name = os.path.basename(srcbins_path)

+		split_image_start(srcbins_path, product_ini_file, out_path)

+

+	elif cmd_type == FS_CMD_MERGE_BINS_FOR_UPLOAD:

+		Imagefs_name = os.path.basename(out_path)

+		merge_image_for_upload_start(srcbins_path, out_path)

+

+	else:

+		raise Exception('cmd type error, support three kind of cmds: split merge or mkjffs2, please check!') 

+

+if __name__ == '__main__':

+	main()

+

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/split.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/split.exe
new file mode 100755
index 0000000..a8b15b4
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/split.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/xargs.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/xargs.exe
new file mode 100755
index 0000000..5305f5d
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/bin/xargs.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/_hashlib.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/_hashlib.pyd
new file mode 100755
index 0000000..7d25690
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/_hashlib.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/bz2.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/bz2.pyd
new file mode 100755
index 0000000..4a5e564
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/bz2.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/jffs2_extract.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/jffs2_extract.exe
new file mode 100755
index 0000000..9443dca
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/jffs2_extract.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/library.zip b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/library.zip
new file mode 100755
index 0000000..c052bee
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/library.zip
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/lzo.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/lzo.pyd
new file mode 100755
index 0000000..2dcd1fc
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/lzo.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/pylzma.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/pylzma.pyd
new file mode 100755
index 0000000..5206524
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/pylzma.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/python27.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/python27.dll
new file mode 100755
index 0000000..cdd5d35
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/python27.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/select.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/select.pyd
new file mode 100755
index 0000000..dc50785
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/select.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/unicodedata.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/unicodedata.pyd
new file mode 100755
index 0000000..9bd28c9
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/unicodedata.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/w9xpopen.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/w9xpopen.exe
new file mode 100755
index 0000000..ad17977
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/jffs2_extract/w9xpopen.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/_hashlib.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/_hashlib.pyd
new file mode 100755
index 0000000..7d25690
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/_hashlib.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/bz2.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/bz2.pyd
new file mode 100755
index 0000000..4a5e564
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/bz2.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/library.zip b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/library.zip
new file mode 100755
index 0000000..a6dab9d
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/library.zip
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/pack_image.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/pack_image.exe
new file mode 100755
index 0000000..32b2eff
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/pack_image.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/python27.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/python27.dll
new file mode 100755
index 0000000..cdd5d35
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/python27.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/select.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/select.pyd
new file mode 100755
index 0000000..dc50785
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/select.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/unicodedata.pyd b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/unicodedata.pyd
new file mode 100755
index 0000000..9bd28c9
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/unicodedata.pyd
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/w9xpopen.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/w9xpopen.exe
new file mode 100755
index 0000000..ad17977
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/imagefs_tool/pack_image/w9xpopen.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_cpuap.split.log b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_cpuap.split.log
new file mode 100644
index 0000000..4cf7c9d
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_cpuap.split.log
@@ -0,0 +1,4 @@
+srcbins_path ../../imagefs/ap_cpuap.bin ^^^^^^^^
+out_path ../../imagefs ^^^^^^^^
+product config file ../../product.ini ^^^^^^^^
+Split and compress bins complete!
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_recovery.split.log b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_recovery.split.log
new file mode 100644
index 0000000..41a6850
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.ap_recovery.split.log
@@ -0,0 +1,3 @@
+srcbins_path ../../imagefs/ap_recovery.bin ^^^^^^^^
+out_path ../../imagefs ^^^^^^^^
+product config file ../../product.ini ^^^^^^^^
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.bat b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.bat
new file mode 100755
index 0000000..1e602fe
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.bat
@@ -0,0 +1,39 @@
+@echo off

+

+cd /d %~dp0

+

+set dev=%1

+set indir=%2

+set outfile=%3

+set outfile1=%indir%

+set split_enable=no

+

+if exist %outfile1%.tar (

+  del %outfile1%.tar 

+)

+if exist %outfile1%.tgz (

+  del %outfile1%.tgz

+)

+

+copy %indir%\product.ini product.ini

+del %indir%\product.ini

+

+

+for /f "usebackq tokens=1,2* delims==" %%i in (`readini.bat product.ini [imagefs] largefile_split_enable`) do set split_enable=%%j

+

+cd imagefs_tool\pack_image\

+

+if /i %split_enable%==yes (

+  ./pack_image.py  -d  ..\..\%indir%\ap_cpuap.bin -c "split" -p ..\..\product.ini -o ..\..\%indir% > ..\..\mkjffs2.ap_cpuap.split.log

+  ./pack_image.py  -d  ..\..\%indir%\evb_cpuphy.bin -c "split" -p ..\..\product.ini -o ..\..\%indir% > ..\..\mkjffs2.evb_cpuphy.split.log

+  ./pack_image.py  -d  ..\..\%indir%\ap_recovery.bin -c "split" -p ..\..\product.ini -o ..\..\%indir% > ..\..\mkjffs2.ap_recovery.split.log

+)

+

+./pack_image.py  -d  ..\..\%indir% -c "mkjffs2" -p ..\..\product.ini -o ..\..\%outfile% > ..\..\mkjffs2.%outfile%.log

+

+cd ..

+cd ..

+7za a -ttar %outfile1%.tar %indir%

+7za a -tgzip %outfile1%.tgz %outfile1%.tar

+

+

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.evb_cpuphy.split.log b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.evb_cpuphy.split.log
new file mode 100644
index 0000000..d75749e
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.evb_cpuphy.split.log
@@ -0,0 +1,4 @@
+srcbins_path ../../imagefs/evb_cpuphy.bin ^^^^^^^^
+out_path ../../imagefs ^^^^^^^^
+product config file ../../product.ini ^^^^^^^^
+Split and compress bins complete!
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.sh b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.sh
new file mode 100755
index 0000000..4dd8826
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+dev=$1
+indir=$2
+outfile=$3
+outfile1=$indir
+split_enable="yes"
+echo $indir
+echo $outfile
+curPath=$(readlink -f "$(dirname "$0")")
+echo $curPath 
+mkfspath="/imagefs_tool/bin/"
+cd $curPath$mkfspath
+echo $curPath$mkfspath
+ap_cpuappath="/ap_cpuap.bin"
+evb_cpuphy="/evb_cpuphy.bin"
+ap_recovery="/ap_recovery.bin"
+split_enable=$(python ./pack_image.py -p ../../product.ini -r "largefile_split_enable,imagefs")
+if [ "$split_enable" = "yes" ];then
+python ./pack_image.py  -d  ../../$indir$ap_cpuappath -c "split,imagefs" -p ../../product.ini -o ../../$indir > ../../mkjffs2.ap_cpuap.split.log
+python ./pack_image.py  -d  ../../$indir$evb_cpuphy -c "split,imagefs" -p ../../product.ini -o ../../$indir > ../../mkjffs2.evb_cpuphy.split.log
+python ./pack_image.py  -d  ../../$indir$ap_recovery -c "split,imagefs" -p ../../product.ini -o ../../$indir > ../../mkjffs2.ap_recovery.split.log
+fi
+python ./pack_image.py  -d ../../$indir -c "mkjffs2" -p ../../product.ini -o ../../$outfile
+cd ..
+cd ..
+fileType1=".tar"
+7za a -ttar $outfile1$fileType1 $indir
+fileType=".tgz"
+7za a -tgzip $outfile1$fileType  $outfile1$fileType1
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/cygwin1.dll b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/cygwin1.dll
new file mode 100755
index 0000000..3db37e7
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/cygwin1.dll
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/mkfs.jffs2.exe b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/mkfs.jffs2.exe
new file mode 100755
index 0000000..51fd1eb
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/mkjffs2/mkfs.jffs2.exe
Binary files differ
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/product.ini b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/product.ini
new file mode 100644
index 0000000..9497260
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/product.ini
@@ -0,0 +1,13 @@
+[imagefs]

+largefile_split_enable=yes

+lzma_dict=512

+split_figure=2

+compress_algorithm=lzma

+split_block_size=262144

+mkfs_jffs2=-v -X lzma --pagesize=0x800 --eraseblock=0x8000 --little-endian --no-cleanmarkers --squash 

+

+[nvrofs]

+mkfs_jffs2=-v -X lzma --pagesize=0x800 --eraseblock=0x8000 --little-endian --no-cleanmarkers --squash

+

+[resource]

+mkfs_jffs2=-v -X lzma --pagesize=0x800 --eraseblock=0x8000 --little-endian --no-cleanmarkers --squash
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.bat b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.bat
new file mode 100755
index 0000000..7e793e5
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.bat
@@ -0,0 +1,47 @@
+@echo off

+ 

+set item=

+set filepath=

+set section=

+setlocal EnableDelayedExpansion

+if not "%~1"=="" (

+        set filepath=%1

+) else goto :file_err

+if not exist %filepath% goto :file_err

+if not "%~2"=="" (

+        set section=%2

+        if "!section:~0,1!"==""^" set section=!section:~1!

+        if "!section:~-1!"==""^" set section=!section:~0,-1!

+) else goto :section

+if not "%~3"=="" (

+        set item=%3

+        if "!item:~0,1!"==""^" set item=!item:~1!

+        if "!item:~-1!"==""^" set item=!item:~0,-1!

+)

+setlocal disableDelayedExpansion

+set ×ֶοªÊ¼=

+for /f "usebackq delims=[]" %%i in (`find /i "%section%" /n %filepath%`) do set ×ֶοªÊ¼=%%i

+for /f "usebackq tokens=1* delims== skip=%×ֶοªÊ¼%" %%i in (`type %filepath%`) do (

+        set a=%%i

+        setlocal EnableDelayedExpansion

+        if "!a:~0,1!"=="[" goto :eof

+        if not "!a:~0,1!"==";" (

+                setlocal disableDelayedExpansion

+                for /f "delims=;" %%x in ("%%i=%%j") do (

+                        if not DEFINED item (echo %%x) else (if /i "%%i"=="%item%" echo %%x)

+                )

+        )

+)

+goto :eof

+ 

+:section

+setlocal disableDelayedExpansion

+for /f "usebackq delims== skip=2" %%i in (`find /i "[" %filepath%`) do echo %%i

+goto :eof

+ 

+:file_err

+setlocal disableDelayedExpansion

+echo.

+echo %1ÎļþδÕÒµ½»òδÊäÈë!

+echo.

+goto :eof
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.sh b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.sh
new file mode 100755
index 0000000..7e793e5
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/bin/readini.sh
@@ -0,0 +1,47 @@
+@echo off

+ 

+set item=

+set filepath=

+set section=

+setlocal EnableDelayedExpansion

+if not "%~1"=="" (

+        set filepath=%1

+) else goto :file_err

+if not exist %filepath% goto :file_err

+if not "%~2"=="" (

+        set section=%2

+        if "!section:~0,1!"==""^" set section=!section:~1!

+        if "!section:~-1!"==""^" set section=!section:~0,-1!

+) else goto :section

+if not "%~3"=="" (

+        set item=%3

+        if "!item:~0,1!"==""^" set item=!item:~1!

+        if "!item:~-1!"==""^" set item=!item:~0,-1!

+)

+setlocal disableDelayedExpansion

+set ×ֶοªÊ¼=

+for /f "usebackq delims=[]" %%i in (`find /i "%section%" /n %filepath%`) do set ×ֶοªÊ¼=%%i

+for /f "usebackq tokens=1* delims== skip=%×ֶοªÊ¼%" %%i in (`type %filepath%`) do (

+        set a=%%i

+        setlocal EnableDelayedExpansion

+        if "!a:~0,1!"=="[" goto :eof

+        if not "!a:~0,1!"==";" (

+                setlocal disableDelayedExpansion

+                for /f "delims=;" %%x in ("%%i=%%j") do (

+                        if not DEFINED item (echo %%x) else (if /i "%%i"=="%item%" echo %%x)

+                )

+        )

+)

+goto :eof

+ 

+:section

+setlocal disableDelayedExpansion

+for /f "usebackq delims== skip=2" %%i in (`find /i "[" %filepath%`) do echo %%i

+goto :eof

+ 

+:file_err

+setlocal disableDelayedExpansion

+echo.

+echo %1ÎļþδÕÒµ½»òδÊäÈë!

+echo.

+goto :eof
\ No newline at end of file
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe.bat b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe.bat
new file mode 100644
index 0000000..6e4ebf4
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe.bat
@@ -0,0 +1,44 @@
+@echo off

+

+

+set COPY_CURPATH=%cd%

+set COPY_TOPDIR=%COPY_CURPATH%\..\..\..\..

+set COPY_CHIP_NAME=zx297520v3

+set COPY_PRJ_NAME=prj_cpe

+set COPY_RPMBINPATH=%COPY_TOPDIR%\rpm\project\%COPY_CHIP_NAME%\bin\tos\modem_7520v3

+set COPY_CPUBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\prj_evb\nv

+set COPY_PHYBINPATH=%COPY_TOPDIR%\cp\phy\bin\%COPY_CHIP_NAME%\merge_lte_220a1_bin\ps

+set COPY_NVBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\nv

+set COPY_ALLBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\allbins

+set COPY_OTHERBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\elf

+set COPY_PARTITIONDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\config

+set COPY_BOOT_DIR=%COPY_TOPDIR%\boot

+

+set COPY_INVALIDNV=amtComm_nvro_0x00000000.bin phyGgeAmtCali_nvro_0x00050000.bin ^

+              phyLteAmtCali_nvro_0x00008000.bin phyTdsAmtCali_nvro_0x00048000.bin ^

+              phyWcdmaAmtCali_nvro_0x00058000.bin phyLteaAmtCali_nvro_0x00078000.bin

+

+echo "Enter call copybin.bat!!!!"

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.img     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.bin     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\                   %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\merge_lte\         %COPY_ALLBINDIR%\

+if not exist %COPY_ALLBINDIR%\config mkdir %COPY_ALLBINDIR%\config

+xcopy /e /y     %COPY_CPUBINPATH%\config             %COPY_ALLBINDIR%\config

+call :CopyFile  %COPY_NVBINPATH%\                    %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PARTITIONDIR%\                 %COPY_ALLBINDIR%\

+

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.elf       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy_out.7z    %COPY_OTHERBINDIR%\

+

+for %%i in (%COPY_INVALIDNV%) do del %COPY_ALLBINDIR%\%%i  /F

+

+goto :EOF

+

+:CopyFile

+copy  %1  %2  /Y  ||  echo "copy %1 to %2 failed!!!"

+goto :EOF

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.bat b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.bat
new file mode 100644
index 0000000..eea2b52
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.bat
@@ -0,0 +1,49 @@
+@echo off

+

+

+set COPY_CURPATH=%cd%

+set COPY_TOPDIR=%COPY_CURPATH%\..\..\..\..

+set COPY_CHIP_NAME=zx297520v3

+set COPY_PRJ_NAME=prj_cpe

+set COPY_RPMBINPATH=%COPY_TOPDIR%\rpm\project\%COPY_CHIP_NAME%\bin\tos\modem_7520v3

+set COPY_CPUBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\prj_evb\nv

+set COPY_CPUBIN_RF230A_PATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\prj_evb\nv_230a

+set COPY_PHYBINPATH=%COPY_TOPDIR%\cp\phy\bin\%COPY_CHIP_NAME%\merge_lte_230a_bin\ps_dcxo_lteonly

+set COPY_NVBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\nv

+set COPY_NVBINPATH_MIN=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\nv_min

+set COPY_ALLBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\allbins_min

+set COPY_OTHERBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\elf_min

+set COPY_PARTITIONDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\config_min

+set COPY_BOOT_DIR=%COPY_TOPDIR%\boot

+

+set COPY_INVALIDNV=amtComm_nvro_0x00000000.bin phyGgeAmtCali_nvro_0x00050000.bin ^

+              phyLteAmtCali_nvro_0x00008000.bin phyTdsAmtCali_nvro_0x00048000.bin ^

+              phyWcdmaAmtCali_nvro_0x00058000.bin phyLteaAmtCali_nvro_0x00078000.bin

+

+echo "Enter call copybin.bat!!!!"

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.img     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.bin     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\                   %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\merge_lte\         %COPY_ALLBINDIR%\

+if not exist %COPY_ALLBINDIR%\config mkdir %COPY_ALLBINDIR%\config

+xcopy /e /y     %COPY_CPUBINPATH%\config             %COPY_ALLBINDIR%\config

+call :CopyFile  %COPY_CPUBIN_RF230A_PATH%\           %COPY_ALLBINDIR%\

+xcopy /e /y     %COPY_CPUBIN_RF230A_PATH%\config     %COPY_ALLBINDIR%\config

+call :CopyFile  %COPY_NVBINPATH%\                    %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_NVBINPATH_MIN%\                %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PARTITIONDIR%\                 %COPY_ALLBINDIR%\

+

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.elf       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy_out.7z    %COPY_OTHERBINDIR%\

+

+for %%i in (%COPY_INVALIDNV%) do del %COPY_ALLBINDIR%\%%i  /F

+

+goto :EOF

+

+:CopyFile

+copy  %1  %2  /Y  ||  echo "copy %1 to %2 failed!!!"

+goto :EOF

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.sh b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.sh
new file mode 100755
index 0000000..9509655
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_min.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+COPY_CURPATH=$(pwd)
+COPY_TOPDIR="${COPY_CURPATH}/../../../.."
+# 设定芯片名称和项目名称  
+COPY_CHIP_NAME="zx297520v3"
+COPY_PRJ_BOOTNAME="ufi_mini"
+COPY_PRJ_NAME="prj_cpe"
+COPY_PRJ_APNAME="prj_cpe_min"
+RFTYPE="230A"
+DCXO="_dcxo"
+FLASH="_min"
+# 设定各个路径  
+COPY_RPMBINPATH="${COPY_TOPDIR}/rpm/project/${COPY_CHIP_NAME}/bin/tos/modem_7520v3"
+COPY_CPUBINPATH="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/prj_evb/nv"
+COPY_CPUBIN_RF230A_PATH="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/prj_evb/nv_230a"
+COPY_PHYBINPATH="${COPY_TOPDIR}/cp/phy/bin/${COPY_CHIP_NAME}/merge_lte_230a_bin/ps${DCXO}_lteonly"
+
+COPY_NVBINPATH="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/${COPY_PRJ_NAME}/nv"
+COPY_MINNVBINPATH_DCXO="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/${COPY_PRJ_NAME}/nv${FLASH}"
+COPY_ALLBINDIR="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/${COPY_PRJ_NAME}/allbins${FLASH}"
+COPY_OTHERBINDIR="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/${COPY_PRJ_NAME}/elf${FLASH}"
+COPY_PARTITIONDIR="${COPY_TOPDIR}/allbins/${COPY_CHIP_NAME}/${COPY_PRJ_NAME}/config${FLASH}"
+COPY_BOOT_DIR="${COPY_TOPDIR}/boot"
+echo "Enter call copybin.bat!!!!"
+
+
+cp $COPY_RPMBINPATH/evb_cpurpm.img     $COPY_ALLBINDIR/
+cp $COPY_PHYBINPATH/evb_cpuphy.bin     $COPY_ALLBINDIR/
+cp -r $COPY_CPUBINPATH/*                  $COPY_ALLBINDIR/
+cp -r $COPY_CPUBINPATH/merge_lte/*        $COPY_ALLBINDIR/
+if [ ! -d  $COPY_ALLBINDIR/config ];then
+    mkdir $COPY_ALLBINDIR/config
+fi
+cp -r $COPY_CPUBINPATH/config             $COPY_ALLBINDIR/config
+cp -r $COPY_CPUBIN_RF230A_PATH/*           $COPY_ALLBINDIR/
+cp -r $COPY_CPUBIN_RF230A_PATH/config     $COPY_ALLBINDIR/config
+cp -r $COPY_NVBINPATH/*                    $COPY_ALLBINDIR/
+cp -r $COPY_MINNVBINPATH_DCXO/*                    $COPY_ALLBINDIR/
+cp -r $COPY_PARTITIONDIR/*                $COPY_ALLBINDIR/
+
+cp $COPY_RPMBINPATH/evb_cpurpm.elf       ${COPY_OTHERBINDIR}/
+cp $COPY_RPMBINPATH/evb_cpurpm.map       ${COPY_OTHERBINDIR}/
+cp $COPY_PHYBINPATH/evb_cpuphy.map       ${COPY_OTHERBINDIR}/
+cp $COPY_PHYBINPATH/evb_cpuphy_out.7z    ${COPY_OTHERBINDIR}/
+
+COPY_INVALIDNV="amtComm_nvro_0x00000000.bin phyGgeAmtCali_nvro_0x00050000.bin \  
+               phyLteAmtCali_nvro_0x00008000.bin phyTdsAmtCali_nvro_0x00048000.bin \  
+               phyWcdmaAmtCali_nvro_0x00058000.bin phyLteaAmtCali_nvro_0x00078000.bin"
+
+for file in $COPY_INVALIDNV_ARRAY; do  
+    rm -f "$COPY_ALLBINDIR/$file"  
+done
+
+cp -r ${COPY_TOPDIR}/ap/project/zx297520v3/${COPY_PRJ_APNAME}/bin/${RFTYPE}${DCXO}/allbins/* ${COPY_ALLBINDIR}/
+cp -r ${COPY_TOPDIR}/ap/project/zx297520v3/${COPY_PRJ_APNAME}/bin/${RFTYPE}${DCXO}/elfs/* ${COPY_OTHERBINDIR}/
+
+
+#boot allbins
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/dl_on/zloader.bin ${COPY_ALLBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/uboot.bin ${COPY_ALLBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/uboot-mirr.bin ${COPY_ALLBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/tloader.bin ${COPY_ALLBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/tboot.bin ${COPY_ALLBINDIR}/
+
+#boot elf
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/dl_on/z-load.map ${COPY_OTHERBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/dl_on/z-load ${COPY_OTHERBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/u-boot.map ${COPY_OTHERBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/u-boot ${COPY_OTHERBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/z-load.map ${COPY_OTHERBINDIR}/
+cp ${COPY_TOPDIR}/boot/prj/zx297520v3/${COPY_PRJ_BOOTNAME}/bin/z-load ${COPY_OTHERBINDIR}/
+
diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_switch.bat b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_switch.bat
new file mode 100644
index 0000000..134e524
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/copybin_cpe_switch.bat
@@ -0,0 +1,46 @@
+@echo off

+

+

+set COPY_CURPATH=%cd%

+set COPY_TOPDIR=%COPY_CURPATH%\..\..\..\..

+set COPY_CHIP_NAME=zx297520v3

+set COPY_PRJ_NAME=prj_cpe

+set COPY_RPMBINPATH=%COPY_TOPDIR%\rpm\project\%COPY_CHIP_NAME%\bin\tos\modem_7520v3

+set COPY_CPUBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\prj_evb\nv

+set COPY_PHYBINPATH=%COPY_TOPDIR%\cp\phy\bin\%COPY_CHIP_NAME%\merge_lte_220a1_bin\ps

+set COPY_NVBINPATH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\nv

+set COPY_NVBINPATH_SWITCH=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\nv_switch

+set COPY_ALLBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\allbins_switch

+set COPY_OTHERBINDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\elf_switch

+set COPY_PARTITIONDIR=%COPY_TOPDIR%/allbins/%COPY_CHIP_NAME%\%COPY_PRJ_NAME%\config

+set COPY_BOOT_DIR=%COPY_TOPDIR%\boot

+

+set COPY_INVALIDNV=amtComm_nvro_0x00000000.bin phyGgeAmtCali_nvro_0x00050000.bin ^

+              phyLteAmtCali_nvro_0x00008000.bin phyTdsAmtCali_nvro_0x00048000.bin ^

+              phyWcdmaAmtCali_nvro_0x00058000.bin phyLteaAmtCali_nvro_0x00078000.bin

+

+echo "Enter call copybin.bat!!!!"

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.img     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.bin     %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\                   %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_CPUBINPATH%\merge_lte\         %COPY_ALLBINDIR%\

+if not exist %COPY_ALLBINDIR%\config mkdir %COPY_ALLBINDIR%\config

+xcopy /e /y     %COPY_CPUBINPATH%\config             %COPY_ALLBINDIR%\config

+call :CopyFile  %COPY_NVBINPATH%\                    %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_NVBINPATH_SWITCH%\             %COPY_ALLBINDIR%\

+call :CopyFile  %COPY_PARTITIONDIR%\                 %COPY_ALLBINDIR%\

+

+

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.elf       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_RPMBINPATH%\evb_cpurpm.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy.map       %COPY_OTHERBINDIR%\

+call :CopyFile  %COPY_PHYBINPATH%\evb_cpuphy_out.7z    %COPY_OTHERBINDIR%\

+

+for %%i in (%COPY_INVALIDNV%) do del %COPY_ALLBINDIR%\%%i  /F

+

+goto :EOF

+

+:CopyFile

+copy  %1  %2  /Y  ||  echo "copy %1 to %2 failed!!!"

+goto :EOF

diff --git a/allbins/zx297520v3/prj_cpe/scripts_linux/merge.sh b/allbins/zx297520v3/prj_cpe/scripts_linux/merge.sh
new file mode 100755
index 0000000..f2a0d3a
--- /dev/null
+++ b/allbins/zx297520v3/prj_cpe/scripts_linux/merge.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+./Image -n  NVRWInOneImage.ini
+./Image -n  NVRWOInOneImage.ini
+./Image -n  NVRWInOneImage_switch.ini
+./Image -n  NVRWOInOneImage_switch.ini
+./Image -n  NVRWInOneImage_min.ini
+./Image -n  NVRWOInOneImage_min.ini
+./Image -f  FsImage.ini
+./Image -f  FsImage_switch.ini
+./Image -f  FsImage_min.ini
+./Image -m  AllInOneImage.ini
+./Image -m  AllInOneImage_switch.ini
+./Image -m  AllInOneImage_min.ini
diff --git a/lynq/CPE/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c b/lynq/CPE/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c
new file mode 100755
index 0000000..b2fd556
--- /dev/null
+++ b/lynq/CPE/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c
@@ -0,0 +1,385 @@
+/*
+ * linux/arch/arm/mach-zx297520v2/pwr_ctrl.c
+ *
+ * Copyright (C) 2013 ZTE-TSP
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/clk.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/debugfs.h>
+#include <linux/seq_file.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/io.h>
+
+#include <mach/gpio.h>
+#include <mach/gpio_def.h>
+#include <linux/gpio.h>
+#include <mach/pwr_ctrl.h>
+#include <linux/delay.h>
+#include <mach/pcu.h>
+//++yuwei 20160719
+#include <mach/gpio_cfg.h>
+//++
+
+static unsigned int pwr_buck3v3_init_flag	= 0;
+static unsigned int pwr_buck3v3_status  		= 0;
+
+void pwr_buck3v3_init(void)
+{
+	int ret=0;
+
+	ret=gpio_request(PIN_WIFI_PWR_CTL,"buck3V3");
+	if(ret)
+		BUG();
+	//zx29_gpio_config(ZX29_GPIO_27, GPIO27_GPIO27);
+	zx29_gpio_config(PIN_WIFI_PWR_CTL, PIN_WIFI_PWR_CTL_SEL);
+    	gpio_direction_output(PIN_WIFI_PWR_CTL, GPIO_LOW);
+}
+
+void pwr_buck3v3_on(power_buck3v3_id val)
+{	
+	if(pwr_buck3v3_init_flag == 0)
+	{
+		pwr_buck3v3_init();
+		pwr_buck3v3_init_flag = 1;
+		mdelay(100);
+	}
+
+	if(pwr_buck3v3_status == 0)
+	{
+		gpio_set_value(PIN_WIFI_PWR_CTL, GPIO_HIGH);
+	}
+	pwr_buck3v3_status |= (1<<val);	
+}
+
+void pwr_buck3v3_off(power_buck3v3_id val)
+{
+	pwr_buck3v3_status &= ~(1<<val);	
+	if( pwr_buck3v3_status == 0)
+	{
+		gpio_set_value(PIN_WIFI_PWR_CTL, GPIO_LOW);
+	}
+}
+
+//#ifdef CONFIG_RDA5995_WIFI
+#if defined (CONFIG_RDAWFMAC)||defined(CONFIG_RDAWFMAC_MODULE)
+int rda_wifi_init(void)
+{	
+	int ret = 0;
+	ret = gpio_request(PIN_WIFI_CHIP_ENABLE,"wifi_chip_enable");	
+	if(ret < 0)	
+	{        
+		printk("request wifi enable gpio failed\n");     
+		gpio_free(PIN_WIFI_CHIP_ENABLE);    
+	}
+	return ret;
+}
+EXPORT_SYMBOL(rda_wifi_init);
+
+void rda_wifi_deinit(void)
+{	
+	       
+	printk("gpio_free wifi enable gpio \n");     
+	gpio_free(PIN_WIFI_CHIP_ENABLE);    
+
+}
+EXPORT_SYMBOL(rda_wifi_deinit);
+
+void rda_wifi_enable(int bval)
+{	
+	zx29_gpio_config(PIN_WIFI_CHIP_ENABLE, PIN_WIFI_CHIP_ENABLE_SEL);
+	if(bval)	
+	{	
+		gpio_direction_output(PIN_WIFI_CHIP_ENABLE, GPIO_HIGH);	
+		printk("rda_wifi gpio%d success high ##############################\n",PIN_WIFI_CHIP_ENABLE);
+	}	
+	else	
+	{	
+		gpio_direction_output(PIN_WIFI_CHIP_ENABLE, GPIO_LOW);	
+		printk("rda_wifi gpio%d success low  ##############################\n",PIN_WIFI_CHIP_ENABLE);
+	}
+}
+EXPORT_SYMBOL(rda_wifi_enable);
+#endif
+
+#if defined (CONFIG_ESP8089)||defined(CONFIG_ESP8089_MODULE)
+int esp_wifi_init(void)
+{	
+	int ret = 0;
+	ret = gpio_request(PIN_WIFI_PWR_CTL,"wifi_pwr_ctl");	
+	if(ret < 0)	
+	{        
+		printk("request wifi pwr ctl gpio failed, maybe lcd used.\n");     
+		gpio_free(PIN_WIFI_PWR_CTL); 
+		return 0;
+	}
+	
+	ret = gpio_request(PIN_WIFI_CHIP_ENABLE,"wifi_chip_enable");	
+	if(ret < 0)	
+	{        
+		printk("request wifi enable gpio failed\n");     
+		gpio_free(PIN_WIFI_CHIP_ENABLE);    
+	}
+	return ret;
+}
+EXPORT_SYMBOL(esp_wifi_init);
+
+void esp_wifi_deinit(void)
+{	
+	gpio_free(PIN_WIFI_CHIP_ENABLE);    
+}
+EXPORT_SYMBOL(esp_wifi_deinit);
+
+void esp_wifi_enable(int bval)
+{	
+	zx29_gpio_config(PIN_WIFI_PWR_CTL, PIN_WIFI_PWR_CTL_SEL);
+	if(bval)	
+	{	
+		gpio_direction_output(PIN_WIFI_PWR_CTL, GPIO_HIGH);	
+		printk("esp_wifi gpio%d success high, pwr on ##############################\n",PIN_WIFI_PWR_CTL);
+	}	
+
+	zx29_gpio_config(PIN_WIFI_CHIP_ENABLE, PIN_WIFI_CHIP_ENABLE_SEL);
+	if(bval)	
+	{	
+		gpio_direction_output(PIN_WIFI_CHIP_ENABLE, GPIO_LOW);
+		printk("esp_wifi gpio%d success low, chip enable ##############################\n",PIN_WIFI_CHIP_ENABLE);
+	}	
+	else	
+	{	
+		gpio_direction_output(PIN_WIFI_CHIP_ENABLE, GPIO_HIGH);	
+		printk("esp_wifi gpio%d success high, chip disable  ##############################\n",PIN_WIFI_CHIP_ENABLE);
+	}
+}
+EXPORT_SYMBOL(esp_wifi_enable);
+#endif
+
+#if defined (CONFIG_XR_WLAN)
+int xr_wifi_init(void)
+{	
+	int ret = 0;
+#if 0
+	ret = gpio_request(PIN_WIFI_PWR_CTL,"wifi_pwr_ctl");	
+	if(ret < 0)	
+	{        
+		printk("request wifi pwr ctl gpio failed, maybe lcd used.\n");     
+		gpio_free(PIN_WIFI_PWR_CTL); 
+		return 0;
+	}
+#endif
+	ret = gpio_request(ZX29_GPIO_123, "wlan_reset");	
+	if(ret < 0)	
+	{        
+		printk("request wifi reset gpio failed\n");     
+		gpio_free(ZX29_GPIO_123);    
+	}
+	return ret;
+}
+EXPORT_SYMBOL(xr_wifi_init);
+
+void xr_wifi_deinit(void)
+{	
+	gpio_free(ZX29_GPIO_123);    
+	//io_free(PIN_WIFI_PWR_CTL);
+}
+EXPORT_SYMBOL(xr_wifi_deinit);
+
+void xr_wifi_enable(int bval)
+{	
+	//29_gpio_config(PIN_WIFI_PWR_CTL, PIN_WIFI_PWR_CTL_SEL);
+#if 0
+	if(bval)	
+	{	
+		gpio_direction_output(PIN_WIFI_PWR_CTL, GPIO_HIGH);	
+		printk("xr_wifi gpio%d success high, pwr on ##############################\n",PIN_WIFI_PWR_CTL);
+	}
+	else
+	{
+		gpio_direction_output(PIN_WIFI_PWR_CTL, GPIO_LOW);
+		printk("xr_wifi gpio%d success low, pwr down ##############################\n",PIN_WIFI_PWR_CTL);
+	}
+#endif
+
+	zx29_gpio_config(ZX29_GPIO_123, GPIO123_GPIO123);
+	zx29_gpio_pd_pu_set(ZX29_GPIO_123,0);
+	if(bval)	
+	{	
+		gpio_direction_output(ZX29_GPIO_123, 0);
+		mdelay(50);
+		gpio_direction_output(ZX29_GPIO_123, 1);
+		mdelay(2);
+		gpio_direction_output(ZX29_GPIO_123, 0);
+		mdelay(50);
+		//gpio_direction_output(PIN_WIFI_CHIP_ENABLE, GPIO_LOW);
+		printk("xr_wifi gpio%d success reset, chip enable ##############################\n",ZX29_GPIO_123);
+	}	
+	else	
+	{	
+		gpio_direction_output(ZX29_GPIO_123, 1);	
+		printk("xr_wifi gpio%d chip disable  ##############################\n",ZX29_GPIO_123);
+	}
+	
+}
+EXPORT_SYMBOL(xr_wifi_enable);
+#endif
+
+#if defined (CONFIG_SSV6X5X)
+
+void ssv6x5x_wifi_enable(int bval)
+{	
+	if(bval)	
+	{	
+	   gpio_direction_output(PIN_WIFI_CHIP_ENABLE, 0);
+	   mdelay(10);
+	   gpio_direction_output(PIN_WIFI_CHIP_ENABLE, 1);
+	   printk("wifi enable gpio success low%d\n",PIN_WIFI_CHIP_ENABLE);
+	}	
+	else	
+	{	
+		gpio_direction_output(PIN_WIFI_CHIP_ENABLE, 0);	
+		printk("ssv6x5x_wifi gpio%d chip disable  ##############################\n",PIN_WIFI_CHIP_ENABLE);
+	}
+	
+}
+EXPORT_SYMBOL(ssv6x5x_wifi_enable);
+#endif
+
+#if defined (CONFIG_AIC8800)
+
+void aic8800_wifi_enable(int bval)
+{	
+	int ret = 0;
+	if(bval)	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+	   ret=gpio_request(ZX29_GPIO_85,"aic_mifi_en");
+	   if(ret){
+	       printk("request aic_mifi_en gpio failed\n"); 
+	       gpio_free(ZX29_GPIO_85); 	
+	   }    
+	   ret=gpio_request(ZX29_GPIO_130,"aic_mifi_power_en");
+	   if(ret){
+		   printk("request aic_mifi_power_en gpio failed\n"); 
+	       gpio_free(ZX29_GPIO_130); 
+	   }
+	   gpio_direction_output(ZX29_GPIO_85, 1);
+	   gpio_direction_output(ZX29_GPIO_130, 1);
+#else
+	   ret=gpio_request(ZX29_GPIO_123,"aic_ufi_en");
+	   if(ret){
+	       printk("request aic_ufi_en gpio failed\n"); 
+	       gpio_free(ZX29_GPIO_123); 	
+	   }    
+	   ret=gpio_request(ZX29_GPIO_129,"aic_ufi_power_en");
+	   if(ret){
+		   printk("request aic_ufi_power_en gpio failed\n"); 
+	       gpio_free(ZX29_GPIO_129); 
+	   }
+	   gpio_direction_output(ZX29_GPIO_123, 1);
+	   gpio_direction_output(ZX29_GPIO_129, 1);
+#endif
+	   mdelay(10);
+	   printk("qqq aic en succ.\n");
+	}	
+	else	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+		gpio_direction_output(ZX29_GPIO_85, 0);	
+		gpio_direction_output(ZX29_GPIO_130, 0);
+#else
+		gpio_direction_output(ZX29_GPIO_123, 0);	
+		gpio_direction_output(ZX29_GPIO_129, 0);
+#endif
+		printk("qqq aic en fail.\n");
+	}
+	
+}
+EXPORT_SYMBOL(aic8800_wifi_enable);
+#endif
+#if defined (CONFIG_AIC8800)
+void aic8800_wifi_disable(int bval)
+{	
+	int ret = 0;
+	if(bval)	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+	   gpio_direction_output(ZX29_GPIO_85, 0);
+	   gpio_direction_output(ZX29_GPIO_130, 0);
+#else
+	   gpio_direction_output(ZX29_GPIO_123, 0);
+	   gpio_direction_output(ZX29_GPIO_129, 0);
+#endif
+	   mdelay(50);
+	   printk("qqq aic dis succ.\n");
+	}	
+	else	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+		gpio_direction_output(ZX29_GPIO_85, 1);
+		gpio_direction_output(ZX29_GPIO_130, 1);
+#else
+		gpio_direction_output(ZX29_GPIO_123, 1);	
+		gpio_direction_output(ZX29_GPIO_129, 1);
+#endif
+		printk("qqq aic dis fail.\n");
+	}
+}
+EXPORT_SYMBOL(aic8800_wifi_disable);
+#endif
+#if defined (CONFIG_AIC8800)
+void aic8800_wifi_re_enable(int bval)
+{	
+	int ret = 0;
+	if(bval)	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+	   gpio_direction_output(ZX29_GPIO_85, 1);
+	   gpio_direction_output(ZX29_GPIO_130, 1);
+#else
+	   gpio_direction_output(ZX29_GPIO_129, 1);
+	   gpio_direction_output(ZX29_GPIO_123, 1);   
+#endif
+	   mdelay(50);
+	   printk("qqq re enable succ.\n");
+	}	
+	else	
+	{	
+#ifdef CONFIG_AIC8800_MIFI_EN
+	   gpio_direction_output(ZX29_GPIO_85, 0);
+	   gpio_direction_output(ZX29_GPIO_130, 0);
+#else
+		gpio_direction_output(ZX29_GPIO_123, 0);	
+		gpio_direction_output(ZX29_GPIO_129, 0);
+#endif
+		printk("qqq aic dis fail.\n");
+	}
+}
+EXPORT_SYMBOL(aic8800_wifi_re_enable);
+#endif
+
+#ifdef CONFIG_RTL8192CD
+//hess add, called by 8192cd_pwrctrl.c
+unsigned int Get_WiFi_Wakeup_Pin_Num()
+{
+    //return ZX29_GPIO_57;
+    return PIN_WIFI_WAKEUP;
+}
+
+int Get_WiFi_Wakeup_Pin_INT()
+{
+    //return PCU_EX7_INT;
+    return INT_WIFI_WAKEUP;
+}
+
+#endif
+
+
diff --git a/lynq/CPE/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800/rwnx_platform.h b/lynq/CPE/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800/rwnx_platform.h
new file mode 100755
index 0000000..5eb56e4
--- /dev/null
+++ b/lynq/CPE/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800/rwnx_platform.h
@@ -0,0 +1,328 @@
+/**
+ ******************************************************************************
+ *
+ * @file rwnx_platorm.h
+ *
+ * Copyright (C) RivieraWaves 2012-2019
+ *
+ ******************************************************************************
+ */
+
+#ifndef _RWNX_PLATFORM_H_
+#define _RWNX_PLATFORM_H_
+
+#include <linux/pci.h>
+#include "lmac_msg.h"
+
+#define AIC_MACCONFIG_NAME              "../../etc_rw/aic_macconfig.txt"
+#define RWNX_CONFIG_FW_NAME             "rwnx_settings.ini"
+#define RWNX_PHY_CONFIG_TRD_NAME        "rwnx_trident.ini"
+#define RWNX_PHY_CONFIG_KARST_NAME      "rwnx_karst.ini"
+#define RWNX_AGC_FW_NAME                "agcram.bin"
+#define RWNX_LDPC_RAM_NAME              "ldpcram.bin"
+#ifdef CONFIG_RWNX_FULLMAC
+#define RWNX_MAC_FW_BASE_NAME           "fmacfw"
+#define RWNX_MAC_FW_RF_BASE_NAME        "lmacfw_rf.bin"
+#elif defined CONFIG_RWNX_FHOST
+#define RWNX_MAC_FW_BASE_NAME           "fhostfw"
+#endif /* CONFIG_RWNX_FULLMAC */
+
+#ifdef CONFIG_RWNX_TL4
+#define RWNX_MAC_FW_NAME RWNX_MAC_FW_BASE_NAME".hex"
+#else
+#define RWNX_MAC_FW_NAME  RWNX_MAC_FW_BASE_NAME".ihex"
+#ifdef CONFIG_MCU_INTEGRATED
+#ifdef CONFIG_MCU_MESSAGE
+#define RWNX_MAC_FW_NAME2 RWNX_MAC_FW_BASE_NAME"_8818m_custmsg.bin"
+#else
+#define RWNX_MAC_FW_NAME2 RWNX_MAC_FW_BASE_NAME"_8818m.bin"
+#endif
+#else
+#define RWNX_MAC_FW_NAME2 RWNX_MAC_FW_BASE_NAME".bin"
+#endif
+#endif
+#define RWNX_MAC_CALIB_BASE_NAME_8800DC        "fmacfw_calib_8800dc"
+#define RWNX_MAC_CALIB_NAME_8800DC_U02          RWNX_MAC_CALIB_BASE_NAME_8800DC"_u02.bin"
+#define RWNX_MAC_CALIB_NAME_8800DC_H_U02        RWNX_MAC_CALIB_BASE_NAME_8800DC"_h_u02.bin"
+
+#if (defined(CONFIG_DPD) && !defined(CONFIG_FORCE_DPD_CALIB))
+#define FW_DPDRESULT_NAME_8800DC        "aic_dpdresult_8800dc.bin"
+#endif
+#ifdef CONFIG_DPD
+#define ROM_FMAC_CALIB_ADDR            0x00130000
+#define FW_PATH_MAX_LEN 200
+int is_file_exist(char* name);
+typedef struct {
+    uint32_t bit_mask[3];
+    uint32_t reserved;
+    uint32_t dpd_high[96];
+    uint32_t dpd_11b[96];
+    uint32_t dpd_low[96];
+    uint32_t idac_11b[48];
+    uint32_t idac_high[48];
+    uint32_t idac_low[48];
+    uint32_t loft_res[18];
+    uint32_t rx_iqim_res[16];
+} rf_misc_ram_t;
+typedef struct {
+    uint32_t bit_mask[4];
+    uint32_t dpd_high[96];
+    uint32_t loft_res[18];
+} rf_misc_ram_lite_t;
+#define MEMBER_SIZE(type, member)   sizeof(((type *)0)->member)
+#define DPD_RESULT_SIZE_8800DC      sizeof(rf_misc_ram_lite_t)
+extern rf_misc_ram_lite_t dpd_res;
+#endif
+#ifdef CONFIG_DPD
+#ifndef CONFIG_FORCE_DPD_CALIB
+int aicwf_dpd_result_write_8800dc(void *buf, int buf_len);
+#endif
+#endif
+#define RWNX_MAC_PATCH_BASE_NAME        "fmacfw_patch_8800dc"
+#define RWNX_MAC_PATCH_NAME2 RWNX_MAC_PATCH_BASE_NAME".bin"
+#define RWNX_MAC_PATCH_NAME2_U02 RWNX_MAC_PATCH_BASE_NAME"_u02.bin"
+#define RWNX_MAC_PATCH_NAME2_8800DC_H_U02 RWNX_MAC_PATCH_BASE_NAME"_h_u02.bin"
+#define RWNX_MAC_PATCH_TABLE_NAME_8800DC "fmacfw_patch_tbl_8800dc"
+#define RWNX_MAC_PATCH_TABLE_8800DC RWNX_MAC_PATCH_TABLE_NAME_8800DC ".bin"
+#define RWNX_MAC_PATCH_TABLE_8800DC_U02 RWNX_MAC_PATCH_TABLE_NAME_8800DC "_u02.bin"
+#define RWNX_MAC_PATCH_TABLE_8800DC_H_U02 RWNX_MAC_PATCH_TABLE_NAME_8800DC "_h_u02.bin"
+#define RWNX_MAC_RF_PATCH_BASE_NAME     "fmacfw_rf_patch"
+#define RWNX_MAC_RF_PATCH_NAME RWNX_MAC_RF_PATCH_BASE_NAME".bin"
+
+
+#define RWNX_FCU_FW_NAME                "fcuram.bin"
+
+#define FW_USERCONFIG_NAME              "aic_userconfig.txt"
+
+#ifdef CONFIG_VENDOR_SPECIFIED_FW_PATH
+#define VENDOR_SPECIFIED_FW_PATH    CONFIG_VENDOR_SPECIFIED_FW_PATH
+#endif
+#ifdef CONFIG_VENDOR_SUBDIR_NAME
+#define VENDOR_SUBDIR_NAME          CONFIG_VENDOR_SUBDIR_NAME
+#endif
+#define VENDOR_SPECIFIED_DPD_PATH "/mnt/userdata/etc_rw/wifi"
+
+enum aicbt_patch_table_type {
+	AICBT_PT_INF  = 0x00,
+	AICBT_PT_TRAP = 0x1,
+	AICBT_PT_B4,
+	AICBT_PT_BTMODE,
+	AICBT_PT_PWRON,
+	AICBT_PT_AF,
+	AICBT_PT_VER,
+};
+enum aicbt_btport_type {
+	AICBT_BTPORT_NULL,
+	AICBT_BTPORT_MB,
+	AICBT_BTPORT_UART,
+};
+enum aicbt_btmode_type {
+	AICBT_BTMODE_BT_ONLY_SW = 0x0,    // bt only mode with switch
+	AICBT_BTMODE_BT_WIFI_COMBO,       // wifi/bt combo mode
+	AICBT_BTMODE_BT_ONLY,             // bt only mode without switch
+	AICBT_BTMODE_BT_ONLY_TEST,        // bt only test mode
+	AICBT_BTMODE_BT_WIFI_COMBO_TEST,  // wifi/bt combo test mode
+	AICBT_BTMODE_BT_ONLY_COANT,       // bt only mode with no external switch
+	AICBT_MODE_NULL = 0xFF,           // invalid value
+};
+enum aicbt_uart_baud_type {
+	AICBT_UART_BAUD_115200     = 115200,
+	AICBT_UART_BAUD_921600     = 921600,
+	AICBT_UART_BAUD_1_5M       = 1500000,
+	AICBT_UART_BAUD_3_25M      = 3250000,
+};
+enum aicbt_uart_flowctrl_type {
+	AICBT_UART_FLOWCTRL_DISABLE = 0x0,    // uart without flow ctrl
+	AICBT_UART_FLOWCTRL_ENABLE,           // uart with flow ctrl
+};
+enum aicbsp_cpmode_type {
+	AICBSP_CPMODE_WORK,
+	AICBSP_CPMODE_TEST,
+	AICBSP_CPMODE_MAX,
+};
+enum chip_rev {
+	CHIP_REV_U01 = 1,
+	CHIP_REV_U02 = 3,
+	CHIP_REV_U03 = 7,
+	CHIP_REV_U04 = 7,
+};
+#define RAM_FMAC_FW_ADDR                    0x00120000
+#define FW_RAM_ADID_BASE_ADDR               0x00161928
+#define FW_RAM_ADID_BASE_ADDR_U03           0x00161928
+#define FW_RAM_PATCH_BASE_ADDR              0x00100000
+#define RAM_8800DC_U01_ADID_ADDR            0x00101788
+#define RAM_8800DC_U02_ADID_ADDR            0x001017d8
+#define RAM_8800DC_FW_PATCH_ADDR            0x00184000
+#define FW_RESET_START_ADDR                 0x40500128
+#define FW_RESET_START_VAL                  0x40
+#define FW_ADID_FLAG_ADDR                   0x40500150
+#define FW_ADID_FLAG_VAL                    0x01
+#define FW_RAM_ADID_BASE_ADDR_8800D80       0x002017E0
+#define FW_RAM_PATCH_BASE_ADDR_8800D80      0x0020B2B0
+#define FW_RAM_ADID_BASE_ADDR_8800D80_U02   0x00201940
+#define FW_RAM_PATCH_BASE_ADDR_8800D80_U02  0x0020b43c
+#define AICBT_PT_TAG                "AICBT_PT_TAG"
+#define AICBT_TXPWR_LVL            0x00006020
+#define AICBT_TXPWR_LVL_8800dc            0x00006f2f
+#define AICBT_TXPWR_LVL_8800d80           0x00006f2f
+#define AICBSP_HWINFO_DEFAULT       (-1)
+#define AICBSP_CPMODE_DEFAULT       AICBSP_CPMODE_WORK
+#define AICBSP_FWLOG_EN_DEFAULT     0
+#define AICBT_BTMODE_DEFAULT_8800d80    AICBT_BTMODE_BT_ONLY_COANT
+#define AICBT_BTMODE_DEFAULT            AICBT_BTMODE_BT_WIFI_COMBO
+#define AICBT_BTPORT_DEFAULT            AICBT_BTPORT_UART
+#define AICBT_UART_BAUD_DEFAULT         AICBT_UART_BAUD_1_5M
+#define AICBT_UART_FC_DEFAULT           AICBT_UART_FLOWCTRL_ENABLE
+#define AICBT_LPM_ENABLE_DEFAULT 	    0
+#define AICBT_TXPWR_LVL_DEFAULT         AICBT_TXPWR_LVL
+#define AICBT_TXPWR_LVL_DEFAULT_8800dc  AICBT_TXPWR_LVL_8800dc
+#define AICBT_TXPWR_LVL_DEFAULT_8800d80 AICBT_TXPWR_LVL_8800d80
+struct aicbt_patch_table {
+	char     *name;
+	uint32_t type;
+	uint32_t *data;
+	uint32_t len;
+	struct aicbt_patch_table *next;
+};
+struct aicbt_info_t {
+	uint32_t btmode;
+	uint32_t btport;
+	uint32_t uart_baud;
+	uint32_t uart_flowctrl;
+	uint32_t lpm_enable;
+	uint32_t txpwr_lvl;
+};
+struct aicbt_patch_info_t {
+	uint32_t info_len;
+	uint32_t adid_addrinf;
+	uint32_t addr_adid;
+	uint32_t patch_addrinf;
+	uint32_t addr_patch;
+	uint32_t reset_addr;
+	uint32_t reset_val;
+	uint32_t adid_flag_addr;
+	uint32_t adid_flag;
+};
+struct aicbsp_firmware {
+	const char *desc;
+	const char *bt_adid;
+	const char *bt_patch;
+	const char *bt_table;
+	const char *wl_fw;
+};
+struct aicbsp_info_t {
+	int hwinfo;
+	int hwinfo_r;
+	uint32_t cpmode;
+	uint32_t chip_rev;
+	bool fwlog_en;
+	uint8_t irqf;
+};
+/**
+ * Type of memory to access (cf rwnx_plat.get_address)
+ *
+ * @RWNX_ADDR_CPU To access memory of the embedded CPU
+ * @RWNX_ADDR_SYSTEM To access memory/registers of one subsystem of the
+ * embedded system
+ *
+ */
+enum rwnx_platform_addr {
+    RWNX_ADDR_CPU,
+    RWNX_ADDR_SYSTEM,
+    RWNX_ADDR_MAX,
+};
+
+struct rwnx_hw;
+
+/**
+ * struct rwnx_plat - Operation pointers for RWNX PCI platform
+ *
+ * @pci_dev: pointer to pci dev
+ * @enabled: Set if embedded platform has been enabled (i.e. fw loaded and
+ *          ipc started)
+ * @enable: Configure communication with the fw (i.e. configure the transfers
+ *         enable and register interrupt)
+ * @disable: Stop communication with the fw
+ * @deinit: Free all ressources allocated for the embedded platform
+ * @get_address: Return the virtual address to access the requested address on
+ *              the platform.
+ * @ack_irq: Acknowledge the irq at link level.
+ * @get_config_reg: Return the list (size + pointer) of registers to restore in
+ * order to reload the platform while keeping the current configuration.
+ *
+ * @priv Private data for the link driver
+ */
+struct rwnx_plat {
+    struct pci_dev *pci_dev;
+
+#ifdef AICWF_SDIO_SUPPORT
+	struct aic_sdio_dev *sdiodev;
+#endif
+
+#ifdef AICWF_USB_SUPPORT
+    struct aic_usb_dev *usbdev;
+#endif
+    bool enabled;
+
+    int (*enable)(struct rwnx_hw *rwnx_hw);
+    int (*disable)(struct rwnx_hw *rwnx_hw);
+    void (*deinit)(struct rwnx_plat *rwnx_plat);
+    u8* (*get_address)(struct rwnx_plat *rwnx_plat, int addr_name,
+                       unsigned int offset);
+    void (*ack_irq)(struct rwnx_plat *rwnx_plat);
+    int (*get_config_reg)(struct rwnx_plat *rwnx_plat, const u32 **list);
+
+    u8 priv[0] __aligned(sizeof(void *));
+};
+
+#define RWNX_ADDR(plat, base, offset)           \
+    plat->get_address(plat, base, offset)
+
+#define RWNX_REG_READ(plat, base, offset)               \
+    readl(plat->get_address(plat, base, offset))
+
+#define RWNX_REG_WRITE(val, plat, base, offset)         \
+    writel(val, plat->get_address(plat, base, offset))
+
+typedef struct
+{
+    u8_l enable;
+    u8_l xtal_cap;
+    u8_l xtal_cap_fine;
+
+} xtal_cap_conf_t;
+
+extern struct rwnx_plat *g_rwnx_plat;
+
+int rwnx_platform_init(struct rwnx_plat *rwnx_plat, void **platform_data);
+void rwnx_platform_deinit(struct rwnx_hw *rwnx_hw);
+
+int rwnx_platform_on(struct rwnx_hw *rwnx_hw, void *config);
+void rwnx_platform_off(struct rwnx_hw *rwnx_hw, void **config);
+
+int rwnx_platform_register_drv(void);
+void rwnx_platform_unregister_drv(void);
+
+#ifdef CONFIG_LOAD_USERCONFIG
+void get_userconfig_txpwr_lvl(txpwr_lvl_conf_t *txpwr_lvl);
+void get_userconfig_txpwr_lvl_v2_in_fdrv(txpwr_lvl_conf_v2_t *txpwr_lvl_v2);
+void get_userconfig_txpwr_loss(txpwr_loss_conf_t *txpwr_loss);
+void get_userconfig_txpwr_ofst(txpwr_ofst_conf_t *txpwr_ofst);
+void get_userconfig_xtal_cap(xtal_cap_conf_t *xtal_cap);
+void set_txpwr_loss_ofst(s8_l value);
+#ifdef CONFIG_SET_AP_PS
+int get_userconfig_set_ap_ps_lvl(ap_ps_conf_t *ap_ps_lvl);
+#endif
+#endif
+int aicwf_patch_table_load(struct rwnx_hw *rwnx_hw, char *filename);
+int rwnx_load_firmware(u32 **fw_buf, const char *name, struct device *device);
+extern struct device *rwnx_platform_get_dev(struct rwnx_plat *rwnx_plat);
+
+static inline unsigned int rwnx_platform_get_irq(struct rwnx_plat *rwnx_plat)
+{
+    return rwnx_plat->pci_dev->irq;
+}
+int aicwf_misc_ram_init_8800dc(struct rwnx_hw *rwnx_hw);
+int aicwf_plat_patch_load_8800dc(struct rwnx_hw *rwnx_hw);
+
+#endif /* _RWNX_PLATFORM_H_ */