aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Arruda <patricearruda@google.com>2019-05-15 08:58:50 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-05-15 08:58:50 -0700
commit45d3742378a983f7b7529d94f26e5a59ce41f1f6 (patch)
treeb53bee9079269ec3c29a88ce9d70015aef1504ee
parent0f6a0aa324ba9f6197f4f9b4a26c3db4fcd2935f (diff)
parentf651fd45357d92418f244d6a891ffecd921761c6 (diff)
downloadnvram-45d3742378a983f7b7529d94f26e5a59ce41f1f6.tar.gz
Convert system/nvram/Android.mk to Android.bp. am: 843f23682bndk-sysroot-r21
am: f651fd4535 Change-Id: I22c48d08c6a5768c00966da85f7f94807e6cd7bd
-rw-r--r--Android.mk18
-rw-r--r--hal/Android.bp48
-rw-r--r--hal/Android.mk55
3 files changed, 47 insertions, 74 deletions
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 7826386..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (C) 2016 The Android Open-Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hal/Android.bp b/hal/Android.bp
index f542e0f..4f47024 100644
--- a/hal/Android.bp
+++ b/hal/Android.bp
@@ -15,7 +15,7 @@
//
subdirs = [
- "tests"
+ "tests",
]
// A static library providing glue logic that simplifies creation of NVRAM HAL
@@ -55,3 +55,49 @@ cc_library_shared {
],
}
+
+cc_binary {
+ name: "fake-nvram",
+ srcs: [
+ "fake_nvram.cpp",
+ "fake_nvram_storage.cpp",
+ ],
+ clang: true,
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
+ static_libs: ["libnvram-core"],
+ shared_libs: [
+ "libnvram-messages",
+ "libcrypto",
+ "libminijail",
+ "liblog",
+ "libcutils",
+ "libbase",
+ ],
+
+ init_rc: ["fake-nvram.rc"],
+ required: ["fake-nvram-seccomp.policy"],
+}
+
+// seccomp policy for fake_nvram.
+prebuilt_usr_share {
+ name: "fake-nvram-seccomp.policy",
+ sub_dir: "policy",
+ arch: {
+ arm: {
+ src: "fake-nvram-seccomp-arm.policy",
+ },
+ arm64: {
+ src: "fake-nvram-seccomp-arm64.policy",
+ },
+ x86: {
+ src: "fake-nvram-seccomp-x86.policy",
+ },
+ x86_64: {
+ src: "fake-nvram-seccomp-x86_64.policy",
+ },
+ },
+}
diff --git a/hal/Android.mk b/hal/Android.mk
deleted file mode 100644
index 49445d5..0000000
--- a/hal/Android.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2016 The Android Open-Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-# 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
-LOCAL_SHARED_LIBRARIES := \
- libnvram-messages \
- libcrypto \
- libminijail \
- liblog \
- libcutils \
- libbase
-LOCAL_INIT_RC := fake-nvram.rc
-
-LOCAL_REQUIRED_MODULES_arm := fake-nvram-seccomp.policy
-LOCAL_REQUIRED_MODULES_arm64 := fake-nvram-seccomp.policy
-LOCAL_REQUIRED_MODULES_x86 := fake-nvram-seccomp.policy
-LOCAL_REQUIRED_MODULES_x86_64 := 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
-LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
-include $(BUILD_PREBUILT)