Procházet zdrojové kódy

securemsm-kernel: Enable/Disable DLKM

Control DLKM using TARGET_ENABLE_DLKM.
During early bring when most of the modules are not ready
either due to missing header or other reasons. Its good idea
to keep it disabled until its fully ready.

Change-Id: I421f7329cd84d53b3233cea96b0e1920de9d39ea
Divya Sharma před 2 roky
rodič
revize
6d6aad924f
4 změnil soubory, kde provedl 37 přidání a 8 odebrání
  1. 13 6
      Android.mk
  2. 0 2
      Kbuild
  3. 11 0
      securemsm_kernel_product_board.mk
  4. 13 0
      securemsm_kernel_vendor_board.mk

+ 13 - 6
Android.mk

@@ -1,9 +1,16 @@
-# Android makefile for audio kernel modules
+# Android makefile for securemsm kernel modules
+
+ENABLE_SECUREMSM_DLKM := false
+ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
+ifeq ($(TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE), true)
+ENABLE_SECUREMSM_DLKM := true
+endif
+else
+ENABLE_SECUREMSM_DLKM := true
+endif
+
+ifeq ($(ENABLE_SECUREMSM_DLKM), true)
 
 
-#Target based of taro does not need these DLKM's as they are present as kernel drivers
-#But the project is mapped for DEV SP due to dependency on smcinvoke_kernel_headers
-#Hence preventing the DLKM's to be part of the taro based DEV SP
-ifneq ($(TARGET_BOARD_PLATFORM), taro)
 LOCAL_PATH := $(call my-dir)
 LOCAL_PATH := $(call my-dir)
 DLKM_DIR := $(TOP)/device/qcom/common/dlkm
 DLKM_DIR := $(TOP)/device/qcom/common/dlkm
 
 
@@ -115,4 +122,4 @@ LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 endif #TARGET_BOARD_AUTO
 endif #TARGET_BOARD_AUTO
 ###################################################
 ###################################################
-endif
+endif #COMPILE_SECUREMSM_DLKM check

+ 0 - 2
Kbuild

@@ -1,4 +1,3 @@
-ifneq ($(TARGET_BOARD_PLATFORM ), taro)
 LINUXINCLUDE += -I$(SSG_MODULE_ROOT)/ \
 LINUXINCLUDE += -I$(SSG_MODULE_ROOT)/ \
                 -I$(SSG_MODULE_ROOT)/linux/ \
                 -I$(SSG_MODULE_ROOT)/linux/ \
                 -include $(SSG_MODULE_ROOT)/config/sec-kernel_defconfig.h
                 -include $(SSG_MODULE_ROOT)/config/sec-kernel_defconfig.h
@@ -33,4 +32,3 @@ hdcp_qseecom_dlkm-objs := hdcp/hdcp_qseecom.o
 
 
 obj-$(CONFIG_HW_RANDOM_MSM_LEGACY) += qrng_dlkm.o
 obj-$(CONFIG_HW_RANDOM_MSM_LEGACY) += qrng_dlkm.o
 qrng_dlkm-objs := qrng/msm_rng.o
 qrng_dlkm-objs := qrng/msm_rng.o
-endif

+ 11 - 0
securemsm_kernel_product_board.mk

@@ -1,5 +1,15 @@
 #Build ssg kernel driver
 #Build ssg kernel driver
+ENABLE_SECUREMSM_DLKM := false
+ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
+ifeq ($(TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE), true)
+ENABLE_SECUREMSM_DLKM := true
+endif
+else
+ENABLE_SECUREMSM_DLKM := true
+endif
 
 
+ifeq ($(ENABLE_SECUREMSM_DLKM), true)
+PRODUCT_PACKAGES += smcinvoke_dlkm.ko
 PRODUCT_PACKAGES += tz_log_dlkm.ko
 PRODUCT_PACKAGES += tz_log_dlkm.ko
 PRODUCT_PACKAGES += qcedev-mod_dlkm.ko
 PRODUCT_PACKAGES += qcedev-mod_dlkm.ko
 PRODUCT_PACKAGES += qce50_dlkm.ko
 PRODUCT_PACKAGES += qce50_dlkm.ko
@@ -12,5 +22,6 @@ else
 PRODUCT_PACKAGES += smcinvoke_dlkm.ko
 PRODUCT_PACKAGES += smcinvoke_dlkm.ko
 endif #TARGET_BOARD_AUTO
 endif #TARGET_BOARD_AUTO
 
 
+endif #ENABLE_SECUREMSM_DLKM
 
 
 
 

+ 13 - 0
securemsm_kernel_vendor_board.mk

@@ -1,3 +1,15 @@
+ENABLE_SECUREMSM_DLKM := false
+
+ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
+ifeq ($(TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE), true)
+ENABLE_SECUREMSM_DLKM := true
+endif
+else
+ENABLE_SECUREMSM_DLKM := true
+endif
+
+
+ifeq ($(ENABLE_SECUREMSM_DLKM), true)
 BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/tz_log_dlkm.ko \
 BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/tz_log_dlkm.ko \
       $(KERNEL_MODULES_OUT)/qcedev-mod_dlkm.ko \
       $(KERNEL_MODULES_OUT)/qcedev-mod_dlkm.ko \
       $(KERNEL_MODULES_OUT)/qcrypto-msm_dlkm.ko \
       $(KERNEL_MODULES_OUT)/qcrypto-msm_dlkm.ko \
@@ -17,3 +29,4 @@ BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/smcinvoke_dlkm.ko
 BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/smcinvoke_dlkm.ko
 BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/smcinvoke_dlkm.ko
 BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD += $(KERNEL_MODULES_OUT)/smcinvoke_dlkm.ko
 BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD += $(KERNEL_MODULES_OUT)/smcinvoke_dlkm.ko
 endif
 endif
+endif #ENABLE_SECUREMSM_DLKM