blob: 326f19c9b1fa6c3917391b9bd5c9214200e8d940 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001# Copyright Statement:
2#
3# This software/firmware and related documentation ("MediaTek Software") are
4# protected under relevant copyright laws. The information contained herein
5# is confidential and proprietary to MediaTek Inc. and/or its licensors.
6# Without the prior written permission of MediaTek inc. and/or its licensors,
7# any reproduction, modification, use or disclosure of MediaTek Software,
8# and information contained herein, in whole or in part, shall be strictly prohibited.
9#
10# MediaTek Inc. (C) 2010. All rights reserved.
11#
12# BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
13# THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
14# RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
15# AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
16# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
17# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
18# NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
19# SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
20# SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
21# THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
22# THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
23# CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
24# SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
25# STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
26# CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
27# AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
28# OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
29# MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
30#
31# The following software/firmware and/or related documentation ("MediaTek Software")
32# have been modified by MediaTek Inc. All revisions are subject to any receiver's
33# applicable license agreements with MediaTek Inc.
34
35
36# Copyright (C) 2008 The Android Open Source Project
37#
38# Licensed under the Apache License, Version 2.0 (the "License");
39# you may not use this file except in compliance with the License.
40# You may obtain a copy of the License at
41#
42# http://www.apache.org/licenses/LICENSE-2.0
43#
44# Unless required by applicable law or agreed to in writing, software
45# distributed under the License is distributed on an "AS IS" BASIS,
46# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47# See the License for the specific language governing permissions and
48# limitations under the License.
49
50# Configuration
51BUILD_PATCH := false
52BUILD_WMT_CFG_L2 := false
53BUILD_WMT_CFG_L1 := false
54BUILD_MT6620 := false
55BUILD_MT6628 := false
56BUILD_MT6630 := false
57BUILD_MT6582_CONSYS :=false
58BUILD_MT6571_CONSYS :=false
59BUILD_MT6752_CONSYS :=false
60BUILD_MT6797_CONSYS :=false
61
62ifeq ($(strip $(MTK_COMBO_SUPPORT)), yes)
63
64LOCAL_PATH := $(call my-dir)
65
66cfg_folder := vendor/mediatek/proprietary/hardware/connectivity/combo_tool/cfg_folder
67patch_folder := vendor/mediatek/proprietary/hardware/connectivity/combo_tool/patch_folder
68
69BUILD_PATCH := true
70BUILD_WMT_CFG_L2 := true
71
72ifneq ($(filter MT6620E3,$(MTK_COMBO_CHIP)),)
73 BUILD_MT6620 := true
74 BUILD_WMT_CFG_L1 := true
75endif
76
77ifneq ($(filter MT6620,$(MTK_COMBO_CHIP)),)
78 BUILD_MT6620 := true
79 BUILD_WMT_CFG_L1 := true
80endif
81
82ifneq ($(filter MT6628,$(MTK_COMBO_CHIP)),)
83 BUILD_MT6628 := true
84 BUILD_WMT_CFG_L1 := true
85endif
86
87ifneq ($(filter MT6630,$(MTK_COMBO_CHIP)),)
88 BUILD_MT6630 := true
89 BUILD_WMT_CFG_L1 := true
90endif
91
92ifneq ($(filter CONSYS_6572,$(MTK_COMBO_CHIP)),)
93 BUILD_MT6582_CONSYS := true
94endif
95
96ifneq ($(filter CONSYS_6582,$(MTK_COMBO_CHIP)),)
97 BUILD_MT6582_CONSYS := true
98endif
99
100ifneq ($(filter CONSYS_6592,$(MTK_COMBO_CHIP)),)
101 BUILD_MT6582_CONSYS := true
102endif
103
104ifneq ($(filter CONSYS_6571,$(MTK_COMBO_CHIP)),)
105 BUILD_MT6571_CONSYS := true
106endif
107
108ifneq ($(filter CONSYS_8127,$(MTK_COMBO_CHIP)),)
109 BUILD_MT6571_CONSYS := true
110endif
111
112ifneq ($(filter CONSYS_6752,$(MTK_COMBO_CHIP)),)
113 BUILD_MT6752_CONSYS := true
114endif
115
116ifneq ($(filter CONSYS_6755,$(MTK_COMBO_CHIP)),)
117 BUILD_MT6752_CONSYS := true
118endif
119
120ifneq ($(filter CONSYS_6797,$(MTK_COMBO_CHIP)),)
121 BUILD_MT6797_CONSYS := true
122endif
123
124ifneq ($(filter CONSYS_6735,$(MTK_COMBO_CHIP)),)
125 BUILD_MT6752_CONSYS := true
126endif
127
128ifneq ($(filter CONSYS_6580,$(MTK_COMBO_CHIP)),)
129 BUILD_MT6752_CONSYS := true
130endif
131
132ifneq ($(filter CONSYS_8163,$(MTK_COMBO_CHIP)),)
133 BUILD_MT6752_CONSYS := true
134endif
135
136ifneq ($(filter CONSYS_7623,$(MTK_COMBO_CHIP)),)
137 BUILD_MT6752_CONSYS := true
138endif
139
140##### INSTALL WMT.CFG FOR COMBO CONFIG #####
141ifeq ($(BUILD_WMT_CFG_L1), true)
142PRODUCT_COPY_FILES += $(cfg_folder)/WMT.cfg:system/etc/firmware/WMT.cfg
143endif
144
145ifeq ($(BUILD_MT6620), true)
146ifneq ($(filter mt6620_ant_m1,$(CUSTOM_HAL_ANT)),)
147 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m1.cfg:system/etc/firmware/mt6620_ant_m1.cfg
148endif
149
150ifneq ($(filter mt6620_ant_m2,$(CUSTOM_HAL_ANT)),)
151 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m2.cfg:system/etc/firmware/mt6620_ant_m2.cfg
152endif
153
154ifneq ($(filter mt6620_ant_m3,$(CUSTOM_HAL_ANT)),)
155 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m3.cfg:system/etc/firmware/mt6620_ant_m3.cfg
156endif
157
158ifneq ($(filter mt6620_ant_m4,$(CUSTOM_HAL_ANT)),)
159 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m4.cfg:system/etc/firmware/mt6620_ant_m4.cfg
160endif
161
162ifneq ($(filter mt6620_ant_m5,$(CUSTOM_HAL_ANT)),)
163 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m5.cfg:system/etc/firmware/mt6620_ant_m5.cfg
164endif
165
166ifneq ($(filter mt6620_ant_m6,$(CUSTOM_HAL_ANT)),)
167 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m6.cfg:system/etc/firmware/mt6620_ant_m6.cfg
168endif
169
170ifneq ($(filter mt6620_ant_m7,$(CUSTOM_HAL_ANT)),)
171 PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m7.cfg:system/etc/firmware/mt6620_ant_m7.cfg
172endif
173
174 PRODUCT_COPY_FILES += $(patch_folder)/mt6620_patch_e3_0_hdr.bin:system/etc/firmware/mt6620_patch_e3_0_hdr.bin
175 PRODUCT_COPY_FILES += $(patch_folder)/mt6620_patch_e3_1_hdr.bin:system/etc/firmware/mt6620_patch_e3_1_hdr.bin
176 PRODUCT_COPY_FILES += $(patch_folder)/mt6620_patch_e3_2_hdr.bin:system/etc/firmware/mt6620_patch_e3_2_hdr.bin
177 PRODUCT_COPY_FILES += $(patch_folder)/mt6620_patch_e3_3_hdr.bin:system/etc/firmware/mt6620_patch_e3_3_hdr.bin
178
179endif
180
181
182ifeq ($(BUILD_MT6628), true)
183
184ifneq ($(filter mt6628_ant_m1,$(CUSTOM_HAL_ANT)),)
185 PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m1.cfg:system/etc/firmware/mt6628_ant_m1.cfg
186endif
187
188ifneq ($(filter mt6628_ant_m2,$(CUSTOM_HAL_ANT)),)
189 PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m2.cfg:system/etc/firmware/mt6628_ant_m2.cfg
190endif
191
192ifneq ($(filter mt6628_ant_m3,$(CUSTOM_HAL_ANT)),)
193 PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m3.cfg:system/etc/firmware/mt6628_ant_m3.cfg
194endif
195
196ifneq ($(filter mt6628_ant_m4,$(CUSTOM_HAL_ANT)),)
197 PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m4.cfg:system/etc/firmware/mt6628_ant_m4.cfg
198endif
199
200 PRODUCT_COPY_FILES += $(patch_folder)/mt6628_patch_e1_hdr.bin:system/etc/firmware/mt6628_patch_e1_hdr.bin
201
202 PRODUCT_COPY_FILES += $(patch_folder)/mt6628_patch_e2_0_hdr.bin:system/etc/firmware/mt6628_patch_e2_0_hdr.bin
203 PRODUCT_COPY_FILES += $(patch_folder)/mt6628_patch_e2_1_hdr.bin:system/etc/firmware/mt6628_patch_e2_1_hdr.bin
204
205endif
206
207ifeq ($(BUILD_MT6630), true)
208
209ifneq ($(filter mt6630_ant_m1,$(CUSTOM_HAL_ANT)),)
210 PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m1.cfg:system/etc/firmware/mt6630_ant_m1.cfg
211endif
212
213ifneq ($(filter mt6630_ant_m2,$(CUSTOM_HAL_ANT)),)
214 PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m2.cfg:system/etc/firmware/mt6630_ant_m2.cfg
215endif
216
217ifneq ($(filter mt6630_ant_m3,$(CUSTOM_HAL_ANT)),)
218 PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m3.cfg:system/etc/firmware/mt6630_ant_m3.cfg
219endif
220
221ifneq ($(filter mt6630_ant_m4,$(CUSTOM_HAL_ANT)),)
222 PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m4.cfg:system/etc/firmware/mt6630_ant_m4.cfg
223endif
224
225 PRODUCT_COPY_FILES += $(patch_folder)/mt6630_patch_e1_hdr.bin:system/etc/firmware/mt6630_patch_e1_hdr.bin
226
227 PRODUCT_COPY_FILES += $(patch_folder)/mt6630_patch_e2_hdr.bin:system/etc/firmware/mt6630_patch_e2_hdr.bin
228
229 PRODUCT_COPY_FILES += $(patch_folder)/mt6630_patch_e3_0_hdr.bin:system/etc/firmware/mt6630_patch_e3_0_hdr.bin
230 PRODUCT_COPY_FILES += $(patch_folder)/mt6630_patch_e3_1_hdr.bin:system/etc/firmware/mt6630_patch_e3_1_hdr.bin
231endif
232
233
234ifeq ($(BUILD_MT6582_CONSYS), true)
235
236 PRODUCT_COPY_FILES += $(patch_folder)/ROMv1_patch_1_0_hdr.bin:system/etc/firmware/ROMv1_patch_1_0_hdr.bin
237 PRODUCT_COPY_FILES += $(patch_folder)/ROMv1_patch_1_1_hdr.bin:system/etc/firmware/ROMv1_patch_1_1_hdr.bin
238
239endif
240
241ifeq ($(BUILD_MT6571_CONSYS), true)
242
243 PRODUCT_COPY_FILES += $(patch_folder)/ROMv2_patch_1_0_hdr.bin:system/etc/firmware/ROMv2_patch_1_0_hdr.bin
244 PRODUCT_COPY_FILES += $(patch_folder)/ROMv2_patch_1_1_hdr.bin:system/etc/firmware/ROMv2_patch_1_1_hdr.bin
245
246endif
247
248ifeq ($(BUILD_MT6752_CONSYS), true)
249
250 PRODUCT_COPY_FILES += $(patch_folder)/ROMv2_lm_patch_1_0_hdr.bin:system/etc/firmware/ROMv2_lm_patch_1_0_hdr.bin
251 PRODUCT_COPY_FILES += $(patch_folder)/ROMv2_lm_patch_1_1_hdr.bin:system/etc/firmware/ROMv2_lm_patch_1_1_hdr.bin
252
253endif
254
255ifeq ($(BUILD_MT6797_CONSYS), true)
256
257 PRODUCT_COPY_FILES += $(patch_folder)/ROMv3_patch_1_0_hdr.bin:system/etc/firmware/ROMv3_patch_1_0_hdr.bin
258 PRODUCT_COPY_FILES += $(patch_folder)/ROMv3_patch_1_1_hdr.bin:system/etc/firmware/ROMv3_patch_1_1_hdr.bin
259 PRODUCT_COPY_FILES += $(patch_folder)/MNL.bin:system/etc/firmware/MNL.bin
260
261endif
262
263ifneq ($(wildcard device/mediatek/$(MTK_TARGET_PROJECT)/WMT_SOC.cfg),)
264 PRODUCT_COPY_FILES += device/mediatek/$(MTK_TARGET_PROJECT)/WMT_SOC.cfg:system/etc/firmware/WMT_SOC.cfg
265else
266 ifneq ($(wildcard device/mediatek/$(MTK_PLATFORM_DIR)/WMT_SOC.cfg),)
267 PRODUCT_COPY_FILES += device/mediatek/$(MTK_PLATFORM_DIR)/WMT_SOC.cfg:system/etc/firmware/WMT_SOC.cfg
268 else
269 PRODUCT_COPY_FILES += device/mediatek/common/WMT_SOC.cfg:system/etc/firmware/WMT_SOC.cfg
270 endif
271endif
272
273# PRODUCT_PACKAGES part
274
275 PRODUCT_PACKAGES += 6620_launcher \
276 6620_wmt_concurrency \
277 6620_wmt_lpbk \
278 wmt_loader \
279 stp_dump3
280
281
282PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.combo.chipid=-1
283PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.fwlog.status=no
284PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.dynamic.dump=0
285PRODUCT_PROPERTY_OVERRIDES += service.wcn.driver.ready=no
286PRODUCT_PROPERTY_OVERRIDES += service.wcn.coredump.mode=2
287
288endif