forked from aoleary/android_device_lge_g4-common-LOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
246 lines (193 loc) · 8.5 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#
# Copyright 2015 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
ifneq ($(filter g4 ls991_usu f500_usu h810_usu h811 h812_usu h815 h815_usu h818_usu h819_usu us991_usu vs986_usu, $(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
ADSP_IMAGES := \
adsp.b00 adsp.b01 adsp.b02 adsp.b03 adsp.b04 adsp.b05 adsp.b06 adsp.b07 \
adsp.b08 adsp.b09 adsp.b10 adsp.b11 adsp.b12 adsp.b13 adsp.b14 adsp.b15 adsp.mdt
ADSP_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(ADSP_IMAGES)))
$(ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "ADSP firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(ADSP_SYMLINKS)
CPE_IMAGES := \
cpe.b00 cpe.b01 cpe.b02 cpe.b03 cpe.b04 cpe.b05 \
cpe.b06 cpe.b07 cpe.b08 cpe.b09 cpe.b10 cpe.b11 \
cpe.b12 cpe.b13 cpe.b14 cpe.b15 cpe.b16 cpe.b17 \
cpe.b18 cpe.b19 cpe.b20 cpe.b21 cpe.b22 cpe.mdt
CPE_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(CPE_IMAGES)))
$(CPE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "CPE firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(CPE_SYMLINKS)
DXHDCP2_IMAGES := \
dxhdcp2.b00 dxhdcp2.b01 dxhdcp2.b02 dxhdcp2.b03 dxhdcp2.mdt
DXHDCP2_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(DXHDCP2_IMAGES))
$(DXHDCP2_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "DxHDCP2 firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(DXHDCP2_SYMLINKS)
KEYMASTER_IMAGES := \
keymaste.b00 keymaste.b01 keymaste.b02 keymaste.b03 keymaste.mdt
KEYMASTER_SYMLINKS :=$(addprefix $(TARGET_OUT_ETC)/firmware/,$(KEYMASTER_IMAGES))
$(KEYMASTER_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Keymaster firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(KEYMASTER_SYMLINKS)
MLSERVER_IMAGES := \
mlserver.b00 mlserver.b01 mlserver.b02 mlserver.b03 mlserver.mdt
MLSERVER_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(MLSERVER_IMAGES))
$(MLSERVER_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "mlserver firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(MLSERVERAPP_SYMLINKS)
MODEM_IMAGES := \
mba.b00 mba.mdt modem.b00 modem.b01 modem.b02 modem.b03 modem.b04 modem.b05 \
modem.b06 modem.b07 modem.b08 modem.b09 modem.b10 modem.b11 modem.b12 modem.b13 \
modem.b14 modem.b15 modem.b16 modem.b17 modem.b18 modem.b19 modem.b20 modem.b21 \
modem.b22 modem.b23 modem.b24 modem.b25 modem.b26 modem.b27 modem.b28 modem.mdt
MODEM_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(MODEM_IMAGES)))
$(MODEM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Modem firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(MODEM_SYMLINKS)
SECUREKS_IMAGES := \
secureks.b00 secureks.b01 secureks.b02 secureks.b03 secureks.mdt
SECUREKS_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(SECUREKS_IMAGES))
$(SECUREKS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "secureks firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(SECUREKS_SYMLINKS)
SECUREMM_IMAGES := \
securemm.b00 securemm.b01 securemm.b02 securemm.b03 securemm.mdt
SECUREMM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(SECUREMM_IMAGES))
$(SECUREMM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "securemm firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(SECUREMM_SYMLINKS)
TQS_IMAGES := \
tqs.b00 tqs.b01 tqs.b02 tqs.b03 tqs.mdt
TQS_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(TQS_IMAGES))
$(TQS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "tqs firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(call vfatfilename,$(notdir $@)) $@
ALL_DEFAULT_INSTALLED_MODULES += $(TQS_SYMLINKS)
WCD9320_IMAGES := \
wcd9320_anc.bin wcd9320_mad_audio.bin wcd9320_mbhc.bin
WCD9320_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/wcd9320/,$(WCD9320_IMAGES))
$(WCD9320_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "wcd9320 firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
tf=$(notdir $@); if [ "$$tf" = "wcd9320_mbhc.bin" ]; then tf="mbhc.bin"; fi; ln -sf /data/misc/audio/$$tf $@
ALL_DEFAULT_INSTALLED_MODULES += $(WCD9320_SYMLINKS)
WIDEVINE_IMAGES := \
widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
WIDEVINE_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(WIDEVINE_IMAGES))
$(WIDEVINE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Widevine firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /persist-lg/firmware/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(WIDEVINE_SYMLINKS)
HASHSTOR_IMAGES := \
hashstor.b00 hashstor.b01 hashstor.b02 hashstor.b03 hashstor.mdt
HASHSTOR_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(HASHSTOR_IMAGES))
$(HASHSTOR_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "hashstor firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(HASHSTOR_SYMLINKS)
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/lpass $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware
RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/modem $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS)
WCNSS_FW := WCNSS_qcom_wlan_nv.bin WCNSS_cfg.dat
WCNSS_FW_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/,$(notdir $(WCNSS_FW)))
$(WCNSS_FW_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS firmware links: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/etc/wifi/$(notdir $@) $@
WCNSS_CFG := WCNSS_qcom_cfg.ini
WCNSS_CFG_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/,$(notdir $(WCNSS_CFG)))
$(WCNSS_CFG_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS configs and firmware links: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/etc/wifi/$(notdir $@) $@
WCNSS_MAC_SYMLINK := $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin
$(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS MAC bin link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /persist/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_CFG_SYMLINKS) $(WCNSS_MAC_SYMLINK) $(WCNSS_FW_SYMLINKS)
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT)/app/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/vendor/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
BT_FIRMWARE := btfw32.tlv btnv32.bin btnv32.b15
BT_FIRMWARE_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(BT_FIRMWARE)))
$(BT_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating BT firmware symlink: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /bt_firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(BT_FIRMWARE_SYMLINKS)
endif