-
Notifications
You must be signed in to change notification settings - Fork 3
/
Android.mk
75 lines (58 loc) · 2.44 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
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# This contains the module build definitions for the hardware-specific
# components for this device.
#
# As much as possible, those components should be built unconditionally,
# with device-specific names to avoid collisions, to avoid device-specific
# bitrot and build breakages. Building a component unconditionally does
# *not* include it on all devices, so it is safe even with hardware-specific
# components.
LOCAL_PATH := $(call my-dir)
ifneq ($(filter a71 m51,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
# A/B builds require us to create the mount points at compile time.
# Just creating it for all cases since it does not hurt.
BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware
DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp
FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
MODEM_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware-modem
$(BT_FIRMWARE_MOUNT_POINT):
@echo "Creating $(BT_FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware
$(DSP_MOUNT_POINT):
@echo "Creating $(DSP_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/dsp
$(FIRMWARE_MOUNT_POINT):
@echo "Creating $(FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
$(MODEM_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
@echo "Creating $(MODEM_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/firmware-modem
ALL_DEFAULT_INSTALLED_MODULES += $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) $(FIRMWARE_MOUNT_POINT) $(MODEM_MOUNT_POINT)
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT)/priv-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_ext/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
WLANMDSP_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlanmdsp.mbn
$(WLANMDSP_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WLANMDSP config ini link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /vendor/firmware_mnt/image/$(notdir $@) $@
WCNSS_MAC_SYMLINK := $(TARGET_OUT_VENDOR)/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 /mnt/vendor/persist/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(WLANMDSP_SYMLINK) $(WCNSS_MAC_SYMLINK)
endif