Browse Source

Securemsm-kernel:hdcp bazel support

Steps to test

1. Create symlink
    cd kernel_platform
    mkdir techpacks
    cd techpacks
    mkdir securemsm-kernel
    cd securemsm-kernel
    ln /vendor/qcom/open-source/securemsm-kernel/* .

2. To compile

   cd kernel_platfrom
   tools/bazel run  --lto=thin //techpacks/securemsm-kernel:pineapple_consolidate_securemsm-kernel_dist

  Test done::
   Able to compile hdcp DLKM and able to install it at

   out/target/product/<target>/dlkm/lib/modules

Change-Id: Ic2ab2656bd6434944583a12f54920e3db6c15f2d
Sarthak Patidar 2 years ago
parent
commit
2b906f4c2f
3 changed files with 21 additions and 1 deletions
  1. 10 1
      BUILD.bazel
  2. 1 0
      pineapple.bzl
  3. 10 0
      securemsm_modules.bzl

+ 10 - 1
BUILD.bazel

@@ -25,7 +25,16 @@ ddk_headers(
     ],
     includes = ["linux"]
 )
-
+ddk_headers(
+    name = "hdcp_qseecom_dlkm",
+    hdrs = glob([
+        "linux/*.h",
+        "linux/misc/qseecom_kernel.h",
+        "hdcp_qseecom/*.h",
+        "config/*.h"
+    ]),
+    includes = [".","linux","config"]
+)
 load("pineapple.bzl", "define_pineapple")
 
 define_pineapple()

+ 1 - 0
pineapple.bzl

@@ -6,6 +6,7 @@ def define_pineapple():
         modules = [
             "smcinvoke_dlkm",
             "tz_log_dlkm",
+            "hdcp_qseecom_dlkm"
         ],
         extra_options = [
             "CONFIG_QCOM_SMCINVOKE"]

+ 10 - 0
securemsm_modules.bzl

@@ -1,6 +1,7 @@
 SMCINVOKE_PATH = "smcinvoke"
 QSEECOM_PATH = "qseecom"
 TZLOG_PATH = "tz_log"
+HDCP_PATH = "hdcp"
 
 # This dictionary holds all the securemsm-kernel  modules included by calling register_securemsm_module
 securemsm_modules = {}
@@ -76,3 +77,12 @@ register_securemsm_module(
     path = TZLOG_PATH,
     default_srcs = ["tz_log.c"],
 )
+
+register_securemsm_module(
+    name = "hdcp_qseecom_dlkm",
+    path = HDCP_PATH,
+    default_srcs = ["hdcp_qseecom.c"],
+    deps = [":hdcp_qseecom_dlkm","%b_smcinvoke_dlkm"],
+    srcs = ["config/sec-kernel_defconfig.h"],
+    copts = ["-include", "config/sec-kernel_defconfig.h"],
+)