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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21subdirs = [ 22 "tests", 23] 24 25// A static library providing glue logic that simplifies creation of NVRAM HAL 26// modules. 27cc_library_static { 28 name: "libnvram-hal", 29 srcs: ["nvram_device_adapter.cpp"], 30 cflags: [ 31 "-Wall", 32 "-Werror", 33 "-Wextra", 34 ], 35 export_include_dirs: ["include"], 36 shared_libs: ["libnvram-messages"], 37} 38 39// nvram.testing is the software-only testing NVRAM HAL module backed by the 40// fake_nvram daemon. 41cc_library_shared { 42 name: "nvram.testing", 43 relative_install_path: "hw", 44 srcs: [ 45 "testing_module.c", 46 "testing_nvram_implementation.cpp", 47 ], 48 cflags: [ 49 "-Wall", 50 "-Werror", 51 "-Wextra", 52 "-fvisibility=hidden", 53 ], 54 static_libs: ["libnvram-hal"], 55 shared_libs: [ 56 "libnvram-messages", 57 "libcutils", 58 "libbase", 59 ], 60 61} 62 63cc_binary { 64 name: "fake-nvram", 65 srcs: [ 66 "fake_nvram.cpp", 67 "fake_nvram_storage.cpp", 68 ], 69 70 cflags: [ 71 "-Wall", 72 "-Werror", 73 "-Wextra", 74 ], 75 static_libs: ["libnvram-core"], 76 shared_libs: [ 77 "libnvram-messages", 78 "libcrypto", 79 "libminijail", 80 "liblog", 81 "libcutils", 82 "libbase", 83 ], 84 85 init_rc: ["fake-nvram.rc"], 86 required: ["fake-nvram-seccomp.policy"], 87} 88 89// seccomp policy for fake_nvram. 90prebuilt_usr_share { 91 name: "fake-nvram-seccomp.policy", 92 sub_dir: "policy", 93 arch: { 94 arm: { 95 src: "fake-nvram-seccomp-arm.policy", 96 }, 97 arm64: { 98 src: "fake-nvram-seccomp-arm64.policy", 99 }, 100 riscv64: { 101 src: "fake-nvram-seccomp-riscv64.policy", 102 }, 103 x86: { 104 src: "fake-nvram-seccomp-x86.policy", 105 }, 106 x86_64: { 107 src: "fake-nvram-seccomp-x86_64.policy", 108 }, 109 }, 110} 111