rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | # 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 |
| 51 | BUILD_PATCH := false |
| 52 | BUILD_WMT_CFG_L2 := false |
| 53 | BUILD_WMT_CFG_L1 := false |
| 54 | BUILD_MT6620 := false |
| 55 | BUILD_MT6628 := false |
| 56 | BUILD_MT6630 := false |
| 57 | BUILD_MT6582_CONSYS :=false |
| 58 | BUILD_MT6571_CONSYS :=false |
| 59 | BUILD_MT6752_CONSYS :=false |
| 60 | BUILD_MT6797_CONSYS :=false |
| 61 | |
| 62 | ifeq ($(strip $(MTK_COMBO_SUPPORT)), yes) |
| 63 | |
| 64 | LOCAL_PATH := $(call my-dir) |
| 65 | |
| 66 | cfg_folder := vendor/mediatek/proprietary/hardware/connectivity/combo_tool/cfg_folder |
| 67 | patch_folder := vendor/mediatek/proprietary/hardware/connectivity/combo_tool/patch_folder |
| 68 | |
| 69 | BUILD_PATCH := true |
| 70 | BUILD_WMT_CFG_L2 := true |
| 71 | |
| 72 | ifneq ($(filter MT6620E3,$(MTK_COMBO_CHIP)),) |
| 73 | BUILD_MT6620 := true |
| 74 | BUILD_WMT_CFG_L1 := true |
| 75 | endif |
| 76 | |
| 77 | ifneq ($(filter MT6620,$(MTK_COMBO_CHIP)),) |
| 78 | BUILD_MT6620 := true |
| 79 | BUILD_WMT_CFG_L1 := true |
| 80 | endif |
| 81 | |
| 82 | ifneq ($(filter MT6628,$(MTK_COMBO_CHIP)),) |
| 83 | BUILD_MT6628 := true |
| 84 | BUILD_WMT_CFG_L1 := true |
| 85 | endif |
| 86 | |
| 87 | ifneq ($(filter MT6630,$(MTK_COMBO_CHIP)),) |
| 88 | BUILD_MT6630 := true |
| 89 | BUILD_WMT_CFG_L1 := true |
| 90 | endif |
| 91 | |
| 92 | ifneq ($(filter CONSYS_6572,$(MTK_COMBO_CHIP)),) |
| 93 | BUILD_MT6582_CONSYS := true |
| 94 | endif |
| 95 | |
| 96 | ifneq ($(filter CONSYS_6582,$(MTK_COMBO_CHIP)),) |
| 97 | BUILD_MT6582_CONSYS := true |
| 98 | endif |
| 99 | |
| 100 | ifneq ($(filter CONSYS_6592,$(MTK_COMBO_CHIP)),) |
| 101 | BUILD_MT6582_CONSYS := true |
| 102 | endif |
| 103 | |
| 104 | ifneq ($(filter CONSYS_6571,$(MTK_COMBO_CHIP)),) |
| 105 | BUILD_MT6571_CONSYS := true |
| 106 | endif |
| 107 | |
| 108 | ifneq ($(filter CONSYS_8127,$(MTK_COMBO_CHIP)),) |
| 109 | BUILD_MT6571_CONSYS := true |
| 110 | endif |
| 111 | |
| 112 | ifneq ($(filter CONSYS_6752,$(MTK_COMBO_CHIP)),) |
| 113 | BUILD_MT6752_CONSYS := true |
| 114 | endif |
| 115 | |
| 116 | ifneq ($(filter CONSYS_6755,$(MTK_COMBO_CHIP)),) |
| 117 | BUILD_MT6752_CONSYS := true |
| 118 | endif |
| 119 | |
| 120 | ifneq ($(filter CONSYS_6797,$(MTK_COMBO_CHIP)),) |
| 121 | BUILD_MT6797_CONSYS := true |
| 122 | endif |
| 123 | |
| 124 | ifneq ($(filter CONSYS_6735,$(MTK_COMBO_CHIP)),) |
| 125 | BUILD_MT6752_CONSYS := true |
| 126 | endif |
| 127 | |
| 128 | ifneq ($(filter CONSYS_6580,$(MTK_COMBO_CHIP)),) |
| 129 | BUILD_MT6752_CONSYS := true |
| 130 | endif |
| 131 | |
| 132 | ifneq ($(filter CONSYS_8163,$(MTK_COMBO_CHIP)),) |
| 133 | BUILD_MT6752_CONSYS := true |
| 134 | endif |
| 135 | |
| 136 | ifneq ($(filter CONSYS_7623,$(MTK_COMBO_CHIP)),) |
| 137 | BUILD_MT6752_CONSYS := true |
| 138 | endif |
| 139 | |
| 140 | ##### INSTALL WMT.CFG FOR COMBO CONFIG ##### |
| 141 | ifeq ($(BUILD_WMT_CFG_L1), true) |
| 142 | PRODUCT_COPY_FILES += $(cfg_folder)/WMT.cfg:system/etc/firmware/WMT.cfg |
| 143 | endif |
| 144 | |
| 145 | ifeq ($(BUILD_MT6620), true) |
| 146 | ifneq ($(filter mt6620_ant_m1,$(CUSTOM_HAL_ANT)),) |
| 147 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m1.cfg:system/etc/firmware/mt6620_ant_m1.cfg |
| 148 | endif |
| 149 | |
| 150 | ifneq ($(filter mt6620_ant_m2,$(CUSTOM_HAL_ANT)),) |
| 151 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m2.cfg:system/etc/firmware/mt6620_ant_m2.cfg |
| 152 | endif |
| 153 | |
| 154 | ifneq ($(filter mt6620_ant_m3,$(CUSTOM_HAL_ANT)),) |
| 155 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m3.cfg:system/etc/firmware/mt6620_ant_m3.cfg |
| 156 | endif |
| 157 | |
| 158 | ifneq ($(filter mt6620_ant_m4,$(CUSTOM_HAL_ANT)),) |
| 159 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m4.cfg:system/etc/firmware/mt6620_ant_m4.cfg |
| 160 | endif |
| 161 | |
| 162 | ifneq ($(filter mt6620_ant_m5,$(CUSTOM_HAL_ANT)),) |
| 163 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m5.cfg:system/etc/firmware/mt6620_ant_m5.cfg |
| 164 | endif |
| 165 | |
| 166 | ifneq ($(filter mt6620_ant_m6,$(CUSTOM_HAL_ANT)),) |
| 167 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m6.cfg:system/etc/firmware/mt6620_ant_m6.cfg |
| 168 | endif |
| 169 | |
| 170 | ifneq ($(filter mt6620_ant_m7,$(CUSTOM_HAL_ANT)),) |
| 171 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6620_ant_m7.cfg:system/etc/firmware/mt6620_ant_m7.cfg |
| 172 | endif |
| 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 | |
| 179 | endif |
| 180 | |
| 181 | |
| 182 | ifeq ($(BUILD_MT6628), true) |
| 183 | |
| 184 | ifneq ($(filter mt6628_ant_m1,$(CUSTOM_HAL_ANT)),) |
| 185 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m1.cfg:system/etc/firmware/mt6628_ant_m1.cfg |
| 186 | endif |
| 187 | |
| 188 | ifneq ($(filter mt6628_ant_m2,$(CUSTOM_HAL_ANT)),) |
| 189 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m2.cfg:system/etc/firmware/mt6628_ant_m2.cfg |
| 190 | endif |
| 191 | |
| 192 | ifneq ($(filter mt6628_ant_m3,$(CUSTOM_HAL_ANT)),) |
| 193 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m3.cfg:system/etc/firmware/mt6628_ant_m3.cfg |
| 194 | endif |
| 195 | |
| 196 | ifneq ($(filter mt6628_ant_m4,$(CUSTOM_HAL_ANT)),) |
| 197 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6628_ant_m4.cfg:system/etc/firmware/mt6628_ant_m4.cfg |
| 198 | endif |
| 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 | |
| 205 | endif |
| 206 | |
| 207 | ifeq ($(BUILD_MT6630), true) |
| 208 | |
| 209 | ifneq ($(filter mt6630_ant_m1,$(CUSTOM_HAL_ANT)),) |
| 210 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m1.cfg:system/etc/firmware/mt6630_ant_m1.cfg |
| 211 | endif |
| 212 | |
| 213 | ifneq ($(filter mt6630_ant_m2,$(CUSTOM_HAL_ANT)),) |
| 214 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m2.cfg:system/etc/firmware/mt6630_ant_m2.cfg |
| 215 | endif |
| 216 | |
| 217 | ifneq ($(filter mt6630_ant_m3,$(CUSTOM_HAL_ANT)),) |
| 218 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m3.cfg:system/etc/firmware/mt6630_ant_m3.cfg |
| 219 | endif |
| 220 | |
| 221 | ifneq ($(filter mt6630_ant_m4,$(CUSTOM_HAL_ANT)),) |
| 222 | PRODUCT_COPY_FILES += $(cfg_folder)/mt6630_ant_m4.cfg:system/etc/firmware/mt6630_ant_m4.cfg |
| 223 | endif |
| 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 |
| 231 | endif |
| 232 | |
| 233 | |
| 234 | ifeq ($(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 | |
| 239 | endif |
| 240 | |
| 241 | ifeq ($(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 | |
| 246 | endif |
| 247 | |
| 248 | ifeq ($(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 | |
| 253 | endif |
| 254 | |
| 255 | ifeq ($(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 | |
| 261 | endif |
| 262 | |
| 263 | ifneq ($(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 |
| 265 | else |
| 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 |
| 271 | endif |
| 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 | |
| 282 | PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.combo.chipid=-1 |
| 283 | PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.fwlog.status=no |
| 284 | PRODUCT_PROPERTY_OVERRIDES += persist.mtk.wcn.dynamic.dump=0 |
| 285 | PRODUCT_PROPERTY_OVERRIDES += service.wcn.driver.ready=no |
| 286 | PRODUCT_PROPERTY_OVERRIDES += service.wcn.coredump.mode=2 |
| 287 | |
| 288 | endif |