Android.mk 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. SSG_SRC_FILES := \
  15. $(wildcard $(LOCAL_PATH)/*) \
  16. $(wildcard $(LOCAL_PATH)/*/*) \
  17. $(wildcard $(LOCAL_PATH)/*/*/*) \
  18. $(wildcard $(LOCAL_PATH)/*/*/*/*)
  19. # This is set once per LOCAL_PATH, not per (kernel) module
  20. KBUILD_OPTIONS := SSG_ROOT=$(SEC_KERNEL_DIR)
  21. KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
  22. ###################################################
  23. include $(CLEAR_VARS)
  24. # For incremental compilation
  25. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  26. LOCAL_MODULE := sec-module-symvers
  27. LOCAL_MODULE_STEM := Module.symvers
  28. LOCAL_MODULE_KBUILD_NAME := Module.symvers
  29. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  30. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  31. ###################################################
  32. ###################################################
  33. ifneq ($(TARGET_BOARD_AUTO),true)
  34. #$(error $(SSG_SRC_FILES))
  35. include $(CLEAR_VARS)
  36. #LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  37. LOCAL_MODULE := smcinvoke_dlkm.ko
  38. LOCAL_MODULE_KBUILD_NAME := smcinvoke_dlkm.ko
  39. LOCAL_MODULE_TAGS := optional
  40. LOCAL_MODULE_DEBUG_ENABLE := true
  41. LOCAL_HEADER_LIBRARIES := smcinvoke_kernel_headers
  42. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  43. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  44. endif #TARGET_BOARD_AUTO
  45. ###################################################
  46. ###################################################
  47. include $(CLEAR_VARS)
  48. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  49. LOCAL_MODULE := tz_log_dlkm.ko
  50. LOCAL_MODULE_KBUILD_NAME := tz_log_dlkm.ko
  51. LOCAL_MODULE_TAGS := optional
  52. LOCAL_MODULE_DEBUG_ENABLE := true
  53. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  54. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  55. ###################################################
  56. ###################################################
  57. include $(CLEAR_VARS)
  58. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  59. LOCAL_MODULE := qce50_dlkm.ko
  60. LOCAL_MODULE_KBUILD_NAME := qce50_dlkm.ko
  61. LOCAL_MODULE_TAGS := optional
  62. LOCAL_MODULE_DEBUG_ENABLE := true
  63. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  64. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  65. ###################################################
  66. ###################################################
  67. include $(CLEAR_VARS)
  68. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  69. LOCAL_MODULE := qcedev-mod_dlkm.ko
  70. LOCAL_MODULE_KBUILD_NAME := qcedev-mod_dlkm.ko
  71. LOCAL_MODULE_TAGS := optional
  72. LOCAL_MODULE_DEBUG_ENABLE := true
  73. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  74. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  75. ###################################################
  76. ###################################################
  77. include $(CLEAR_VARS)
  78. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  79. LOCAL_MODULE := qcrypto-msm_dlkm.ko
  80. LOCAL_MODULE_KBUILD_NAME := qcrypto-msm_dlkm.ko
  81. LOCAL_MODULE_TAGS := optional
  82. LOCAL_MODULE_DEBUG_ENABLE := true
  83. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  84. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  85. ###################################################
  86. ###################################################
  87. include $(CLEAR_VARS)
  88. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  89. LOCAL_MODULE := hdcp_qseecom_dlkm.ko
  90. LOCAL_MODULE_KBUILD_NAME := hdcp_qseecom_dlkm.ko
  91. LOCAL_MODULE_TAGS := optional
  92. LOCAL_MODULE_DEBUG_ENABLE := true
  93. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  94. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  95. ###################################################
  96. ###################################################
  97. include $(CLEAR_VARS)
  98. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  99. LOCAL_MODULE := qrng_dlkm.ko
  100. LOCAL_MODULE_KBUILD_NAME := qrng_dlkm.ko
  101. LOCAL_MODULE_TAGS := optional
  102. LOCAL_MODULE_DEBUG_ENABLE := true
  103. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  104. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  105. ###################################################
  106. ###################################################
  107. ifeq ($(TARGET_BOARD_AUTO),true)
  108. include $(CLEAR_VARS)
  109. LOCAL_SRC_FILES := $(SSG_SRC_FILES)
  110. LOCAL_MODULE := qseecom_dlkm.ko
  111. LOCAL_MODULE_KBUILD_NAME := qseecom_dlkm.ko
  112. LOCAL_MODULE_TAGS := optional
  113. LOCAL_MODULE_DEBUG_ENABLE := true
  114. LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
  115. include $(DLKM_DIR)/Build_external_kernelmodule.mk
  116. endif #TARGET_BOARD_AUTO
  117. ###################################################
  118. endif #COMPILE_SECUREMSM_DLKM check