Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 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 | cc_defaults { |
| 16 | name: "recovery_defaults", |
| 17 | |
| 18 | cflags: [ |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 19 | "-D_FILE_OFFSET_BITS=64", |
| 20 | |
| 21 | // Must be the same as RECOVERY_API_VERSION. |
| 22 | "-DRECOVERY_API_VERSION=3", |
| 23 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 24 | "-Wall", |
| 25 | "-Werror", |
| 26 | ], |
| 27 | } |
| 28 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 29 | cc_library { |
| 30 | name: "librecovery_ui", |
| 31 | recovery_available: true, |
| 32 | |
| 33 | defaults: [ |
| 34 | "recovery_defaults", |
| 35 | ], |
| 36 | |
| 37 | srcs: [ |
| 38 | "device.cpp", |
| 39 | "screen_ui.cpp", |
| 40 | "ui.cpp", |
| 41 | "vr_ui.cpp", |
| 42 | "wear_ui.cpp" |
| 43 | ], |
| 44 | |
| 45 | static_libs: [ |
| 46 | "libminui", |
| 47 | "libotautil", |
| 48 | ], |
| 49 | |
| 50 | shared_libs: [ |
| 51 | "libbase", |
| 52 | "libpng", |
| 53 | "libz", |
| 54 | ], |
| 55 | } |
| 56 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 57 | // Generic device that uses ScreenRecoveryUI. |
| 58 | cc_library_static { |
| 59 | name: "librecovery_ui_default", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 60 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 61 | |
| 62 | defaults: [ |
| 63 | "recovery_defaults", |
| 64 | ], |
| 65 | |
| 66 | srcs: [ |
| 67 | "default_device.cpp", |
| 68 | ], |
| 69 | } |
| 70 | |
| 71 | // The default wear device that uses WearRecoveryUI. |
| 72 | cc_library_static { |
| 73 | name: "librecovery_ui_wear", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 74 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 75 | |
| 76 | defaults: [ |
| 77 | "recovery_defaults", |
| 78 | ], |
| 79 | |
| 80 | srcs: [ |
| 81 | "wear_device.cpp", |
| 82 | ], |
| 83 | } |
| 84 | |
| 85 | // The default VR device that uses VrRecoveryUI. |
| 86 | cc_library_static { |
| 87 | name: "librecovery_ui_vr", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 88 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 89 | |
| 90 | defaults: [ |
| 91 | "recovery_defaults", |
| 92 | ], |
| 93 | |
| 94 | srcs: [ |
| 95 | "vr_device.cpp", |
| 96 | ], |
| 97 | } |
| 98 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 99 | cc_defaults { |
| 100 | name: "librecovery_defaults", |
| 101 | |
| 102 | defaults: [ |
| 103 | "recovery_defaults", |
| 104 | ], |
| 105 | |
| 106 | shared_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 107 | "libbase", |
| 108 | "libbootloader_message", |
| 109 | "libcrypto", |
| 110 | "libcrypto_utils", |
| 111 | "libcutils", |
| 112 | "libext4_utils", |
| 113 | "libfs_mgr", |
| 114 | "libfusesideload", |
| 115 | "libhidl-gen-utils", |
| 116 | "liblog", |
| 117 | "libpng", |
| 118 | "libselinux", |
| 119 | "libsparse", |
| 120 | "libtinyxml2", |
| 121 | "libutils", |
| 122 | "libz", |
| 123 | "libziparchive", |
| 124 | ], |
| 125 | |
| 126 | static_libs: [ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 127 | "libminui", |
| 128 | "libverifier", |
| 129 | "libotautil", |
| 130 | "libvintf_recovery", |
| 131 | "libvintf", |
| 132 | |
| 133 | // TODO(b/80132328): Remove the dependency on static health HAL. |
| 134 | "libhealthd.default", |
| 135 | "android.hardware.health@2.0-impl", |
| 136 | "android.hardware.health@2.0", |
| 137 | "android.hardware.health@1.0", |
| 138 | "android.hardware.health@1.0-convert", |
| 139 | "libhealthstoragedefault", |
| 140 | "libhidltransport", |
| 141 | "libhidlbase", |
| 142 | "libhwbinder_noltopgo", |
| 143 | "libbatterymonitor", |
| 144 | ], |
| 145 | } |
| 146 | |
| 147 | cc_library_static { |
| 148 | name: "librecovery", |
| 149 | recovery_available: true, |
| 150 | |
| 151 | defaults: [ |
| 152 | "librecovery_defaults", |
| 153 | ], |
| 154 | |
| 155 | srcs: [ |
| 156 | "adb_install.cpp", |
| 157 | "fsck_unshare_blocks.cpp", |
| 158 | "fuse_sdcard_provider.cpp", |
| 159 | "install.cpp", |
| 160 | "recovery.cpp", |
| 161 | "roots.cpp", |
| 162 | ], |
| 163 | |
| 164 | include_dirs: [ |
| 165 | "system/vold", |
| 166 | ], |
| 167 | } |
| 168 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 169 | cc_library_static { |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 170 | name: "libverifier", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 171 | recovery_available: true, |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 172 | |
| 173 | defaults: [ |
| 174 | "recovery_defaults", |
| 175 | ], |
| 176 | |
| 177 | srcs: [ |
| 178 | "asn1_decoder.cpp", |
| 179 | "verifier.cpp", |
| 180 | ], |
| 181 | |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 182 | shared_libs: [ |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 183 | "libbase", |
| 184 | "libcrypto", |
| 185 | "libcrypto_utils", |
Tao Bao | 818f938 | 2018-08-06 15:52:24 -0700 | [diff] [blame] | 186 | ], |
| 187 | |
| 188 | static_libs: [ |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 189 | "libotautil", |
| 190 | ], |
| 191 | } |
| 192 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 193 | cc_binary { |
| 194 | name: "recovery", |
| 195 | recovery: true, |
| 196 | |
| 197 | defaults: [ |
| 198 | "librecovery_defaults", |
| 199 | ], |
| 200 | |
| 201 | srcs: [ |
| 202 | "logging.cpp", |
| 203 | "recovery_main.cpp", |
| 204 | ], |
| 205 | |
| 206 | shared_libs: [ |
Tao Bao | 7d2a63a | 2018-08-13 11:15:29 -0700 | [diff] [blame] | 207 | "libminadbd_services", |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 208 | "librecovery_ui", |
| 209 | ], |
| 210 | |
| 211 | static_libs: [ |
| 212 | "librecovery", |
| 213 | "librecovery_ui_default", |
| 214 | ], |
| 215 | |
| 216 | required: [ |
| 217 | "e2fsdroid.recovery", |
| 218 | "librecovery_ui_ext", |
| 219 | "mke2fs.conf", |
| 220 | "mke2fs.recovery", |
| 221 | "recovery_deps", |
| 222 | ], |
| 223 | } |
| 224 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 225 | // The dynamic executable that runs after /data mounts. |
| 226 | cc_binary { |
| 227 | name: "recovery-persist", |
| 228 | |
| 229 | defaults: [ |
| 230 | "recovery_defaults", |
| 231 | ], |
| 232 | |
| 233 | srcs: [ |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 234 | "logging.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 235 | "recovery-persist.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 236 | ], |
| 237 | |
| 238 | shared_libs: [ |
| 239 | "libbase", |
| 240 | "liblog", |
| 241 | ], |
| 242 | |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 243 | static_libs: [ |
| 244 | "libotautil", |
| 245 | ], |
| 246 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 247 | init_rc: [ |
| 248 | "recovery-persist.rc", |
| 249 | ], |
| 250 | } |
| 251 | |
| 252 | // The dynamic executable that runs at init. |
| 253 | cc_binary { |
| 254 | name: "recovery-refresh", |
| 255 | |
| 256 | defaults: [ |
| 257 | "recovery_defaults", |
| 258 | ], |
| 259 | |
| 260 | srcs: [ |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 261 | "logging.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 262 | "recovery-refresh.cpp", |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 263 | ], |
| 264 | |
| 265 | shared_libs: [ |
| 266 | "libbase", |
| 267 | "liblog", |
| 268 | ], |
| 269 | |
Jerry Zhang | 152933a | 2018-05-02 16:56:00 -0700 | [diff] [blame] | 270 | static_libs: [ |
| 271 | "libotautil", |
| 272 | ], |
| 273 | |
Tao Bao | d2f2ad6 | 2018-03-23 23:24:25 -0700 | [diff] [blame] | 274 | init_rc: [ |
| 275 | "recovery-refresh.rc", |
| 276 | ], |
| 277 | } |