Alexander Martinz | 8663e47 | 2021-08-26 17:27:03 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2021 SHIFT GmbH |
| 3 | # Copyright (C) 2021 The LineageOS Project |
| 4 | # |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # |
| 7 | |
| 8 | LOCAL_PATH := $(call my-dir) |
| 9 | |
| 10 | ifneq ($(filter axolotl,$(TARGET_DEVICE)),) |
| 11 | |
| 12 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
| 13 | |
| 14 | include $(CLEAR_VARS) |
| 15 | |
| 16 | # A/B builds require us to create the mount points at compile time. |
| 17 | # Just creating it for all cases since it does not hurt. |
| 18 | FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt |
| 19 | $(FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) |
| 20 | @echo "Creating $(FIRMWARE_MOUNT_POINT)" |
| 21 | @mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt |
| 22 | |
| 23 | BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware |
| 24 | $(BT_FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) |
| 25 | @echo "Creating $(BT_FIRMWARE_MOUNT_POINT)" |
| 26 | @mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware |
| 27 | |
| 28 | DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp |
| 29 | $(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) |
| 30 | @echo "Creating $(DSP_MOUNT_POINT)" |
| 31 | @mkdir -p $(TARGET_OUT_VENDOR)/dsp |
| 32 | |
| 33 | ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) |
| 34 | |
| 35 | RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/ |
| 36 | $(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 37 | @echo "Creating RFS MSM ADSP folder structure: $@" |
| 38 | @rm -rf $@/* |
| 39 | @mkdir -p $(dir $@)/readonly/vendor |
| 40 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite |
| 41 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared |
| 42 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos |
| 43 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware |
| 44 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware |
| 45 | |
| 46 | RFS_MSM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/cdsp/ |
| 47 | $(RFS_MSM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 48 | @echo "Creating RFS MSM CDSP folder structure: $@" |
| 49 | @rm -rf $@/* |
| 50 | @mkdir -p $(dir $@)/readonly/vendor |
| 51 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite |
| 52 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared |
| 53 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos |
| 54 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware |
| 55 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware |
| 56 | |
| 57 | RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/ |
| 58 | $(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 59 | @echo "Creating RFS MSM MPSS folder structure: $@" |
| 60 | @rm -rf $@/* |
| 61 | @mkdir -p $(dir $@)/readonly/vendor |
Alexander Martinz | 8663e47 | 2021-08-26 17:27:03 +0200 | [diff] [blame] | 62 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite |
| 63 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared |
| 64 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos |
| 65 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware |
| 66 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware |
Alexander Martinz | 8663e47 | 2021-08-26 17:27:03 +0200 | [diff] [blame] | 67 | |
| 68 | RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/ |
| 69 | $(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 70 | @echo "Creating RFS MSM SLPI folder structure: $@" |
| 71 | @rm -rf $@/* |
| 72 | @mkdir -p $(dir $@)/readonly/vendor |
| 73 | $(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps |
| 74 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite |
| 75 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared |
| 76 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos |
| 77 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware |
| 78 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware |
| 79 | |
| 80 | ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) |
| 81 | |
| 82 | WCNSS_INI_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini |
| 83 | $(WCNSS_INI_SYMLINK): $(LOCAL_INSTALLED_MODULE) |
| 84 | @echo "WCNSS config ini link: $@" |
| 85 | @mkdir -p $(dir $@) |
| 86 | @rm -rf $@ |
| 87 | $(hide) ln -sf /vendor/etc/wifi/$(notdir $@) $@ |
| 88 | |
| 89 | WCNSS_MAC_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/wlan_mac.bin |
| 90 | $(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE) |
| 91 | @echo "WCNSS MAC bin link: $@" |
| 92 | @mkdir -p $(dir $@) |
| 93 | @rm -rf $@ |
| 94 | $(hide) ln -sf /mnt/vendor/persist/$(notdir $@) $@ |
| 95 | |
| 96 | ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_INI_SYMLINK) $(WCNSS_MAC_SYMLINK) |
| 97 | |
| 98 | endif |