Android.mk 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. #
  2. # Copyright (C) 2018-2021 ArrowOS
  3. #
  4. # SPDX-License-Identifier: Apache-2.0
  5. #
  6. LOCAL_PATH := $(call my-dir)
  7. ifeq ($(TARGET_DEVICE),vayu)
  8. subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
  9. $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
  10. # A/B builds require us to create the mount points at compile time.
  11. # Just creating it for all cases since it does not hurt.
  12. FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
  13. $(FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
  14. @echo "Creating $(FIRMWARE_MOUNT_POINT)"
  15. @mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
  16. BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware
  17. $(BT_FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
  18. @echo "Creating $(BT_FIRMWARE_MOUNT_POINT)"
  19. @mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware
  20. DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp
  21. $(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
  22. @echo "Creating $(DSP_MOUNT_POINT)"
  23. @mkdir -p $(TARGET_OUT_VENDOR)/dsp
  24. RFS_APQ_GNSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/apq/gnss/
  25. $(RFS_APQ_GNSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
  26. @echo "Creating RFS APQ GNSS folder structure: $@"
  27. @rm -rf $@/*
  28. @mkdir -p $(dir $@)/readonly/vendor
  29. $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
  30. $(hide) ln -sf /mnt/vendor/persist/rfs/apq/gnss $@/readwrite
  31. $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
  32. $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
  33. $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
  34. $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
  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 /data/vendor/tombstones/rfs/lpass $@/ramdumps
  41. $(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite
  42. $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
  43. $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
  44. $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
  45. $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
  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 /data/vendor/tombstones/rfs/cdsp $@/ramdumps
  52. $(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite
  53. $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
  54. $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
  55. $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
  56. $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
  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
  62. $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
  63. $(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite
  64. $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
  65. $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
  66. $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
  67. $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
  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. RFS_MDM_TN_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/tn/
  80. $(RFS_MDM_TN_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
  81. @echo "Creating RFS MDM TN folder structure: $@"
  82. @rm -rf $@/*
  83. @mkdir -p $(dir $@)/readonly/vendor
  84. $(hide) ln -sf /data/vendor/tombstones/rfs/tn $@/ramdumps
  85. $(hide) ln -sf /mnt/vendor/persist/rfs/mdm/tn $@/readwrite
  86. $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
  87. $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
  88. $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
  89. $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
  90. EGL_32_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libEGL_adreno.so
  91. $(EGL_32_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  92. @echo "Creating 32-bit EGL symlink: $@"
  93. @mkdir -p $(dir $@)
  94. $(hide) ln -sf egl/$(notdir $@) $@
  95. GLESv2_32_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libGLESv2_adreno.so
  96. $(GLESv2_32_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  97. @echo "Creating 32-bit GLESv2 symlink: $@"
  98. @mkdir -p $(dir $@)
  99. $(hide) ln -sf egl/$(notdir $@) $@
  100. Q3DTOOLS_32_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libq3dtools_adreno.so
  101. $(Q3DTOOLS_32_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  102. @echo "Creating 32-bit Q3D Tools symlink: $@"
  103. @mkdir -p $(dir $@)
  104. $(hide) ln -sf egl/$(notdir $@) $@
  105. EGL_64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libEGL_adreno.so
  106. $(EGL_64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  107. @echo "Creating 64-bit EGL symlink: $@"
  108. @mkdir -p $(dir $@)
  109. $(hide) ln -sf egl/$(notdir $@) $@
  110. GLESv2_64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libGLESv2_adreno.so
  111. $(GLESv2_64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  112. @echo "Creating 64-bit GLESv2 symlink: $@"
  113. @mkdir -p $(dir $@)
  114. $(hide) ln -sf egl/$(notdir $@) $@
  115. Q3DTOOLS_64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libq3dtools_adreno.so
  116. $(Q3DTOOLS_64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
  117. @echo "Creating 64-bit Q3DTools symlink: $@"
  118. @mkdir -p $(dir $@)
  119. $(hide) ln -sf egl/$(notdir $@) $@
  120. IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
  121. IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
  122. $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
  123. @echo "IMS lib link: $@"
  124. @mkdir -p $(dir $@)
  125. @rm -rf $@
  126. $(hide) ln -sf /system/system_ext/lib64/$(notdir $@) $@
  127. WIFI_FIRMWARE_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/
  128. $(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
  129. @echo "Creating wifi firmware symlinks: $@"
  130. mkdir -p $@
  131. $(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini
  132. $(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin
  133. ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT)
  134. ALL_DEFAULT_INSTALLED_MODULES += $(RFS_APQ_GNSS_SYMLINKS) $(RFS_MDM_ADSP_SYMLINKS) $(RFS_MDM_CDSP_SYMLINKS)
  135. ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_MPSS_SYMLINKS) $(RFS_MDM_SLPI_SYMLINKS) $(RFS_MDM_TN_SYMLINKS)
  136. ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS)
  137. ALL_DEFAULT_INSTALLED_MODULES += $(EGL_32_SYMLINK) $(GLESv2_32_SYMLINK) $(Q3DTOOLS_32_SYMLINK)
  138. ALL_DEFAULT_INSTALLED_MODULES += $(EGL_64_SYMLINK) $(GLESv2_64_SYMLINK) $(Q3DTOOLS_64_SYMLINK)
  139. ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
  140. ALL_DEFAULT_INSTALLED_MODULES += $(WIFI_FIRMWARE_SYMLINKS)
  141. endif