Android.mk 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Android makefile for securemsm kernel modules
  2. ENABLE_SECUREMSM_DLKM := false
  3. ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
  4. ifeq ($(TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE), true)
  5. ENABLE_SECUREMSM_DLKM := true
  6. endif
  7. else
  8. ENABLE_SECUREMSM_DLKM := true
  9. endif
  10. ifeq ($(ENABLE_SECUREMSM_DLKM), true)
  11. LOCAL_PATH := $(call my-dir)
  12. DLKM_DIR := $(TOP)/device/qcom/common/dlkm
  13. SEC_KERNEL_DIR := $(TOP)/vendor/qcom/opensource/securemsm-kernel
  14. LOCAL_EXPORT_KO_INCLUDE_DIRS := $(LOCAL_PATH)/include/
  15. SSG_SRC_FILES := \
  16. $(wildcard $(LOCAL_PATH)/*) \
  17. $(wildcard $(LOCAL_PATH)/*/*) \
  18. $(wildcard $(LOCAL_PATH)/*/*/*) \
  19. $(wildcard $(LOCAL_PATH)/*/*/*/*)
  20. # This is set once per LOCAL_PATH, not per (kernel) module
  21. KBUILD_OPTIONS := SSG_ROOT=$(SEC_KERNEL_DIR)
  22. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  23. ###################################################
  24. include $(CLEAR_VARS)
  25. # For incremental compilation
  26. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  27. LOCAL_MODULE := sec-module-symvers
  28. LOCAL_MODULE_STEM := Module.symvers
  29. LOCAL_MODULE_KBUILD_NAME := Module.symvers
  30. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  31. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  32. ###################################################
  33. ###################################################
  34. include $(CLEAR_VARS)
  35. #LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  36. LOCAL_MODULE := smcinvoke_dlkm.ko
  37. LOCAL_MODULE_KBUILD_NAME := smcinvoke_dlkm.ko
  38. LOCAL_MODULE_TAGS := optional
  39. LOCAL_MODULE_DEBUG_ENABLE := true
  40. LOCAL_HEADER_LIBRARIES := smcinvoke_kernel_headers
  41. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  42. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  43. ###################################################
  44. ###################################################
  45. include $(CLEAR_VARS)
  46. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  47. LOCAL_MODULE := tz_log_dlkm.ko
  48. LOCAL_MODULE_KBUILD_NAME := tz_log_dlkm.ko
  49. LOCAL_MODULE_TAGS := optional
  50. LOCAL_MODULE_DEBUG_ENABLE := true
  51. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  52. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  53. ###################################################
  54. ###################################################
  55. include $(CLEAR_VARS)
  56. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  57. LOCAL_MODULE := qce50_dlkm.ko
  58. LOCAL_MODULE_KBUILD_NAME := qce50_dlkm.ko
  59. LOCAL_MODULE_TAGS := optional
  60. LOCAL_MODULE_DEBUG_ENABLE := true
  61. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  62. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  63. ###################################################
  64. ###################################################
  65. include $(CLEAR_VARS)
  66. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  67. LOCAL_MODULE := qcedev-mod_dlkm.ko
  68. LOCAL_MODULE_KBUILD_NAME := qcedev-mod_dlkm.ko
  69. LOCAL_MODULE_TAGS := optional
  70. LOCAL_MODULE_DEBUG_ENABLE := true
  71. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  72. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  73. ###################################################
  74. ###################################################
  75. include $(CLEAR_VARS)
  76. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  77. LOCAL_MODULE := qcrypto-msm_dlkm.ko
  78. LOCAL_MODULE_KBUILD_NAME := qcrypto-msm_dlkm.ko
  79. LOCAL_MODULE_TAGS := optional
  80. LOCAL_MODULE_DEBUG_ENABLE := true
  81. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  82. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  83. ###################################################
  84. ###################################################
  85. include $(CLEAR_VARS)
  86. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  87. LOCAL_MODULE := hdcp_qseecom_dlkm.ko
  88. LOCAL_MODULE_KBUILD_NAME := hdcp_qseecom_dlkm.ko
  89. LOCAL_MODULE_TAGS := optional
  90. LOCAL_MODULE_DEBUG_ENABLE := true
  91. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  92. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  93. ###################################################
  94. ###################################################
  95. include $(CLEAR_VARS)
  96. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  97. LOCAL_MODULE := qrng_dlkm.ko
  98. LOCAL_MODULE_KBUILD_NAME := qrng_dlkm.ko
  99. LOCAL_MODULE_TAGS := optional
  100. LOCAL_MODULE_DEBUG_ENABLE := true
  101. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  102. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  103. ###################################################
  104. ###################################################
  105. ifneq (, $(filter true, $(TARGET_ENABLE_QSEECOM) $(TARGET_BOARD_AUTO)))
  106. include $(CLEAR_VARS)
  107. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  108. LOCAL_MODULE := qseecom_dlkm.ko
  109. LOCAL_MODULE_KBUILD_NAME := qseecom_dlkm.ko
  110. LOCAL_MODULE_TAGS := optional
  111. LOCAL_MODULE_DEBUG_ENABLE := true
  112. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  113. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  114. endif #TARGET_ENABLE_QSEECOM OR TARGET_BOARD_AUTO
  115. ###################################################
  116. ###################################################
  117. include $(CLEAR_VARS)
  118. #LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  119. LOCAL_EXPORT_KO_INCLUDE_DIRS := $(LOCAL_PATH)/smmu-proxy/
  120. LOCAL_MODULE := smmu_proxy_dlkm.ko
  121. LOCAL_MODULE_KBUILD_NAME := smmu_proxy_dlkm.ko
  122. LOCAL_MODULE_TAGS := optional
  123. LOCAL_MODULE_DEBUG_ENABLE := true
  124. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  125. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  126. ###################################################
  127. ###################################################
  128. endif #COMPILE_SECUREMSM_DLKM check