blob: 1b473dfe86e278f5b1dd343a8b706d4fe28c81cc [file] [log] [blame]
wz.wang4cbe62b2024-06-28 11:28:43 +08001AP_PRJ ?= prj_cpe_min
2BOOT_PRJ ?= ufi_mini
3PACK_PRJ ?= prj_cpe
zw.wang4f1b5282024-08-14 15:47:35 +08004RF_TYPES ?= 230A
5DCXOS ?= yes
wz.wang6c460702024-07-01 10:20:35 +08006PATH_PRJ ?= lynq/CPE
zw.wangcd454f52024-11-13 17:56:28 +08007PATCH ?= no
zw.wang4f1b5282024-08-14 15:47:35 +08008ifeq ($(RF_TYPES), 230A)
9RF_TYPE_R306 = RF_TYPE=230A
10endif
11ifeq ($(DCXOS), yes)
12DCXO_R306 = DCXO=yes
13endif
wz.wang4cbe62b2024-06-28 11:28:43 +080014
you.chen4debc602025-04-04 17:44:21 +080015wifi_proj:=$(shell echo $(PATH_PRJ) | awk -F "/" '{print $$2}')
16
wz.wang4cbe62b2024-06-28 11:28:43 +080017.PHONY:all
18all:copy boot ap pack
19 @echo OK
20.PHONY:pack
21pack:
22 make -C allbins/zx297520v3/$(PACK_PRJ)/scripts_linux/
23.PHONY:boot
24boot:
25 make -C boot/prj/zx297520v3/$(BOOT_PRJ)/build/ allclean all
26.PHONY:ap
27ap:
zw.wang4f1b5282024-08-14 15:47:35 +080028 make -C ap/project/zx297520v3/$(AP_PRJ)/build/ allclean all $(RF_TYPE_R306) $(DCXO_R306)
wz.wang4cbe62b2024-06-28 11:28:43 +080029.PHONY:ap_normal2
30ap_normal2:
zw.wang4f1b5282024-08-14 15:47:35 +080031 make -C ap/project/zx297520v3/$(AP_PRJ)/build/ normal2 $(RF_TYPE_R306) $(DCXO_R306)
wz.wang4cbe62b2024-06-28 11:28:43 +080032.PHONY:copy
33copy:
wz.wang6c460702024-07-01 10:20:35 +080034 cp -rf $(PATH_PRJ)/* .
zw.wangcd454f52024-11-13 17:56:28 +080035ifeq ($(PATCH), yes)
36 cp -rf $(PATH_PRJ)/nand_patch/* .
37else
38 @echo PATCH=no
39endif
w.deng2f3b5c72025-02-25 14:01:30 +080040ifeq ($(CUST),)
41 echo "CUST is empty or not defined"
42else
43 echo "CUST is defined and has a value: $(CUST)"
44 cp -rf $(PATH_PRJ)/$(CUST)/* .
45endif
you.chen4debc602025-04-04 17:44:21 +080046ifeq ($(wifi),)
47 echo "default use wifi rtl8192cd_92es_wpa2"
48else
49 echo "using wifi lynq/wifi/$(wifi_proj)/$(wifi), make sure config.linux file and Makefile of wireless is correct!!!"
50 cp -rf lynq/wifi/$(wifi_proj)/$(wifi)/* .
51endif
w.deng2f3b5c72025-02-25 14:01:30 +080052
wz.wang4cbe62b2024-06-28 11:28:43 +080053.PHONY:help
54help:
wz.wang6c460702024-07-01 10:20:35 +080055 @echo example prj_cpe_min : make or make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/CPE
zw.wangbd896262024-07-22 18:04:13 +080056 @echo example prj_cpe_aic8800dw : make AP_PRJ=prj_cpe PATH_PRJ=lynq/CPE_AIC8800DW
wz.wang6c460702024-07-01 10:20:35 +080057 @echo example prj_mifi_min_aic8800dw : make AP_PRJ=prj_mifi_min_aic8800dw BOOT_PRJ=mifi_mini_64 PATH_PRJ=lynq/MIFI/ PACK_PRJ=prj_mifi
zw.wangcfae4372024-08-12 16:41:12 +080058 @echo example R305 : make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/R305
zw.wang4f1b5282024-08-14 15:47:35 +080059 @echo example R306 : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/R306
mj.qu4cea4592024-08-29 22:35:55 -070060 @echo example CPE_COMMON : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/CPE_COMMON
qumengjia90e33962024-09-24 19:15:16 +080061 @echo example CPE_TELKOMSEL : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/CPE_TELKOMSEL
qumengjiaa295b332024-11-01 09:35:57 +080062 @echo example R307 : make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/R307
you.chen808f8ef2025-04-02 13:58:10 +080063 @echo example R307L : make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/R307L
you.chen4debc602025-04-04 17:44:21 +080064 @echo example S300 : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/S300 [wifi=rtl8192cd_92fs]
mj.quf47abdc2025-01-14 17:23:20 -080065 @echo example S300_COMMON : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/S300_COMMON
yuezonghec78e2ef2025-02-13 17:57:46 -080066 @echo example MD310 : make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/MD310
w.deng64d2efd2025-02-26 16:43:45 +080067 @echo example MD310 TSEL/XL/HKM/HIFI: make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/MD310 CUST=TSEL/XL/HKM/HIFI
yuezonghec78e2ef2025-02-13 17:57:46 -080068 @echo example MD310EU : make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/MD310EU
w.dengf34a5312025-03-12 09:47:16 +080069 @echo example MD310EU AFC: make AP_PRJ=prj_cpe_min BOOT_PRJ=ufi_mini PACK_PRJ=prj_cpe PATH_PRJ=lynq/MD310EU CUST=AFC
zw.wangd8c38a42025-02-19 14:25:39 +080070 @echo example S300_AIC : make AP_PRJ=prj_mifi_min BOOT_PRJ=mifi_mini_64 PACK_PRJ=prj_mifi PATH_PRJ=lynq/S300_AIC
you.chen16678562025-02-20 11:26:11 +080071 @echo example R306_MTN : make AP_PRJ=prj_cpe BOOT_PRJ=cpe PACK_PRJ=prj_cpe PATH_PRJ=lynq/R306_MTN
wz.wang4cbe62b2024-06-28 11:28:43 +080072 @echo The default value of AP_PRJ is prj_cpe_min. The following values are optional :
73 @ls ap/project/zx297520v3/*/ -d | xargs -I {} basename "{}" | tr '\n' ' '
74 @echo
75 @echo
76 @echo The default value of BOOT_PRJ is ufi_mini. The following values are optional :
77 @ls boot/prj/zx297520v3/*/ -d | xargs -I {} basename "{}" | tr '\n' ' '
78 @echo
wz.wang6c460702024-07-01 10:20:35 +080079 @echo
80 @echo The default value of PACK_PRJ is prj_cpe. The following values are optional :
81 @ls allbins/zx297520v3/*/ -d | xargs -I {} basename "{}" | tr '\n' ' '
82 @echo
83 @echo
84 @echo The default value of PATH_PRJ is lynq/CPE. The following values are optional :
85 @ls lynq/*/ -d | tr '\n' ' '
86 @echo
zw.wangcd454f52024-11-13 17:56:28 +080087 @echo
88 @echo The default value of PATCH is no. The nand_patch directory is supported as follows :
89 @find lynq -mindepth 1 -maxdepth 2 -name nand_patch | xargs -I {} dirname "{}" | tr '\n' ' '
90 @echo
91 @echo To support the nand_patch directory, add PATCH=yes at the end of compilation.
92 @echo
wz.wang4cbe62b2024-06-28 11:28:43 +080093