aboutsummaryrefslogtreecommitdiff
path: root/hal/Android.mk
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@google.com>2016-03-21 17:30:53 +0100
committerMattias Nissler <mnissler@google.com>2016-03-23 17:52:18 +0100
commit417e23fa8c8c8f9dd77a19e60c47b46d5454000d (patch)
treeab230c8c746ea9d652c3549a2c5def49a78bde63 /hal/Android.mk
parentfce04ee60f5e12cf5b43d4c8c6be58f5884db71f (diff)
downloadnvram-417e23fa8c8c8f9dd77a19e60c47b46d5454000d.tar.gz
Add fake-nvram daemon to persist NVRAM data
Create a daemon to host the access-controlled NVRAM backend used for testing in the emulators. This makes access-controlled NVRAM data persistent, which more closely resembles the behavior of a real implementation. BUG:27764637 Change-Id: Iaf1a44881527896628452810561e315c572be31c
Diffstat (limited to 'hal/Android.mk')
-rw-r--r--hal/Android.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/hal/Android.mk b/hal/Android.mk
index 05ecc17..9ec79b0 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -44,4 +44,30 @@ LOCAL_SHARED_LIBRARIES := libnvram-messages
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
+# fake_nvram is a system daemon that provides a software-only access-controlled
+# NVRAM implementation. This is only for illustration and in order to get code
+# using access-controlled NVRAM running on emulators. It *DOES NOT* meet the
+# tamper evidence requirements, so can't be used on production devices.
+include $(CLEAR_VARS)
+LOCAL_MODULE := fake-nvram
+LOCAL_SRC_FILES := \
+ fake_nvram.cpp \
+ fake_nvram_storage.cpp
+LOCAL_CLANG := true
+LOCAL_CFLAGS := -Wall -Werror -Wextra
+LOCAL_STATIC_LIBRARIES := libnvram-core libmincrypt
+LOCAL_SHARED_LIBRARIES := libnvram-messages libminijail libcutils libbase
+LOCAL_INIT_RC := fake-nvram.rc
+LOCAL_REQUIRED_MODULES := fake-nvram-seccomp.policy
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+# seccomp policy for fake_nvram.
+include $(CLEAR_VARS)
+LOCAL_MODULE := fake-nvram-seccomp.policy
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/policy/
+LOCAL_SRC_FILES := fake-nvram-seccomp-$(TARGET_ARCH).policy
+include $(BUILD_PREBUILT)
+
include $(call all-makefiles-under,$(LOCAL_PATH))