Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2015 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 | |
Colin Cross | 606913a | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 17 | // AIDL interface between libupdate_engine and framework.jar |
Bob Badour | 9b85a6c | 2021-02-12 21:28:32 -0800 | [diff] [blame] | 18 | package { |
| 19 | default_applicable_licenses: ["system_update_engine_license"], |
| 20 | } |
| 21 | |
| 22 | // Added automatically by a large-scale-change |
| 23 | // See: http://go/android-license-faq |
| 24 | license { |
| 25 | name: "system_update_engine_license", |
| 26 | visibility: [":__subpackages__"], |
| 27 | license_kinds: [ |
| 28 | "SPDX-license-identifier-Apache-2.0", |
| 29 | ], |
| 30 | license_text: [ |
| 31 | "NOTICE", |
| 32 | ], |
| 33 | } |
| 34 | |
Colin Cross | 606913a | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 35 | filegroup { |
| 36 | name: "libupdate_engine_aidl", |
| 37 | srcs: [ |
| 38 | "binder_bindings/android/os/IUpdateEngine.aidl", |
| 39 | "binder_bindings/android/os/IUpdateEngineCallback.aidl", |
| 40 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 41 | path: "binder_bindings", |
| 42 | } |
| 43 | |
| 44 | cc_defaults { |
| 45 | name: "ue_defaults", |
| 46 | |
| 47 | cflags: [ |
Amin Hassani | 2e4eda5 | 2019-01-07 14:01:17 -0800 | [diff] [blame] | 48 | "-DBASE_VER=576279", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 49 | "-DUSE_HWID_OVERRIDE=0", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 50 | "-D_FILE_OFFSET_BITS=64", |
| 51 | "-D_POSIX_C_SOURCE=199309L", |
| 52 | "-Wa,--noexecstack", |
| 53 | "-Wall", |
| 54 | "-Werror", |
| 55 | "-Wextra", |
| 56 | "-Wformat=2", |
| 57 | "-Wno-psabi", |
| 58 | "-Wno-unused-parameter", |
| 59 | "-ffunction-sections", |
| 60 | "-fstack-protector-strong", |
| 61 | "-fvisibility=hidden", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 62 | "-g3", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 63 | ], |
| 64 | cppflags: [ |
| 65 | "-Wnon-virtual-dtor", |
| 66 | "-fno-strict-aliasing", |
| 67 | ], |
| 68 | include_dirs: ["system"], |
| 69 | local_include_dirs: ["client_library/include"], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 70 | header_libs: ["libgtest_prod_headers"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 71 | shared_libs: [ |
| 72 | "libbrillo-stream", |
| 73 | "libbrillo", |
| 74 | "libchrome", |
| 75 | ], |
| 76 | ldflags: ["-Wl,--gc-sections"], |
| 77 | |
| 78 | product_variables: { |
| 79 | pdk: { |
| 80 | enabled: false, |
| 81 | }, |
| 82 | }, |
| 83 | |
| 84 | target: { |
Sen Jiang | b5f631d | 2018-12-18 16:59:57 -0800 | [diff] [blame] | 85 | android: { |
| 86 | cflags: [ |
| 87 | "-DUSE_FEC=1", |
| 88 | ], |
| 89 | }, |
| 90 | host: { |
| 91 | cflags: [ |
| 92 | "-DUSE_FEC=0", |
| 93 | ], |
| 94 | }, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 95 | darwin: { |
| 96 | enabled: false, |
| 97 | }, |
| 98 | }, |
| 99 | } |
| 100 | |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 101 | // libcow_operation_convert (type: library) |
| 102 | // ======================================================== |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 103 | cc_library_static { |
| 104 | name: "libpayload_extent_utils", |
| 105 | defaults: [ |
| 106 | "ue_defaults", |
| 107 | ], |
| 108 | host_supported: true, |
| 109 | recovery_available: true, |
| 110 | srcs: [ |
| 111 | "payload_generator/extent_utils.cc", |
| 112 | ], |
| 113 | static_libs: [ |
| 114 | "update_metadata-protos", |
| 115 | ], |
| 116 | } |
| 117 | |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 118 | cc_library { |
| 119 | name: "libcow_operation_convert", |
| 120 | host_supported: true, |
| 121 | recovery_available: true, |
| 122 | defaults: [ |
| 123 | "ue_defaults", |
| 124 | "update_metadata-protos_exports", |
| 125 | ], |
| 126 | srcs: [ |
| 127 | "common/cow_operation_convert.cc", |
| 128 | ], |
| 129 | static_libs: [ |
| 130 | "libsnapshot_cow", |
| 131 | "update_metadata-protos", |
| 132 | "libpayload_extent_ranges", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 133 | "libpayload_extent_utils", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 134 | "libbrotli", |
| 135 | "libz", |
| 136 | ], |
| 137 | } |
| 138 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 139 | // update_metadata-protos (type: static_library) |
| 140 | // ======================================================== |
| 141 | // Protobufs. |
| 142 | cc_defaults { |
| 143 | name: "update_metadata-protos_exports", |
| 144 | |
| 145 | shared_libs: ["libprotobuf-cpp-lite"], |
| 146 | } |
| 147 | |
| 148 | cc_library_static { |
| 149 | name: "update_metadata-protos", |
| 150 | host_supported: true, |
Inseob Kim | 3cce62a | 2021-06-14 11:55:35 +0900 | [diff] [blame] | 151 | ramdisk_available: true, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 152 | recovery_available: true, |
| 153 | |
| 154 | srcs: ["update_engine/update_metadata.proto"], |
| 155 | cflags: [ |
| 156 | "-Wall", |
| 157 | "-Werror", |
| 158 | ], |
| 159 | proto: { |
| 160 | canonical_path_from_root: false, |
| 161 | export_proto_headers: true, |
| 162 | }, |
| 163 | } |
| 164 | |
| 165 | // libpayload_consumer (type: static_library) |
| 166 | // ======================================================== |
| 167 | // The payload application component and common dependencies. |
| 168 | cc_defaults { |
| 169 | name: "libpayload_consumer_exports", |
| 170 | defaults: ["update_metadata-protos_exports"], |
| 171 | |
| 172 | static_libs: [ |
| 173 | "update_metadata-protos", |
| 174 | "libxz", |
| 175 | "libbz", |
| 176 | "libbspatch", |
| 177 | "libbrotli", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 178 | "libc++fs", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 179 | "libfec_rs", |
| 180 | "libpuffpatch", |
| 181 | "libverity_tree", |
Kelvin Zhang | 94f51cc | 2020-09-25 11:34:49 -0400 | [diff] [blame] | 182 | "libsnapshot_cow", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 183 | "libbrotli", |
| 184 | "libz", |
| 185 | "libpayload_extent_ranges", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 186 | "libpayload_extent_utils", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 187 | "libcow_operation_convert", |
Kelvin Zhang | 5562403 | 2021-12-20 12:13:24 -0800 | [diff] [blame] | 188 | "lz4diff-protos", |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 189 | "liblz4patch", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 190 | ], |
| 191 | shared_libs: [ |
| 192 | "libbase", |
| 193 | "libcrypto", |
Sen Jiang | b5f631d | 2018-12-18 16:59:57 -0800 | [diff] [blame] | 194 | "libfec", |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 195 | "liblz4", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 196 | "libziparchive", |
Gabriele M | 4c37681 | 2018-06-14 01:10:09 +0200 | [diff] [blame] | 197 | "libprocessgroup", |
Luca Stefani | e82db25 | 2019-01-03 21:20:42 +0100 | [diff] [blame] | 198 | "libselinux", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 199 | ], |
Luca Stefani | d682a97 | 2020-03-13 11:32:29 +0100 | [diff] [blame] | 200 | product_variables: { |
| 201 | debuggable: { |
| 202 | cflags: [ |
| 203 | "-DRUN_BACKUPTOOL", |
| 204 | ], |
| 205 | }, |
| 206 | }, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | cc_library_static { |
| 210 | name: "libpayload_consumer", |
| 211 | defaults: [ |
| 212 | "ue_defaults", |
| 213 | "libpayload_consumer_exports", |
| 214 | ], |
| 215 | host_supported: true, |
| 216 | recovery_available: true, |
| 217 | |
| 218 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 219 | "aosp/platform_constants_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 220 | "common/action_processor.cc", |
| 221 | "common/boot_control_stub.cc", |
| 222 | "common/clock.cc", |
| 223 | "common/constants.cc", |
| 224 | "common/cpu_limiter.cc", |
Yifan Hong | daac732 | 2019-11-07 10:48:26 -0800 | [diff] [blame] | 225 | "common/dynamic_partition_control_stub.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 226 | "common/error_code_utils.cc", |
| 227 | "common/file_fetcher.cc", |
| 228 | "common/hash_calculator.cc", |
| 229 | "common/http_common.cc", |
| 230 | "common/http_fetcher.cc", |
| 231 | "common/hwid_override.cc", |
| 232 | "common/multi_range_http_fetcher.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 233 | "common/prefs.cc", |
| 234 | "common/proxy_resolver.cc", |
| 235 | "common/subprocess.cc", |
| 236 | "common/terminator.cc", |
| 237 | "common/utils.cc", |
| 238 | "payload_consumer/bzip_extent_writer.cc", |
| 239 | "payload_consumer/cached_file_descriptor.cc", |
Tianjie Xu | 7a78d63 | 2019-10-08 16:32:39 -0700 | [diff] [blame] | 240 | "payload_consumer/certificate_parser_android.cc", |
Kelvin Zhang | 569c97e | 2020-10-26 12:12:24 -0400 | [diff] [blame] | 241 | "payload_consumer/cow_writer_file_descriptor.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 242 | "payload_consumer/delta_performer.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 243 | "payload_consumer/extent_reader.cc", |
| 244 | "payload_consumer/extent_writer.cc", |
| 245 | "payload_consumer/file_descriptor.cc", |
| 246 | "payload_consumer/file_descriptor_utils.cc", |
| 247 | "payload_consumer/file_writer.cc", |
| 248 | "payload_consumer/filesystem_verifier_action.cc", |
Kelvin Zhang | 40d9666 | 2021-02-24 14:21:29 -0500 | [diff] [blame] | 249 | "payload_consumer/install_operation_executor.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 250 | "payload_consumer/install_plan.cc", |
| 251 | "payload_consumer/mount_history.cc", |
| 252 | "payload_consumer/payload_constants.cc", |
| 253 | "payload_consumer/payload_metadata.cc", |
| 254 | "payload_consumer/payload_verifier.cc", |
Kelvin Zhang | 50bac65 | 2020-09-28 15:51:41 -0400 | [diff] [blame] | 255 | "payload_consumer/partition_writer.cc", |
Kelvin Zhang | 94f51cc | 2020-09-25 11:34:49 -0400 | [diff] [blame] | 256 | "payload_consumer/partition_writer_factory_android.cc", |
| 257 | "payload_consumer/vabc_partition_writer.cc", |
Kelvin Zhang | 4bb4920 | 2021-07-08 21:39:05 -0400 | [diff] [blame] | 258 | "payload_consumer/xor_extent_writer.cc", |
Kelvin Zhang | b170676 | 2021-06-25 15:05:22 -0400 | [diff] [blame] | 259 | "payload_consumer/block_extent_writer.cc", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 260 | "payload_consumer/snapshot_extent_writer.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 261 | "payload_consumer/postinstall_runner_action.cc", |
Kelvin Zhang | ab3ce60 | 2021-02-24 14:46:40 -0500 | [diff] [blame] | 262 | "payload_consumer/verified_source_fd.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 263 | "payload_consumer/verity_writer_android.cc", |
| 264 | "payload_consumer/xz_extent_writer.cc", |
| 265 | "payload_consumer/fec_file_descriptor.cc", |
Tianjie | d3865d1 | 2020-06-03 15:25:17 -0700 | [diff] [blame] | 266 | "payload_consumer/partition_update_generator_android.cc", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 267 | "update_status_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 268 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | // libupdate_engine_boot_control (type: static_library) |
| 272 | // ======================================================== |
| 273 | // A BootControl class implementation using Android's HIDL boot_control HAL. |
| 274 | cc_defaults { |
| 275 | name: "libupdate_engine_boot_control_exports", |
| 276 | defaults: ["update_metadata-protos_exports"], |
| 277 | |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 278 | static_libs: [ |
David Anderson | e7ce821 | 2019-12-16 20:13:19 -0800 | [diff] [blame] | 279 | "libcutils", |
| 280 | "libfs_mgr_binder", |
| 281 | "libgsi", |
Yifan Hong | dad0af8 | 2020-02-19 17:19:49 -0800 | [diff] [blame] | 282 | "libpayload_consumer", |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 283 | "libsnapshot", |
David Anderson | 6c190a2 | 2020-09-21 17:09:53 -0700 | [diff] [blame] | 284 | "libsnapshot_cow", |
| 285 | "libz", |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 286 | "update_metadata-protos", |
| 287 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 288 | shared_libs: [ |
| 289 | "libbootloader_message", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 290 | "libhidlbase", |
| 291 | "liblp", |
Yifan Hong | d976cc5 | 2020-02-25 14:51:42 -0800 | [diff] [blame] | 292 | "libstatslog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 293 | "libutils", |
| 294 | "android.hardware.boot@1.0", |
David Anderson | 2111d06 | 2019-10-15 22:36:27 -0700 | [diff] [blame] | 295 | "android.hardware.boot@1.1", |
Kelvin Zhang | cb419e6 | 2021-06-16 13:56:47 -0400 | [diff] [blame] | 296 | "android.hardware.boot@1.2", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 297 | ], |
Yifan Hong | 2969290 | 2020-03-26 12:47:05 -0700 | [diff] [blame] | 298 | header_libs: [ |
| 299 | "avb_headers", |
| 300 | ], |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 301 | target: { |
| 302 | recovery: { |
David Anderson | e7ce821 | 2019-12-16 20:13:19 -0800 | [diff] [blame] | 303 | static_libs: [ |
| 304 | "libfs_mgr", |
| 305 | "libsnapshot_nobinder", |
| 306 | ], |
| 307 | exclude_static_libs: [ |
| 308 | "libfs_mgr_binder", |
| 309 | "libsnapshot", |
| 310 | ], |
Yifan Hong | 212d795 | 2020-02-04 11:08:08 -0800 | [diff] [blame] | 311 | exclude_shared_libs: [ |
Yifan Hong | d976cc5 | 2020-02-25 14:51:42 -0800 | [diff] [blame] | 312 | "libstatslog", |
Yifan Hong | 212d795 | 2020-02-04 11:08:08 -0800 | [diff] [blame] | 313 | ], |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 314 | }, |
| 315 | }, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 316 | } |
| 317 | |
| 318 | cc_library_static { |
| 319 | name: "libupdate_engine_boot_control", |
| 320 | defaults: [ |
| 321 | "ue_defaults", |
| 322 | "libupdate_engine_boot_control_exports", |
Yifan Hong | dad0af8 | 2020-02-19 17:19:49 -0800 | [diff] [blame] | 323 | "libpayload_consumer_exports", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 324 | ], |
| 325 | recovery_available: true, |
| 326 | |
| 327 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 328 | "aosp/boot_control_android.cc", |
| 329 | "aosp/cleanup_previous_update_action.cc", |
| 330 | "aosp/dynamic_partition_control_android.cc", |
| 331 | "aosp/dynamic_partition_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 332 | ], |
| 333 | } |
| 334 | |
| 335 | // libupdate_engine_android (type: static_library) |
| 336 | // ======================================================== |
| 337 | // The main daemon static_library used in Android (non-Brillo). This only has a |
| 338 | // loop to apply payloads provided by the upper layer via a Binder interface. |
| 339 | cc_defaults { |
| 340 | name: "libupdate_engine_android_exports", |
| 341 | defaults: [ |
| 342 | "ue_defaults", |
| 343 | "libpayload_consumer_exports", |
| 344 | "libupdate_engine_boot_control_exports", |
| 345 | ], |
| 346 | |
| 347 | static_libs: [ |
Tianjie | 838793d | 2021-01-14 22:05:13 -0800 | [diff] [blame] | 348 | "libavb", |
| 349 | "libavb_user", |
Yifan Hong | 126d13e | 2020-09-21 19:50:06 -0700 | [diff] [blame] | 350 | "gkiprops", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 351 | "libpayload_consumer", |
| 352 | "libupdate_engine_boot_control", |
Tianjie | 838793d | 2021-01-14 22:05:13 -0800 | [diff] [blame] | 353 | "PlatformProperties", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 354 | ], |
| 355 | shared_libs: [ |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 356 | "apex_aidl_interface-cpp", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 357 | "libandroid_net", |
| 358 | "libbase", |
| 359 | "libbinder", |
| 360 | "libbinderwrapper", |
| 361 | "libbootloader_message", |
| 362 | "libbrillo-binder", |
| 363 | "libcurl", |
| 364 | "libcutils", |
Jeongik Cha | 95f89e9 | 2021-01-26 22:33:11 +0900 | [diff] [blame] | 365 | "libupdate_engine_stable-V1-cpp", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 366 | "liblog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 367 | "libssl", |
Tianjie Xu | 75cc9f2 | 2019-08-02 14:53:38 -0700 | [diff] [blame] | 368 | "libstatslog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 369 | "libutils", |
| 370 | ], |
Nikita Ioffe | aedfef3 | 2021-04-28 13:54:14 +0100 | [diff] [blame] | 371 | whole_static_libs: [ |
| 372 | "com.android.sysprop.apex", |
| 373 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | cc_library_static { |
| 377 | name: "libupdate_engine_android", |
| 378 | defaults: [ |
| 379 | "ue_defaults", |
| 380 | "libupdate_engine_android_exports", |
| 381 | ], |
| 382 | |
| 383 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 384 | // out of the DBus interface. |
| 385 | include_dirs: ["external/cros/system_api/dbus"], |
| 386 | |
| 387 | aidl: { |
| 388 | local_include_dirs: ["binder_bindings"], |
| 389 | export_aidl_headers: true, |
| 390 | }, |
| 391 | |
| 392 | srcs: [ |
| 393 | ":libupdate_engine_aidl", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 394 | "common/system_state.cc", |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 395 | "aosp/apex_handler_android.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 396 | "aosp/binder_service_android.cc", |
| 397 | "aosp/binder_service_stable_android.cc", |
| 398 | "aosp/daemon_android.cc", |
| 399 | "aosp/daemon_state_android.cc", |
| 400 | "aosp/hardware_android.cc", |
| 401 | "aosp/logging_android.cc", |
| 402 | "aosp/network_selector_android.cc", |
| 403 | "aosp/update_attempter_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 404 | "certificate_checker.cc", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 405 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 406 | "libcurl_http_fetcher.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 407 | "metrics_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 408 | "update_boot_flags_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 409 | ], |
| 410 | } |
| 411 | |
| 412 | // update_engine (type: executable) |
| 413 | // ======================================================== |
| 414 | // update_engine daemon. |
| 415 | cc_binary { |
| 416 | name: "update_engine", |
| 417 | defaults: [ |
| 418 | "ue_defaults", |
| 419 | "libupdate_engine_android_exports", |
| 420 | ], |
| 421 | |
| 422 | static_libs: ["libupdate_engine_android"], |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 423 | required: [ |
| 424 | "cacerts_google", |
Tianjie Xu | be4ea23 | 2019-10-15 18:08:31 -0700 | [diff] [blame] | 425 | "otacerts", |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 426 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 427 | |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 428 | srcs: ["main.cc", "aosp/metrics_reporter_android.cc"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 429 | init_rc: ["update_engine.rc"], |
| 430 | } |
| 431 | |
| 432 | // update_engine_sideload (type: executable) |
| 433 | // ======================================================== |
| 434 | // A binary executable equivalent to update_engine daemon that installs an update |
| 435 | // from a local file directly instead of running in the background. Used in |
| 436 | // recovery image. |
| 437 | cc_binary { |
| 438 | name: "update_engine_sideload", |
| 439 | defaults: [ |
| 440 | "ue_defaults", |
| 441 | "update_metadata-protos_exports", |
| 442 | "libupdate_engine_boot_control_exports", |
| 443 | "libpayload_consumer_exports", |
| 444 | ], |
| 445 | recovery: true, |
| 446 | |
| 447 | cflags: ["-D_UE_SIDELOAD"], |
| 448 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 449 | // out of the DBus interface. |
| 450 | include_dirs: ["external/cros/system_api/dbus"], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 451 | header_libs: ["libgtest_prod_headers"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 452 | |
| 453 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 454 | "aosp/hardware_android.cc", |
| 455 | "aosp/logging_android.cc", |
| 456 | "aosp/sideload_main.cc", |
| 457 | "aosp/update_attempter_android.cc", |
| 458 | "common/metrics_reporter_stub.cc", |
| 459 | "common/network_selector_stub.cc", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 460 | "common/system_state.cc", |
| 461 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 462 | "metrics_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 463 | "update_boot_flags_action.cc", |
| 464 | "update_status_utils.cc", |
| 465 | ], |
| 466 | |
| 467 | // Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out, |
| 468 | // as it doesn't look beneficial to be installed separately due to its size. Note |
| 469 | // that we explicitly request their recovery variants, so that the expected files |
| 470 | // will be used and installed. |
| 471 | shared_libs: [ |
| 472 | "libbase", |
| 473 | "liblog", |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 474 | "liblz4", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 475 | ], |
| 476 | static_libs: [ |
| 477 | "libpayload_consumer", |
| 478 | "libupdate_engine_boot_control", |
| 479 | "update_metadata-protos", |
| 480 | |
| 481 | // We add the static versions of the shared libraries that are not installed to |
| 482 | // recovery image due to size concerns. Need to include all the static library |
| 483 | // dependencies of these static libraries. |
Yifan Hong | 126d13e | 2020-09-21 19:50:06 -0700 | [diff] [blame] | 484 | "gkiprops", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 485 | "libevent", |
| 486 | "libmodpb64", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 487 | "libprotobuf-cpp-lite", |
| 488 | "libbrillo-stream", |
| 489 | "libbrillo", |
| 490 | "libchrome", |
| 491 | ], |
| 492 | target: { |
| 493 | recovery: { |
| 494 | exclude_shared_libs: [ |
| 495 | "libprotobuf-cpp-lite", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 496 | "libbrillo-stream", |
| 497 | "libbrillo", |
| 498 | "libchrome", |
| 499 | ], |
| 500 | }, |
| 501 | }, |
| 502 | |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 503 | required: [ |
Tianjie Xu | be4ea23 | 2019-10-15 18:08:31 -0700 | [diff] [blame] | 504 | "otacerts.recovery", |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 505 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 506 | } |
| 507 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 508 | // update_engine_client (type: executable) |
| 509 | // ======================================================== |
| 510 | // update_engine console client. |
| 511 | cc_binary { |
| 512 | name: "update_engine_client", |
| 513 | defaults: ["ue_defaults"], |
| 514 | |
| 515 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 516 | // out of the DBus interface. |
| 517 | include_dirs: ["external/cros/system_api/dbus"], |
| 518 | |
| 519 | shared_libs: [ |
| 520 | "libbinder", |
| 521 | "libbinderwrapper", |
| 522 | "libbrillo-binder", |
| 523 | "libutils", |
| 524 | ], |
| 525 | |
| 526 | aidl: { |
| 527 | local_include_dirs: ["binder_bindings"], |
| 528 | }, |
| 529 | |
| 530 | srcs: [ |
| 531 | ":libupdate_engine_aidl", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 532 | "aosp/update_engine_client_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 533 | "common/error_code_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 534 | "update_status_utils.cc", |
| 535 | ], |
| 536 | } |
| 537 | |
| 538 | // libpayload_generator (type: static_library) |
| 539 | // ======================================================== |
| 540 | // server-side code. This is used for delta_generator and unittests but not |
| 541 | // for any client code. |
| 542 | cc_defaults { |
| 543 | name: "libpayload_generator_exports", |
| 544 | defaults: [ |
| 545 | "libpayload_consumer_exports", |
| 546 | "update_metadata-protos_exports", |
Kelvin Zhang | 446989a | 2021-12-08 13:49:07 -0800 | [diff] [blame] | 547 | "erofs-utils_export_defaults", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 548 | ], |
| 549 | |
Tianjie | 37ae856 | 2020-03-25 15:16:01 -0700 | [diff] [blame] | 550 | header_libs: [ |
| 551 | "bootimg_headers", |
| 552 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 553 | static_libs: [ |
| 554 | "libavb", |
| 555 | "libbrotli", |
| 556 | "libbsdiff", |
| 557 | "libdivsufsort", |
| 558 | "libdivsufsort64", |
| 559 | "liblzma", |
| 560 | "libpayload_consumer", |
| 561 | "libpuffdiff", |
Tianjie | a69cfe2 | 2021-08-22 23:28:44 -0700 | [diff] [blame] | 562 | "libzucchini", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 563 | "libverity_tree", |
| 564 | "update_metadata-protos", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 565 | "libpayload_extent_utils", |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 566 | "libcow_size_estimator", |
Kelvin Zhang | 446989a | 2021-12-08 13:49:07 -0800 | [diff] [blame] | 567 | "liberofs", |
| 568 | "lz4diff-protos", |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 569 | "liblz4diff", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 570 | ], |
| 571 | shared_libs: [ |
| 572 | "libbase", |
| 573 | "libext2fs", |
Kelvin Zhang | 446989a | 2021-12-08 13:49:07 -0800 | [diff] [blame] | 574 | // LZ4 has to be a shared lib, as we want to override it with |
| 575 | // LD_LIBRARY_PRELOAD later |
| 576 | "liblz4", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 577 | ], |
| 578 | } |
| 579 | |
| 580 | cc_library_static { |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 581 | name: "libpayload_extent_ranges", |
| 582 | defaults: [ |
| 583 | "ue_defaults", |
| 584 | ], |
| 585 | host_supported: true, |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 586 | recovery_available: true, |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 587 | srcs: [ |
| 588 | "payload_generator/extent_ranges.cc", |
| 589 | ], |
| 590 | static_libs: [ |
| 591 | "update_metadata-protos", |
| 592 | ], |
| 593 | } |
| 594 | |
| 595 | cc_library_static { |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 596 | name: "libcow_size_estimator", |
| 597 | defaults: [ |
| 598 | "ue_defaults", |
| 599 | "update_metadata-protos_exports" |
| 600 | ], |
| 601 | host_supported: true, |
| 602 | recovery_available: true, |
| 603 | srcs: [ |
| 604 | "payload_generator/cow_size_estimator.cc", |
| 605 | ], |
| 606 | static_libs: [ |
| 607 | "update_metadata-protos", |
| 608 | "libbase", |
| 609 | "libsnapshot_cow", |
| 610 | "libcow_operation_convert", |
| 611 | ], |
| 612 | } |
| 613 | |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 614 | cc_defaults { |
| 615 | name: "liblz4diff_defaults", |
| 616 | static_libs: [ |
| 617 | "lz4diff-protos", |
| 618 | "update_metadata-protos", |
| 619 | "libssl", |
| 620 | "libbsdiff", |
| 621 | "libpuffdiff", |
| 622 | ], |
| 623 | shared_libs: [ |
| 624 | "liblz4", |
Kelvin Zhang | 893b3a1 | 2021-12-30 12:28:53 -0800 | [diff] [blame] | 625 | ], |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 626 | } |
| 627 | |
| 628 | cc_library_static { |
| 629 | name: "liblz4diff", |
| 630 | host_supported: true, |
| 631 | defaults: ["ue_defaults", "liblz4diff_defaults"], |
| 632 | srcs: [ |
Kelvin Zhang | 893b3a1 | 2021-12-30 12:28:53 -0800 | [diff] [blame] | 633 | "lz4diff/lz4diff.cc", |
Kelvin Zhang | 4eae81e | 2021-12-09 17:07:17 -0800 | [diff] [blame] | 634 | "lz4diff/lz4diff_compress.cc", |
| 635 | ], |
| 636 | } |
| 637 | |
| 638 | cc_library_static { |
| 639 | name: "liblz4patch", |
| 640 | host_supported: true, |
| 641 | recovery_available: true, |
| 642 | defaults: ["ue_defaults"], |
| 643 | static_libs: [ |
| 644 | "lz4diff-protos", |
| 645 | "update_metadata-protos", |
| 646 | "libssl", |
| 647 | "libbspatch", |
| 648 | "libpuffpatch", |
| 649 | ], |
| 650 | shared_libs: [ |
| 651 | "liblz4", |
| 652 | ], |
| 653 | srcs: [ |
| 654 | "lz4diff/lz4patch.cc", |
| 655 | "lz4diff/lz4diff_compress.cc", |
| 656 | ], |
| 657 | } |
| 658 | |
Kelvin Zhang | 35cff4f | 2021-12-08 16:06:00 -0800 | [diff] [blame] | 659 | cc_binary_host { |
| 660 | name: "lz4diff", |
| 661 | defaults: [ |
| 662 | "ue_defaults", |
| 663 | "libpayload_generator_exports", |
| 664 | ], |
| 665 | static_libs: [ |
| 666 | "libpayload_generator", |
| 667 | "liblz4diff", |
| 668 | "liblz4patch", |
| 669 | ], |
| 670 | srcs: [ |
| 671 | "lz4diff/lz4diff_main.cc", |
| 672 | ], |
| 673 | } |
| 674 | |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 675 | cc_library_static { |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 676 | name: "libpayload_generator", |
| 677 | defaults: [ |
| 678 | "ue_defaults", |
| 679 | "libpayload_generator_exports", |
| 680 | ], |
| 681 | host_supported: true, |
| 682 | |
| 683 | srcs: [ |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 684 | "common/system_state.cc", |
| 685 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 686 | "payload_generator/ab_generator.cc", |
| 687 | "payload_generator/annotated_operation.cc", |
| 688 | "payload_generator/blob_file_writer.cc", |
| 689 | "payload_generator/block_mapping.cc", |
| 690 | "payload_generator/boot_img_filesystem.cc", |
| 691 | "payload_generator/bzip.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 692 | "payload_generator/deflate_utils.cc", |
| 693 | "payload_generator/delta_diff_generator.cc", |
| 694 | "payload_generator/delta_diff_utils.cc", |
| 695 | "payload_generator/ext2_filesystem.cc", |
Kelvin Zhang | 446989a | 2021-12-08 13:49:07 -0800 | [diff] [blame] | 696 | "payload_generator/erofs_filesystem.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 697 | "payload_generator/extent_ranges.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 698 | "payload_generator/full_update_generator.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 699 | "payload_generator/mapfile_filesystem.cc", |
Tianjie | e9156ec | 2020-08-11 11:13:54 -0700 | [diff] [blame] | 700 | "payload_generator/merge_sequence_generator.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 701 | "payload_generator/payload_file.cc", |
| 702 | "payload_generator/payload_generation_config_android.cc", |
| 703 | "payload_generator/payload_generation_config.cc", |
Amin Hassani | 7982100 | 2019-05-06 17:40:49 -0700 | [diff] [blame] | 704 | "payload_generator/payload_properties.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 705 | "payload_generator/payload_signer.cc", |
| 706 | "payload_generator/raw_filesystem.cc", |
| 707 | "payload_generator/squashfs_filesystem.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 708 | "payload_generator/xz_android.cc", |
| 709 | ], |
| 710 | } |
| 711 | |
| 712 | // delta_generator (type: executable) |
| 713 | // ======================================================== |
| 714 | // server-side delta generator. |
| 715 | cc_binary_host { |
| 716 | name: "delta_generator", |
| 717 | defaults: [ |
| 718 | "ue_defaults", |
| 719 | "libpayload_generator_exports", |
| 720 | "libpayload_consumer_exports", |
| 721 | ], |
| 722 | |
| 723 | static_libs: [ |
| 724 | "libavb_host_sysdeps", |
| 725 | "libpayload_consumer", |
| 726 | "libpayload_generator", |
| 727 | ], |
| 728 | |
| 729 | srcs: ["payload_generator/generate_delta_main.cc"], |
| 730 | } |
| 731 | |
| 732 | cc_test { |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 733 | host_supported: true, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 734 | name: "ue_unittest_delta_generator", |
| 735 | defaults: [ |
| 736 | "ue_defaults", |
| 737 | "libpayload_generator_exports", |
| 738 | "libpayload_consumer_exports", |
| 739 | ], |
| 740 | |
| 741 | static_libs: [ |
| 742 | "libpayload_consumer", |
| 743 | "libpayload_generator", |
| 744 | ], |
| 745 | |
| 746 | srcs: ["payload_generator/generate_delta_main.cc"], |
| 747 | |
| 748 | gtest: false, |
| 749 | stem: "delta_generator", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 750 | } |
| 751 | |
| 752 | // test_http_server (type: executable) |
| 753 | // ======================================================== |
| 754 | // Test HTTP Server. |
| 755 | cc_test { |
| 756 | name: "test_http_server", |
| 757 | defaults: ["ue_defaults"], |
| 758 | srcs: [ |
| 759 | "common/http_common.cc", |
| 760 | "test_http_server.cc", |
| 761 | ], |
| 762 | |
| 763 | gtest: false, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 764 | } |
| 765 | |
| 766 | // test_subprocess (type: executable) |
| 767 | // ======================================================== |
| 768 | // Test helper subprocess program. |
| 769 | cc_test { |
| 770 | name: "test_subprocess", |
| 771 | defaults: ["ue_defaults"], |
| 772 | srcs: ["test_subprocess.cc"], |
| 773 | |
| 774 | gtest: false, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 775 | } |
| 776 | |
| 777 | // Public keys for unittests. |
| 778 | // ======================================================== |
| 779 | genrule { |
| 780 | name: "ue_unittest_keys", |
| 781 | cmd: "openssl rsa -in $(location unittest_key.pem) -pubout -out $(location unittest_key.pub.pem) &&" + |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 782 | "openssl rsa -in $(location unittest_key2.pem) -pubout -out $(location unittest_key2.pub.pem) &&" + |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 783 | "openssl rsa -in $(location unittest_key_RSA4096.pem) -pubout -out $(location unittest_key_RSA4096.pub.pem) &&" + |
| 784 | "openssl pkey -in $(location unittest_key_EC.pem) -pubout -out $(location unittest_key_EC.pub.pem)", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 785 | srcs: [ |
| 786 | "unittest_key.pem", |
| 787 | "unittest_key2.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 788 | "unittest_key_RSA4096.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 789 | "unittest_key_EC.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 790 | ], |
| 791 | out: [ |
| 792 | "unittest_key.pub.pem", |
| 793 | "unittest_key2.pub.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 794 | "unittest_key_RSA4096.pub.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 795 | "unittest_key_EC.pub.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 796 | ], |
| 797 | } |
| 798 | |
| 799 | // Sample images for unittests. |
| 800 | // ======================================================== |
| 801 | // Extract sample image from the compressed sample_images.tar.bz2 file used by |
| 802 | // the unittests. |
| 803 | genrule { |
| 804 | name: "ue_unittest_disk_imgs", |
| 805 | cmd: "tar -jxf $(in) -C $(genDir)/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img", |
| 806 | srcs: ["sample_images/sample_images.tar.bz2"], |
| 807 | out: [ |
| 808 | "gen/disk_ext2_1k.img", |
| 809 | "gen/disk_ext2_4k.img", |
| 810 | "gen/disk_ext2_4k_empty.img", |
| 811 | "gen/disk_ext2_unittest.img", |
| 812 | ], |
| 813 | } |
| 814 | |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 815 | genrule { |
| 816 | name: "ue_unittest_erofs_imgs", |
Kelvin Zhang | 893b3a1 | 2021-12-30 12:28:53 -0800 | [diff] [blame] | 817 | cmd: "$(in) $(location mkfs.erofs) $(location gen/erofs_empty.img) && " + |
| 818 | "$(in) $(location mkfs.erofs) $(location gen/erofs.img) $(location delta_generator) && " + |
| 819 | "$(in) $(location mkfs.erofs) $(location gen/erofs_new.img) $(location delta_generator) lz4hc,7", |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 820 | srcs: ["sample_images/generate_test_erofs_images.sh"], |
| 821 | out: [ |
| 822 | "gen/erofs.img", |
Kelvin Zhang | 893b3a1 | 2021-12-30 12:28:53 -0800 | [diff] [blame] | 823 | "gen/erofs_new.img", |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 824 | "gen/erofs_empty.img", |
| 825 | ], |
| 826 | tools: [ |
| 827 | "mkfs.erofs", |
| 828 | "delta_generator", |
| 829 | ], |
| 830 | } |
| 831 | |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 832 | filegroup { |
Chih-Hung Hsieh | 85ad147 | 2022-02-17 17:32:12 -0800 | [diff] [blame] | 833 | name: "update_engine_host_unittest_timeout_srcs", |
| 834 | srcs: [ |
| 835 | "common/action_processor_unittest.cc", |
| 836 | "common/file_fetcher_unittest.cc", |
| 837 | "payload_generator/delta_diff_utils_unittest.cc", |
| 838 | ], |
| 839 | } |
| 840 | |
| 841 | filegroup { |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 842 | name: "update_engine_host_unittest_srcs", |
| 843 | srcs: [ |
| 844 | "common/action_pipe_unittest.cc", |
| 845 | "common/action_processor_unittest.cc", |
| 846 | "common/action_unittest.cc", |
| 847 | "common/cow_operation_convert_unittest.cc", |
| 848 | "common/cpu_limiter_unittest.cc", |
| 849 | "common/fake_prefs.cc", |
| 850 | "common/file_fetcher_unittest.cc", |
| 851 | "common/hash_calculator_unittest.cc", |
| 852 | "common/hwid_override_unittest.cc", |
| 853 | "common/metrics_reporter_stub.cc", |
| 854 | "common/mock_http_fetcher.cc", |
| 855 | "common/prefs_unittest.cc", |
| 856 | "common/terminator_unittest.cc", |
| 857 | "common/test_utils.cc", |
Kelvin Zhang | 5562403 | 2021-12-20 12:13:24 -0800 | [diff] [blame] | 858 | "lz4diff/lz4diff_compress_unittest.cc", |
Kelvin Zhang | 893b3a1 | 2021-12-30 12:28:53 -0800 | [diff] [blame] | 859 | "lz4diff/lz4diff_unittest.cc", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 860 | "payload_generator/ab_generator_unittest.cc", |
| 861 | "payload_generator/blob_file_writer_unittest.cc", |
| 862 | "payload_generator/block_mapping_unittest.cc", |
| 863 | "payload_generator/boot_img_filesystem_unittest.cc", |
| 864 | "payload_generator/deflate_utils_unittest.cc", |
| 865 | "payload_generator/delta_diff_utils_unittest.cc", |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 866 | "payload_generator/erofs_filesystem_unittest.cc", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 867 | "payload_generator/ext2_filesystem_unittest.cc", |
| 868 | "payload_generator/extent_ranges_unittest.cc", |
| 869 | "payload_generator/extent_utils_unittest.cc", |
| 870 | "payload_generator/fake_filesystem.cc", |
| 871 | "payload_generator/full_update_generator_unittest.cc", |
| 872 | "payload_generator/mapfile_filesystem_unittest.cc", |
| 873 | "payload_generator/merge_sequence_generator_unittest.cc", |
| 874 | "payload_generator/payload_file_unittest.cc", |
| 875 | "payload_generator/payload_generation_config_android_unittest.cc", |
| 876 | "payload_generator/payload_generation_config_unittest.cc", |
| 877 | "payload_generator/payload_properties_unittest.cc", |
| 878 | "payload_generator/payload_signer_unittest.cc", |
| 879 | "payload_generator/squashfs_filesystem_unittest.cc", |
| 880 | "payload_generator/zip_unittest.cc", |
Kelvin Zhang | e4bffe6 | 2022-03-07 09:08:38 -0800 | [diff] [blame] | 881 | "payload_consumer/verity_writer_android_unittest.cc", |
| 882 | "payload_consumer/xz_extent_writer_unittest.cc", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 883 | "testrunner.cc", |
| 884 | ], |
| 885 | } |
| 886 | |
| 887 | cc_test_host { |
| 888 | name: "update_engine_host_unittests", |
| 889 | defaults: [ |
| 890 | "ue_defaults", |
| 891 | "libpayload_generator_exports", |
| 892 | ], |
| 893 | strip: { |
| 894 | none: true, |
| 895 | }, |
| 896 | cflags: [ |
| 897 | "-g3", |
| 898 | ], |
Chih-Hung Hsieh | 85ad147 | 2022-02-17 17:32:12 -0800 | [diff] [blame] | 899 | tidy_timeout_srcs: [":update_engine_host_unittest_timeout_srcs"], |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 900 | srcs: [":update_engine_host_unittest_srcs"], |
| 901 | data: [ |
| 902 | ":ue_unittest_delta_generator", |
| 903 | ":ue_unittest_disk_imgs", |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 904 | ":ue_unittest_erofs_imgs", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 905 | ":ue_unittest_keys", |
| 906 | "otacerts.zip", |
| 907 | "unittest_key.pem", |
| 908 | "unittest_key2.pem", |
| 909 | "unittest_key_RSA4096.pem", |
| 910 | "unittest_key_EC.pem", |
| 911 | "update_engine.conf", |
| 912 | ], |
| 913 | static_libs: [ |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 914 | "libgmock", |
| 915 | "libpayload_generator", |
| 916 | ], |
| 917 | } |
| 918 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 919 | // update_engine_unittests (type: executable) |
| 920 | // ======================================================== |
| 921 | // Main unittest file. |
| 922 | cc_test { |
Kelvin Zhang | 7e5b405 | 2022-03-22 12:17:59 -0700 | [diff] [blame] | 923 | name: "update_engine_http_unittests", |
| 924 | defaults: [ |
| 925 | "ue_defaults", |
| 926 | "liblz4diff_defaults", |
| 927 | "update_metadata-protos_exports", |
| 928 | ], |
| 929 | require_root: true, |
| 930 | static_libs: [ |
| 931 | "libbase", |
| 932 | "libbrillo-test-helpers", |
| 933 | "libchrome_test_helpers", |
| 934 | "libcurl", |
| 935 | "libcutils", |
| 936 | "libdm", |
| 937 | "libgmock", |
| 938 | "libz", |
| 939 | ], |
| 940 | shared_libs: [ |
| 941 | "libssl", |
| 942 | "libcrypto", |
| 943 | "libziparchive", |
| 944 | "liblog", |
| 945 | ], |
| 946 | |
| 947 | data: [ |
| 948 | ":test_http_server", |
| 949 | ":test_subprocess", |
| 950 | ":ue_unittest_keys", |
| 951 | "otacerts.zip", |
| 952 | "unittest_key.pem", |
| 953 | "unittest_key2.pem", |
| 954 | "unittest_key_RSA4096.pem", |
| 955 | "unittest_key_EC.pem", |
| 956 | ], |
| 957 | |
| 958 | // We cannot use the default generated AndroidTest.xml because of the use of helper modules |
| 959 | // (i.e. test_http_server, test_subprocess, ue_unittest_delta_generator). |
| 960 | // test_config: "test_config.xml", |
| 961 | test_suites: ["device-tests"], |
| 962 | |
| 963 | srcs: [ |
| 964 | "aosp/platform_constants_android.cc", |
| 965 | "certificate_checker.cc", |
| 966 | "common/action_processor.cc", |
| 967 | "common/boot_control_stub.cc", |
| 968 | "common/error_code_utils.cc", |
| 969 | "common/file_fetcher.cc", |
| 970 | "common/hash_calculator.cc", |
| 971 | "common/http_fetcher.cc", |
| 972 | "common/multi_range_http_fetcher.cc", |
| 973 | "common/http_common.cc", |
| 974 | "common/subprocess.cc", |
| 975 | "common/test_utils.cc", |
| 976 | "common/utils.cc", |
| 977 | "common/proxy_resolver.cc", |
| 978 | "libcurl_http_fetcher.cc", |
| 979 | "payload_consumer/certificate_parser_android.cc", |
| 980 | "payload_consumer/payload_verifier.cc", |
| 981 | "payload_generator/payload_signer.cc", |
| 982 | "update_status_utils.cc", |
| 983 | |
| 984 | "certificate_checker_unittest.cc", |
| 985 | "common/http_fetcher_unittest.cc", |
| 986 | "common/mock_http_fetcher.cc", |
| 987 | "common/proxy_resolver_unittest.cc", |
| 988 | "common/subprocess_unittest.cc", |
| 989 | "libcurl_http_fetcher_unittest.cc", |
| 990 | "payload_consumer/certificate_parser_android_unittest.cc", |
| 991 | "update_status_utils_unittest.cc", |
| 992 | ], |
| 993 | } |
| 994 | |
| 995 | // update_engine_unittests (type: executable) |
| 996 | // ======================================================== |
| 997 | // Main unittest file. |
| 998 | cc_test { |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 999 | name: "update_engine_unittests", |
| 1000 | defaults: [ |
| 1001 | "ue_defaults", |
| 1002 | "libpayload_generator_exports", |
| 1003 | "libupdate_engine_android_exports", |
| 1004 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1005 | |
| 1006 | static_libs: [ |
| 1007 | "libpayload_generator", |
| 1008 | "libbrillo-test-helpers", |
| 1009 | "libgmock", |
| 1010 | "libchrome_test_helpers", |
| 1011 | "libupdate_engine_android", |
Tianjie Xu | 173e619 | 2019-12-10 10:56:01 -0800 | [diff] [blame] | 1012 | "libdm", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1013 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1014 | |
Yifan Hong | 87ea73f | 2019-09-12 13:07:37 -0700 | [diff] [blame] | 1015 | header_libs: [ |
| 1016 | "libstorage_literals_headers", |
| 1017 | ], |
| 1018 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1019 | data: [ |
Tao Bao | 9456b6f | 2019-04-29 18:14:58 -0700 | [diff] [blame] | 1020 | ":ue_unittest_delta_generator", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1021 | ":ue_unittest_disk_imgs", |
Kelvin Zhang | 759e8b9 | 2021-12-21 16:46:58 -0800 | [diff] [blame] | 1022 | ":ue_unittest_erofs_imgs", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1023 | ":ue_unittest_keys", |
Tianjie Xu | 7a78d63 | 2019-10-08 16:32:39 -0700 | [diff] [blame] | 1024 | "otacerts.zip", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1025 | "unittest_key.pem", |
| 1026 | "unittest_key2.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 1027 | "unittest_key_RSA4096.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 1028 | "unittest_key_EC.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1029 | "update_engine.conf", |
| 1030 | ], |
| 1031 | |
Tao Bao | 9456b6f | 2019-04-29 18:14:58 -0700 | [diff] [blame] | 1032 | // We cannot use the default generated AndroidTest.xml because of the use of helper modules |
| 1033 | // (i.e. test_http_server, test_subprocess, ue_unittest_delta_generator). |
| 1034 | test_config: "test_config.xml", |
| 1035 | test_suites: ["device-tests"], |
| 1036 | |
Chih-Hung Hsieh | 85ad147 | 2022-02-17 17:32:12 -0800 | [diff] [blame] | 1037 | tidy_timeout_srcs: [ |
| 1038 | ":update_engine_host_unittest_timeout_srcs", |
| 1039 | "aosp/dynamic_partition_control_android_unittest.cc", |
| 1040 | "common/http_fetcher_unittest.cc", |
| 1041 | "payload_consumer/delta_performer_integration_test.cc", |
| 1042 | "payload_consumer/delta_performer_unittest.cc", |
| 1043 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1044 | srcs: [ |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 1045 | ":update_engine_host_unittest_srcs", |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 1046 | "aosp/apex_handler_android_unittest.cc", |
Kelvin Zhang | b4b95c2 | 2021-04-05 15:56:26 -0400 | [diff] [blame] | 1047 | "aosp/cleanup_previous_update_action_unittest.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 1048 | "aosp/dynamic_partition_control_android_unittest.cc", |
Kelvin Zhang | 3fe4964 | 2021-10-04 15:35:02 -0700 | [diff] [blame] | 1049 | "aosp/update_attempter_android_integration_test.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 1050 | "aosp/update_attempter_android_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1051 | "common/utils_unittest.cc", |
Kelvin Zhang | 4e93cf1 | 2021-09-13 16:03:24 -0700 | [diff] [blame] | 1052 | "download_action_android_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1053 | "payload_consumer/bzip_extent_writer_unittest.cc", |
| 1054 | "payload_consumer/cached_file_descriptor_unittest.cc", |
Kelvin Zhang | 46d6c49 | 2021-04-26 17:51:25 -0400 | [diff] [blame] | 1055 | "payload_consumer/cow_writer_file_descriptor_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1056 | "payload_consumer/delta_performer_integration_test.cc", |
| 1057 | "payload_consumer/delta_performer_unittest.cc", |
| 1058 | "payload_consumer/extent_reader_unittest.cc", |
| 1059 | "payload_consumer/extent_writer_unittest.cc", |
Kelvin Zhang | c5803b7 | 2021-09-02 09:06:16 -0700 | [diff] [blame] | 1060 | "payload_consumer/extent_map_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1061 | "payload_consumer/fake_file_descriptor.cc", |
| 1062 | "payload_consumer/file_descriptor_utils_unittest.cc", |
| 1063 | "payload_consumer/file_writer_unittest.cc", |
| 1064 | "payload_consumer/filesystem_verifier_action_unittest.cc", |
Amin Hassani | 2379503 | 2020-11-24 14:38:55 -0800 | [diff] [blame] | 1065 | "payload_consumer/install_plan_unittest.cc", |
Kelvin Zhang | 40d9666 | 2021-02-24 14:21:29 -0500 | [diff] [blame] | 1066 | "payload_consumer/install_operation_executor_unittest.cc", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 1067 | "payload_consumer/partition_update_generator_android_unittest.cc", |
Kelvin Zhang | 4e93cf1 | 2021-09-13 16:03:24 -0700 | [diff] [blame] | 1068 | "payload_consumer/partition_writer_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1069 | "payload_consumer/postinstall_runner_action_unittest.cc", |
Kelvin Zhang | 4e93cf1 | 2021-09-13 16:03:24 -0700 | [diff] [blame] | 1070 | "payload_consumer/snapshot_extent_writer_unittest.cc", |
| 1071 | "payload_consumer/vabc_partition_writer_unittest.cc", |
Kelvin Zhang | 4e93cf1 | 2021-09-13 16:03:24 -0700 | [diff] [blame] | 1072 | "payload_consumer/xor_extent_writer_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1073 | ], |
| 1074 | } |
| 1075 | |
| 1076 | // Brillo update payload generation script |
| 1077 | // ======================================================== |
Martin Stjernholm | 18e9f3c | 2020-09-08 13:56:59 +0100 | [diff] [blame] | 1078 | sh_binary { |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1079 | name: "brillo_update_payload", |
| 1080 | device_supported: false, |
| 1081 | host_supported: true, |
| 1082 | |
Martin Stjernholm | 18e9f3c | 2020-09-08 13:56:59 +0100 | [diff] [blame] | 1083 | src: "scripts/brillo_update_payload", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 1084 | required: [ |
| 1085 | "delta_generator", |
| 1086 | "shflags", |
| 1087 | "simg2img", |
| 1088 | ], |
| 1089 | |
| 1090 | target: { |
| 1091 | darwin: { |
| 1092 | enabled: false, |
| 1093 | }, |
| 1094 | }, |
Colin Cross | 606913a | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 1095 | } |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 1096 | |
| 1097 | // update_engine header library |
| 1098 | cc_library_headers { |
| 1099 | name: "libupdate_engine_headers", |
Yifan Hong | 309c8a8 | 2020-10-06 18:31:08 -0700 | [diff] [blame] | 1100 | |
| 1101 | // This header library is available to core and product modules. |
Justin Yun | 6d121de | 2020-11-11 19:31:57 +0900 | [diff] [blame] | 1102 | product_available: true, |
Yifan Hong | 309c8a8 | 2020-10-06 18:31:08 -0700 | [diff] [blame] | 1103 | |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 1104 | export_include_dirs: ["."], |
| 1105 | apex_available: [ |
| 1106 | "com.android.gki.*", |
David Anderson | 5e6dfe3 | 2020-09-17 15:50:33 -0700 | [diff] [blame] | 1107 | "//apex_available:platform", |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 1108 | ], |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 1109 | host_supported: true, |
David Anderson | 5e6dfe3 | 2020-09-17 15:50:33 -0700 | [diff] [blame] | 1110 | recovery_available: true, |
| 1111 | ramdisk_available: true, |
| 1112 | |
| 1113 | target: { |
| 1114 | darwin: { |
| 1115 | enabled: false, |
| 1116 | }, |
| 1117 | } |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 1118 | } |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 1119 | |
| 1120 | cc_binary_host { |
| 1121 | name: "cow_converter", |
| 1122 | defaults: [ |
| 1123 | "ue_defaults", |
| 1124 | "libpayload_consumer_exports", |
| 1125 | ], |
| 1126 | srcs: [ |
| 1127 | "aosp/cow_converter.cc", |
| 1128 | ], |
| 1129 | static_libs: [ |
| 1130 | "liblog", |
| 1131 | "libbrotli", |
| 1132 | "libbase", |
| 1133 | "libcow_operation_convert", |
| 1134 | "libcow_size_estimator", |
| 1135 | "libpayload_consumer", |
| 1136 | "libpayload_extent_ranges", |
| 1137 | "libpayload_extent_utils", |
| 1138 | "libsnapshot_cow", |
| 1139 | "libz", |
| 1140 | "update_metadata-protos", |
| 1141 | ], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 1142 | } |
Kelvin Zhang | 98001b2 | 2021-12-08 14:10:11 -0800 | [diff] [blame] | 1143 | |
| 1144 | cc_library_static { |
| 1145 | name: "lz4diff-protos", |
| 1146 | host_supported: true, |
| 1147 | ramdisk_available: true, |
| 1148 | recovery_available: true, |
| 1149 | |
| 1150 | srcs: ["lz4diff/lz4diff.proto"], |
| 1151 | cflags: [ |
| 1152 | "-Wall", |
| 1153 | "-Werror", |
| 1154 | ], |
| 1155 | proto: { |
| 1156 | canonical_path_from_root: false, |
| 1157 | export_proto_headers: true, |
| 1158 | }, |
| 1159 | } |
Kelvin Zhang | 596a320 | 2022-03-07 14:13:42 -0800 | [diff] [blame] | 1160 | |
| 1161 | cc_binary_host { |
| 1162 | name: "ota_extractor", |
| 1163 | defaults: [ |
| 1164 | "ue_defaults", |
| 1165 | "libpayload_consumer_exports", |
| 1166 | ], |
| 1167 | srcs: [ |
| 1168 | "aosp/ota_extractor.cc", |
| 1169 | ], |
| 1170 | static_libs: [ |
| 1171 | "liblog", |
| 1172 | "libbrotli", |
| 1173 | "libbase", |
| 1174 | "libpayload_consumer", |
| 1175 | "libpayload_extent_ranges", |
| 1176 | "libpayload_extent_utils", |
| 1177 | "libz", |
| 1178 | "libgflags", |
| 1179 | "update_metadata-protos", |
| 1180 | ], |
| 1181 | } |