summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnilKumar Chimata <anilc@codeaurora.org>2018-05-11 00:31:38 +0530
committerDavid Ng <dave@codeaurora.org>2018-06-05 12:54:37 -0700
commit36017216cce7d7fdf9c2b2eacc9835fd2d0f6d21 (patch)
treef73067ed47aed51055205bff9e48d3bba0b111f5
parenteec7d0b6d8e690ebe268965e89593812d607b3a8 (diff)
downloadandroid_vendor_qcom_opensource_cryptfs_hw-36017216cce7d7fdf9c2b2eacc9835fd2d0f6d21.tar.gz
android_vendor_qcom_opensource_cryptfs_hw-36017216cce7d7fdf9c2b2eacc9835fd2d0f6d21.tar.bz2
android_vendor_qcom_opensource_cryptfs_hw-36017216cce7d7fdf9c2b2eacc9835fd2d0f6d21.zip
cryptfs_hw: Update Android make file
Move Android.mk to Androi.bp file as per new changes. Change-Id: I9b4422f736ee51f264eac5b84297c66d76f4f243
-rw-r--r--Android.bp25
-rw-r--r--Android.mk39
-rw-r--r--cryptfs_hw.c5
3 files changed, 28 insertions, 41 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..5698fb3
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,25 @@
+sourceFiles = ["cryptfs_hw.c"]
+
+commonSharedLibraries = [
+ "libcutils",
+ "libutils",
+ "libdl",
+ "libhardware",
+ "liblog",
+]
+
+cc_library_shared {
+ name: "libcryptfs_hw",
+ header_libs: ["qseecom-kernel-headers",
+ "libhardware_headers"],
+ cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"],
+ srcs: sourceFiles,
+ shared_libs: commonSharedLibraries,
+
+ owner: "qti",
+}
+
+cc_library_headers {
+ name: "libcryptfs_hw_headers",
+ export_include_dirs: ["."],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 84e3c38..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-ifeq ($(TARGET_USES_QSSI),true)
-ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-sourceFiles := \
- cryptfs_hw.c
-
-commonSharedLibraries := \
- libcutils \
- libutils \
- libdl \
- libhardware \
- liblog
-
-commonIncludes := \
- hardware/libhardware/include/hardware/ \
- $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
-
-LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
-
-LOCAL_C_INCLUDES := $(commonIncludes)
-LOCAL_SRC_FILES := $(sourceFiles)
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= libcryptfs_hw
-LOCAL_SHARED_LIBRARIES := $(commonSharedLibraries)
-
-LOCAL_MODULE_OWNER := qti
-
-# USE_ICE_FOR_STORAGE_ENCRYPTION would be true in future if
-# TARGET_USE_EMMC_USE_ICE is set
-ifeq ($(TARGET_USE_UFS_ICE),true)
-LOCAL_CFLAGS += -DUSE_ICE_FOR_STORAGE_ENCRYPTION
-endif
-
-include $(BUILD_SHARED_LIBRARY)
-endif
-endif
diff --git a/cryptfs_hw.c b/cryptfs_hw.c
index 673e8f5..859b108 100644
--- a/cryptfs_hw.c
+++ b/cryptfs_hw.c
@@ -34,12 +34,13 @@
#include <fcntl.h>
#include <dirent.h>
#include <dlfcn.h>
+#include <errno.h>
#include <linux/qseecom.h>
+#include <hardware/keymaster_common.h>
+#include <hardware/hardware.h>
#include "cutils/log.h"
#include "cutils/properties.h"
#include "cutils/android_reboot.h"
-#include "keymaster_common.h"
-#include "hardware.h"
#include "cryptfs_hw.h"
/*