Home | History | Annotate | Download | only in hal
      1 #
      2 # Copyright (C) 2016 The Android Open-Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 # fake_nvram is a system daemon that provides a software-only access-controlled
     20 # NVRAM implementation. This is only for illustration and in order to get code
     21 # using access-controlled NVRAM running on emulators. It *DOES NOT* meet the
     22 # tamper evidence requirements, so can't be used on production devices.
     23 include $(CLEAR_VARS)
     24 LOCAL_MODULE := fake-nvram
     25 LOCAL_SRC_FILES := \
     26 	fake_nvram.cpp \
     27 	fake_nvram_storage.cpp
     28 LOCAL_CLANG := true
     29 LOCAL_CFLAGS := -Wall -Werror -Wextra
     30 LOCAL_STATIC_LIBRARIES := libnvram-core
     31 LOCAL_SHARED_LIBRARIES := \
     32 	libnvram-messages \
     33 	libcrypto \
     34 	libminijail \
     35 	liblog \
     36 	libcutils \
     37 	libbase
     38 LOCAL_INIT_RC := fake-nvram.rc
     39 
     40 LOCAL_REQUIRED_MODULES_arm := fake-nvram-seccomp.policy
     41 LOCAL_REQUIRED_MODULES_arm64 := fake-nvram-seccomp.policy
     42 LOCAL_REQUIRED_MODULES_x86 := fake-nvram-seccomp.policy
     43 LOCAL_REQUIRED_MODULES_x86_64 := fake-nvram-seccomp.policy
     44 
     45 LOCAL_MODULE_TAGS := optional
     46 include $(BUILD_EXECUTABLE)
     47 
     48 # seccomp policy for fake_nvram.
     49 include $(CLEAR_VARS)
     50 LOCAL_MODULE := fake-nvram-seccomp.policy
     51 LOCAL_MODULE_CLASS := ETC
     52 LOCAL_MODULE_PATH := $(TARGET_OUT)/usr/share/policy/
     53 LOCAL_SRC_FILES := fake-nvram-seccomp-$(TARGET_ARCH).policy
     54 LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
     55 include $(BUILD_PREBUILT)
     56