1// Copyright (C) 2018 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE 16// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE 17// DEPENDING ON IT IN YOUR PROJECT. *** 18package { 19 default_applicable_licenses: ["bootable_recovery_license"], 20} 21 22// Added automatically by a large-scale-change that took the approach of 23// 'apply every license found to every target'. While this makes sure we respect 24// every license restriction, it may not be entirely correct. 25// 26// e.g. GPL in an MIT project might only apply to the contrib/ directory. 27// 28// Please consider splitting the single license below into multiple licenses, 29// taking care not to lose any license_kind information, and overriding the 30// default license using the 'licenses: [...]' property on targets as needed. 31// 32// For unused files, consider creating a 'fileGroup' with "//visibility:private" 33// to attach the license to, and including a comment whether the files may be 34// used in the current project. 35// See: http://go/android-license-faq 36license { 37 name: "bootable_recovery_license", 38 visibility: [":__subpackages__"], 39 license_kinds: [ 40 "SPDX-license-identifier-Apache-2.0", 41 "SPDX-license-identifier-MIT", 42 "SPDX-license-identifier-OFL", // by exception only 43 ], 44 license_text: [ 45 "NOTICE", 46 ], 47} 48 49cc_defaults { 50 name: "recovery_defaults", 51 52 cflags: [ 53 "-D_FILE_OFFSET_BITS=64", 54 55 // Must be the same as RECOVERY_API_VERSION. 56 "-DRECOVERY_API_VERSION=3", 57 58 "-Wall", 59 "-Werror", 60 ], 61} 62 63cc_library_static { 64 name: "librecovery_fastboot", 65 recovery_available: true, 66 defaults: [ 67 "recovery_defaults", 68 ], 69 70 srcs: [ 71 "fastboot/fastboot.cpp", 72 ], 73 74 shared_libs: [ 75 "libbase", 76 "libbootloader_message", 77 "libcutils", 78 "liblog", 79 "librecovery_ui", 80 ], 81 82 static_libs: [ 83 "librecovery_ui_default", 84 ], 85} 86 87cc_defaults { 88 name: "librecovery_defaults", 89 90 defaults: [ 91 "recovery_defaults", 92 ], 93 94 shared_libs: [ 95 "android.hardware.boot@1.0", 96 "android.hardware.boot@1.1", 97 "libbase", 98 "libbootloader_message", 99 "libcrypto", 100 "libcutils", 101 "libfs_mgr", 102 "liblp", 103 "liblog", 104 "libprotobuf-cpp-lite", 105 "libziparchive", 106 ], 107 108 static_libs: [ 109 "libc++fs", 110 "libinstall", 111 "librecovery_fastboot", 112 "libminui", 113 "librecovery_utils", 114 "libotautil", 115 "libsnapshot_nobinder", 116 "update_metadata-protos", 117 ], 118} 119 120cc_library_static { 121 name: "librecovery", 122 recovery_available: true, 123 124 defaults: [ 125 "librecovery_defaults", 126 ], 127 128 srcs: [ 129 "recovery.cpp", 130 ], 131 132 shared_libs: [ 133 "librecovery_ui", 134 ], 135} 136 137prebuilt_etc { 138 name: "init_recovery.rc", 139 filename: "init.rc", 140 src: "etc/init.rc", 141 sub_dir: "init/hw", 142 recovery: true, 143} 144 145cc_binary { 146 name: "recovery", 147 recovery: true, 148 149 defaults: [ 150 "libinstall_defaults", 151 "librecovery_defaults", 152 "librecovery_utils_defaults", 153 ], 154 155 srcs: [ 156 "recovery_main.cpp", 157 ], 158 159 shared_libs: [ 160 "android.hardware.health-V1-ndk", // from librecovery_utils 161 "librecovery_ui", 162 ], 163 164 static_libs: [ 165 "librecovery", 166 "librecovery_ui_default", 167 ], 168 169 required: [ 170 "e2fsdroid.recovery", 171 "init_recovery.rc", 172 "librecovery_ui_ext", 173 "minadbd", 174 "mke2fs.conf.recovery", 175 "mke2fs.recovery", 176 "recovery_deps", 177 "ueventd.rc.recovery", 178 ], 179} 180 181// The dynamic executable that runs after /data mounts. 182cc_binary { 183 name: "recovery-persist", 184 185 defaults: [ 186 "recovery_defaults", 187 ], 188 189 srcs: [ 190 "recovery-persist.cpp", 191 ], 192 193 shared_libs: [ 194 "libbase", 195 "liblog", 196 ], 197 198 static_libs: [ 199 "librecovery_utils", 200 ], 201 202 init_rc: [ 203 "recovery-persist.rc", 204 ], 205} 206 207// The dynamic executable that runs at init. 208cc_binary { 209 name: "recovery-refresh", 210 211 defaults: [ 212 "recovery_defaults", 213 ], 214 215 srcs: [ 216 "recovery-refresh.cpp", 217 ], 218 219 shared_libs: [ 220 "libbase", 221 "liblog", 222 ], 223 224 static_libs: [ 225 "librecovery_utils", 226 ], 227 228 init_rc: [ 229 "recovery-refresh.rc", 230 ], 231} 232 233filegroup { 234 name: "res-testdata", 235 236 srcs: [ 237 "res-*/images/*_text.png", 238 ], 239} 240