diff --git a/BUILD.bazel b/BUILD.bazel index 1352474689..c669f4877d 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -37,6 +37,16 @@ ddk_headers( ]), includes = [".","linux","config"] ) + +ddk_headers( + name = "qcedev_local_headers", + hdrs = glob([ + "linux/*.h", + "crypto-qti/*.h" + ]), + includes = [".", "crypto-qti"] +) + load("pineapple.bzl", "define_pineapple") define_pineapple() diff --git a/crypto-qti/qcedev.c b/crypto-qti/qcedev.c index 082dee38e3..b8f9374220 100644 --- a/crypto-qti/qcedev.c +++ b/crypto-qti/qcedev.c @@ -22,7 +22,7 @@ #include #include #include -#include "linux/platform_data/qcom_crypto_device.h" +#include "linux/qcom_crypto_device.h" #include "linux/qcedev.h" #include #include diff --git a/crypto-qti/qcedevi.h b/crypto-qti/qcedevi.h index 719ec80788..c860d220ae 100644 --- a/crypto-qti/qcedevi.h +++ b/crypto-qti/qcedevi.h @@ -11,7 +11,7 @@ #include #include #include -#include "linux/platform_data/qcom_crypto_device.h" +#include "linux/qcom_crypto_device.h" #include "linux/fips_status.h" #include "qce.h" #include "qcedev_smmu.h" diff --git a/crypto-qti/qcrypto.c b/crypto-qti/qcrypto.c index 402cac78c6..69b49345fa 100644 --- a/crypto-qti/qcrypto.c +++ b/crypto-qti/qcrypto.c @@ -25,7 +25,7 @@ #include #include #include -#include "linux/platform_data/qcom_crypto_device.h" +#include "linux/qcom_crypto_device.h" #include #include #include "linux/qcrypto.h" diff --git a/linux/platform_data/qcom_crypto_device.h b/linux/qcom_crypto_device.h similarity index 100% rename from linux/platform_data/qcom_crypto_device.h rename to linux/qcom_crypto_device.h diff --git a/pineapple.bzl b/pineapple.bzl index 91c22f93ca..749c298315 100644 --- a/pineapple.bzl +++ b/pineapple.bzl @@ -6,7 +6,11 @@ def define_pineapple(): modules = [ "smcinvoke_dlkm", "tz_log_dlkm", - "hdcp_qseecom_dlkm" + "hdcp_qseecom_dlkm", + "qce50_dlkm", + "qcedev-mod_dlkm", + "qrng_dlkm", + "qcrypto-msm_dlkm" ], extra_options = [ "CONFIG_QCOM_SMCINVOKE"] diff --git a/securemsm_modules.bzl b/securemsm_modules.bzl index 0ebfbd7313..5a941ced78 100644 --- a/securemsm_modules.bzl +++ b/securemsm_modules.bzl @@ -2,6 +2,8 @@ SMCINVOKE_PATH = "smcinvoke" QSEECOM_PATH = "qseecom" TZLOG_PATH = "tz_log" HDCP_PATH = "hdcp" +QCEDEV_PATH = "crypto-qti" +QRNG_PATH = "qrng" # This dictionary holds all the securemsm-kernel modules included by calling register_securemsm_module securemsm_modules = {} @@ -86,3 +88,36 @@ register_securemsm_module( srcs = ["config/sec-kernel_defconfig.h"], copts = ["-include", "config/sec-kernel_defconfig.h"], ) + +register_securemsm_module( + name = "qce50_dlkm", + path = QCEDEV_PATH, + default_srcs = ["qce50.c"], + deps = [":qcedev_local_headers"], +) + +register_securemsm_module( + name = "qcedev-mod_dlkm", + path = QCEDEV_PATH, + default_srcs = [ + "qcedev.c", + "qcedev_smmu.c", + "compat_qcedev.c"], + deps = [":qcedev_local_headers", + "%b_qce50_dlkm"], +) + +register_securemsm_module( + name = "qrng_dlkm", + path = QRNG_PATH, + default_srcs = ["msm_rng.c"], + deps = [":qcedev_local_headers"], +) + +register_securemsm_module( + name = "qcrypto-msm_dlkm", + path = QCEDEV_PATH, + default_srcs = ["qcrypto.c"], + deps = [":qcedev_local_headers", + "%b_qce50_dlkm"], +)