1// 2// Copyright (C) 2019 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 21cc_binary { 22 name: "gsi_tool", 23 shared_libs: [ 24 "gsi_aidl_interface-cpp", 25 "libbase", 26 "libbinder", 27 "libcutils", 28 "libgsi", 29 "liblog", 30 "libutils", 31 ], 32 static_libs: [ 33 "libgsid", 34 ], 35 srcs: [ 36 "gsi_tool.cpp", 37 ], 38} 39 40cc_library { 41 name: "libgsi", 42 ramdisk_available: true, 43 vendor_ramdisk_available: true, 44 recovery_available: true, 45 host_supported: true, 46 srcs: [ 47 "libgsi.cpp", 48 ], 49 shared_libs: [ 50 "libbase", 51 ], 52 export_include_dirs: ["include"], 53} 54 55cc_library_static { 56 name: "libgsid", 57 srcs: [ 58 "libgsid.cpp", 59 ], 60 shared_libs: [ 61 "gsi_aidl_interface-cpp", 62 "libbase", 63 "libbinder", 64 "libutils", 65 ], 66 export_include_dirs: ["include"], 67} 68 69cc_library_headers { 70 name: "libgsi_headers", 71 host_supported: true, 72 ramdisk_available: true, 73 vendor_ramdisk_available: true, 74 recovery_available: true, 75 vendor_available: true, 76 export_include_dirs: ["include"], 77} 78 79cc_binary { 80 name: "gsid", 81 srcs: [ 82 "daemon.cpp", 83 "gsi_service.cpp", 84 "partition_installer.cpp", 85 ], 86 required: [ 87 "mke2fs", 88 ], 89 init_rc: [ 90 "gsid.rc", 91 ], 92 shared_libs: [ 93 "libbase", 94 "libbinder", 95 "libcrypto", 96 "liblog", 97 ], 98 static_libs: [ 99 "gsi_aidl_interface-cpp", 100 "libavb", 101 "libcutils", 102 "libdm", 103 "libext4_utils", 104 "libfs_mgr", 105 "libgsi", 106 "libgsid", 107 "liblp", 108 "libselinux", 109 "libutils", 110 "libc++fs", 111 "libvold_binder", 112 ], 113 header_libs: [ 114 "libstorage_literals_headers", 115 ], 116 target: { 117 android: { 118 shared_libs: [ 119 "libprocessgroup", 120 "libvndksupport", 121 ], 122 }, 123 }, 124 local_include_dirs: ["include"], 125} 126 127aidl_interface { 128 name: "gsi_aidl_interface", 129 unstable: true, 130 srcs: [":gsiservice_aidl"], 131 local_include_dir: "aidl", 132 backend: { 133 ndk: { 134 enabled: false, 135 }, 136 }, 137} 138 139filegroup { 140 name: "gsiservice_aidl", 141 srcs: [ 142 "aidl/android/gsi/AvbPublicKey.aidl", 143 "aidl/android/gsi/GsiProgress.aidl", 144 "aidl/android/gsi/IGsiService.aidl", 145 "aidl/android/gsi/IGsiServiceCallback.aidl", 146 "aidl/android/gsi/IImageService.aidl", 147 "aidl/android/gsi/IProgressCallback.aidl", 148 "aidl/android/gsi/MappedImage.aidl", 149 ], 150 path: "aidl", 151} 152