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", |
| 62 | ], |
| 63 | cppflags: [ |
| 64 | "-Wnon-virtual-dtor", |
| 65 | "-fno-strict-aliasing", |
| 66 | ], |
| 67 | include_dirs: ["system"], |
| 68 | local_include_dirs: ["client_library/include"], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 69 | header_libs: ["libgtest_prod_headers"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 70 | shared_libs: [ |
| 71 | "libbrillo-stream", |
| 72 | "libbrillo", |
| 73 | "libchrome", |
| 74 | ], |
| 75 | ldflags: ["-Wl,--gc-sections"], |
| 76 | |
| 77 | product_variables: { |
| 78 | pdk: { |
| 79 | enabled: false, |
| 80 | }, |
| 81 | }, |
| 82 | |
| 83 | target: { |
Sen Jiang | b5f631d | 2018-12-18 16:59:57 -0800 | [diff] [blame] | 84 | android: { |
| 85 | cflags: [ |
| 86 | "-DUSE_FEC=1", |
| 87 | ], |
| 88 | }, |
| 89 | host: { |
| 90 | cflags: [ |
| 91 | "-DUSE_FEC=0", |
| 92 | ], |
| 93 | }, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 94 | darwin: { |
| 95 | enabled: false, |
| 96 | }, |
| 97 | }, |
| 98 | } |
| 99 | |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 100 | // libcow_operation_convert (type: library) |
| 101 | // ======================================================== |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 102 | cc_library_static { |
| 103 | name: "libpayload_extent_utils", |
| 104 | defaults: [ |
| 105 | "ue_defaults", |
| 106 | ], |
| 107 | host_supported: true, |
| 108 | recovery_available: true, |
| 109 | srcs: [ |
| 110 | "payload_generator/extent_utils.cc", |
| 111 | ], |
| 112 | static_libs: [ |
| 113 | "update_metadata-protos", |
| 114 | ], |
| 115 | } |
| 116 | |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 117 | cc_library { |
| 118 | name: "libcow_operation_convert", |
| 119 | host_supported: true, |
| 120 | recovery_available: true, |
| 121 | defaults: [ |
| 122 | "ue_defaults", |
| 123 | "update_metadata-protos_exports", |
| 124 | ], |
| 125 | srcs: [ |
| 126 | "common/cow_operation_convert.cc", |
| 127 | ], |
| 128 | static_libs: [ |
| 129 | "libsnapshot_cow", |
| 130 | "update_metadata-protos", |
| 131 | "libpayload_extent_ranges", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 132 | "libpayload_extent_utils", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 133 | "libbrotli", |
| 134 | "libz", |
| 135 | ], |
| 136 | } |
| 137 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 138 | // update_metadata-protos (type: static_library) |
| 139 | // ======================================================== |
| 140 | // Protobufs. |
| 141 | cc_defaults { |
| 142 | name: "update_metadata-protos_exports", |
| 143 | |
| 144 | shared_libs: ["libprotobuf-cpp-lite"], |
| 145 | } |
| 146 | |
| 147 | cc_library_static { |
| 148 | name: "update_metadata-protos", |
| 149 | host_supported: true, |
Inseob Kim | 3cce62a | 2021-06-14 11:55:35 +0900 | [diff] [blame] | 150 | ramdisk_available: true, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 151 | recovery_available: true, |
| 152 | |
| 153 | srcs: ["update_engine/update_metadata.proto"], |
| 154 | cflags: [ |
| 155 | "-Wall", |
| 156 | "-Werror", |
| 157 | ], |
| 158 | proto: { |
| 159 | canonical_path_from_root: false, |
| 160 | export_proto_headers: true, |
| 161 | }, |
| 162 | } |
| 163 | |
| 164 | // libpayload_consumer (type: static_library) |
| 165 | // ======================================================== |
| 166 | // The payload application component and common dependencies. |
| 167 | cc_defaults { |
| 168 | name: "libpayload_consumer_exports", |
| 169 | defaults: ["update_metadata-protos_exports"], |
| 170 | |
| 171 | static_libs: [ |
| 172 | "update_metadata-protos", |
| 173 | "libxz", |
| 174 | "libbz", |
| 175 | "libbspatch", |
| 176 | "libbrotli", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 177 | "libc++fs", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 178 | "libfec_rs", |
| 179 | "libpuffpatch", |
| 180 | "libverity_tree", |
Kelvin Zhang | 94f51cc | 2020-09-25 11:34:49 -0400 | [diff] [blame] | 181 | "libsnapshot_cow", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 182 | "libbrotli", |
| 183 | "libz", |
| 184 | "libpayload_extent_ranges", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 185 | "libpayload_extent_utils", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 186 | "libcow_operation_convert", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 187 | ], |
| 188 | shared_libs: [ |
| 189 | "libbase", |
| 190 | "libcrypto", |
Sen Jiang | b5f631d | 2018-12-18 16:59:57 -0800 | [diff] [blame] | 191 | "libfec", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 192 | "libziparchive", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 193 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | cc_library_static { |
| 197 | name: "libpayload_consumer", |
| 198 | defaults: [ |
| 199 | "ue_defaults", |
| 200 | "libpayload_consumer_exports", |
| 201 | ], |
| 202 | host_supported: true, |
| 203 | recovery_available: true, |
| 204 | |
| 205 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 206 | "aosp/platform_constants_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 207 | "common/action_processor.cc", |
| 208 | "common/boot_control_stub.cc", |
| 209 | "common/clock.cc", |
| 210 | "common/constants.cc", |
| 211 | "common/cpu_limiter.cc", |
Yifan Hong | daac732 | 2019-11-07 10:48:26 -0800 | [diff] [blame] | 212 | "common/dynamic_partition_control_stub.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 213 | "common/error_code_utils.cc", |
| 214 | "common/file_fetcher.cc", |
| 215 | "common/hash_calculator.cc", |
| 216 | "common/http_common.cc", |
| 217 | "common/http_fetcher.cc", |
| 218 | "common/hwid_override.cc", |
| 219 | "common/multi_range_http_fetcher.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 220 | "common/prefs.cc", |
| 221 | "common/proxy_resolver.cc", |
| 222 | "common/subprocess.cc", |
| 223 | "common/terminator.cc", |
| 224 | "common/utils.cc", |
| 225 | "payload_consumer/bzip_extent_writer.cc", |
| 226 | "payload_consumer/cached_file_descriptor.cc", |
Tianjie Xu | 7a78d63 | 2019-10-08 16:32:39 -0700 | [diff] [blame] | 227 | "payload_consumer/certificate_parser_android.cc", |
Kelvin Zhang | 569c97e | 2020-10-26 12:12:24 -0400 | [diff] [blame] | 228 | "payload_consumer/cow_writer_file_descriptor.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 229 | "payload_consumer/delta_performer.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 230 | "payload_consumer/extent_reader.cc", |
| 231 | "payload_consumer/extent_writer.cc", |
| 232 | "payload_consumer/file_descriptor.cc", |
| 233 | "payload_consumer/file_descriptor_utils.cc", |
| 234 | "payload_consumer/file_writer.cc", |
| 235 | "payload_consumer/filesystem_verifier_action.cc", |
Kelvin Zhang | 40d9666 | 2021-02-24 14:21:29 -0500 | [diff] [blame] | 236 | "payload_consumer/install_operation_executor.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 237 | "payload_consumer/install_plan.cc", |
| 238 | "payload_consumer/mount_history.cc", |
| 239 | "payload_consumer/payload_constants.cc", |
| 240 | "payload_consumer/payload_metadata.cc", |
| 241 | "payload_consumer/payload_verifier.cc", |
Kelvin Zhang | 50bac65 | 2020-09-28 15:51:41 -0400 | [diff] [blame] | 242 | "payload_consumer/partition_writer.cc", |
Kelvin Zhang | 94f51cc | 2020-09-25 11:34:49 -0400 | [diff] [blame] | 243 | "payload_consumer/partition_writer_factory_android.cc", |
| 244 | "payload_consumer/vabc_partition_writer.cc", |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 245 | "payload_consumer/snapshot_extent_writer.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 246 | "payload_consumer/postinstall_runner_action.cc", |
Kelvin Zhang | ab3ce60 | 2021-02-24 14:46:40 -0500 | [diff] [blame] | 247 | "payload_consumer/verified_source_fd.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 248 | "payload_consumer/verity_writer_android.cc", |
| 249 | "payload_consumer/xz_extent_writer.cc", |
| 250 | "payload_consumer/fec_file_descriptor.cc", |
Tianjie | d3865d1 | 2020-06-03 15:25:17 -0700 | [diff] [blame] | 251 | "payload_consumer/partition_update_generator_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 252 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | // libupdate_engine_boot_control (type: static_library) |
| 256 | // ======================================================== |
| 257 | // A BootControl class implementation using Android's HIDL boot_control HAL. |
| 258 | cc_defaults { |
| 259 | name: "libupdate_engine_boot_control_exports", |
| 260 | defaults: ["update_metadata-protos_exports"], |
| 261 | |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 262 | static_libs: [ |
David Anderson | e7ce821 | 2019-12-16 20:13:19 -0800 | [diff] [blame] | 263 | "libcutils", |
| 264 | "libfs_mgr_binder", |
| 265 | "libgsi", |
Yifan Hong | dad0af8 | 2020-02-19 17:19:49 -0800 | [diff] [blame] | 266 | "libpayload_consumer", |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 267 | "libsnapshot", |
David Anderson | 6c190a2 | 2020-09-21 17:09:53 -0700 | [diff] [blame] | 268 | "libsnapshot_cow", |
| 269 | "libz", |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 270 | "update_metadata-protos", |
| 271 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 272 | shared_libs: [ |
| 273 | "libbootloader_message", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 274 | "libhidlbase", |
| 275 | "liblp", |
Yifan Hong | d976cc5 | 2020-02-25 14:51:42 -0800 | [diff] [blame] | 276 | "libstatslog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 277 | "libutils", |
| 278 | "android.hardware.boot@1.0", |
David Anderson | 2111d06 | 2019-10-15 22:36:27 -0700 | [diff] [blame] | 279 | "android.hardware.boot@1.1", |
Kelvin Zhang | cb419e6 | 2021-06-16 13:56:47 -0400 | [diff] [blame^] | 280 | "android.hardware.boot@1.2", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 281 | ], |
Yifan Hong | 2969290 | 2020-03-26 12:47:05 -0700 | [diff] [blame] | 282 | header_libs: [ |
| 283 | "avb_headers", |
| 284 | ], |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 285 | target: { |
| 286 | recovery: { |
David Anderson | e7ce821 | 2019-12-16 20:13:19 -0800 | [diff] [blame] | 287 | static_libs: [ |
| 288 | "libfs_mgr", |
| 289 | "libsnapshot_nobinder", |
| 290 | ], |
| 291 | exclude_static_libs: [ |
| 292 | "libfs_mgr_binder", |
| 293 | "libsnapshot", |
| 294 | ], |
Yifan Hong | 212d795 | 2020-02-04 11:08:08 -0800 | [diff] [blame] | 295 | exclude_shared_libs: [ |
Yifan Hong | d976cc5 | 2020-02-25 14:51:42 -0800 | [diff] [blame] | 296 | "libstatslog", |
Yifan Hong | 212d795 | 2020-02-04 11:08:08 -0800 | [diff] [blame] | 297 | ], |
Yifan Hong | 420db9b | 2019-07-23 20:50:33 -0700 | [diff] [blame] | 298 | }, |
| 299 | }, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | cc_library_static { |
| 303 | name: "libupdate_engine_boot_control", |
| 304 | defaults: [ |
| 305 | "ue_defaults", |
| 306 | "libupdate_engine_boot_control_exports", |
Yifan Hong | dad0af8 | 2020-02-19 17:19:49 -0800 | [diff] [blame] | 307 | "libpayload_consumer_exports", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 308 | ], |
| 309 | recovery_available: true, |
| 310 | |
| 311 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 312 | "aosp/boot_control_android.cc", |
| 313 | "aosp/cleanup_previous_update_action.cc", |
| 314 | "aosp/dynamic_partition_control_android.cc", |
| 315 | "aosp/dynamic_partition_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 316 | ], |
| 317 | } |
| 318 | |
| 319 | // libupdate_engine_android (type: static_library) |
| 320 | // ======================================================== |
| 321 | // The main daemon static_library used in Android (non-Brillo). This only has a |
| 322 | // loop to apply payloads provided by the upper layer via a Binder interface. |
| 323 | cc_defaults { |
| 324 | name: "libupdate_engine_android_exports", |
| 325 | defaults: [ |
| 326 | "ue_defaults", |
| 327 | "libpayload_consumer_exports", |
| 328 | "libupdate_engine_boot_control_exports", |
| 329 | ], |
| 330 | |
| 331 | static_libs: [ |
Tianjie | 838793d | 2021-01-14 22:05:13 -0800 | [diff] [blame] | 332 | "libavb", |
| 333 | "libavb_user", |
Yifan Hong | 126d13e | 2020-09-21 19:50:06 -0700 | [diff] [blame] | 334 | "gkiprops", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 335 | "libpayload_consumer", |
| 336 | "libupdate_engine_boot_control", |
Tianjie | 838793d | 2021-01-14 22:05:13 -0800 | [diff] [blame] | 337 | "PlatformProperties", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 338 | ], |
| 339 | shared_libs: [ |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 340 | "apex_aidl_interface-cpp", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 341 | "libandroid_net", |
| 342 | "libbase", |
| 343 | "libbinder", |
| 344 | "libbinderwrapper", |
| 345 | "libbootloader_message", |
| 346 | "libbrillo-binder", |
| 347 | "libcurl", |
| 348 | "libcutils", |
Jeongik Cha | 95f89e9 | 2021-01-26 22:33:11 +0900 | [diff] [blame] | 349 | "libupdate_engine_stable-V1-cpp", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 350 | "liblog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 351 | "libssl", |
Tianjie Xu | 75cc9f2 | 2019-08-02 14:53:38 -0700 | [diff] [blame] | 352 | "libstatslog", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 353 | "libutils", |
| 354 | ], |
Nikita Ioffe | aedfef3 | 2021-04-28 13:54:14 +0100 | [diff] [blame] | 355 | whole_static_libs: [ |
| 356 | "com.android.sysprop.apex", |
| 357 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 358 | } |
| 359 | |
| 360 | cc_library_static { |
| 361 | name: "libupdate_engine_android", |
| 362 | defaults: [ |
| 363 | "ue_defaults", |
| 364 | "libupdate_engine_android_exports", |
| 365 | ], |
| 366 | |
| 367 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 368 | // out of the DBus interface. |
| 369 | include_dirs: ["external/cros/system_api/dbus"], |
| 370 | |
| 371 | aidl: { |
| 372 | local_include_dirs: ["binder_bindings"], |
| 373 | export_aidl_headers: true, |
| 374 | }, |
| 375 | |
| 376 | srcs: [ |
| 377 | ":libupdate_engine_aidl", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 378 | "common/system_state.cc", |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 379 | "aosp/apex_handler_android.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 380 | "aosp/binder_service_android.cc", |
| 381 | "aosp/binder_service_stable_android.cc", |
| 382 | "aosp/daemon_android.cc", |
| 383 | "aosp/daemon_state_android.cc", |
| 384 | "aosp/hardware_android.cc", |
| 385 | "aosp/logging_android.cc", |
| 386 | "aosp/network_selector_android.cc", |
| 387 | "aosp/update_attempter_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 388 | "certificate_checker.cc", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 389 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 390 | "libcurl_http_fetcher.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 391 | "metrics_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 392 | "update_boot_flags_action.cc", |
| 393 | "update_status_utils.cc", |
| 394 | ], |
| 395 | } |
| 396 | |
| 397 | // update_engine (type: executable) |
| 398 | // ======================================================== |
| 399 | // update_engine daemon. |
| 400 | cc_binary { |
| 401 | name: "update_engine", |
| 402 | defaults: [ |
| 403 | "ue_defaults", |
| 404 | "libupdate_engine_android_exports", |
| 405 | ], |
| 406 | |
| 407 | static_libs: ["libupdate_engine_android"], |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 408 | required: [ |
| 409 | "cacerts_google", |
Tianjie Xu | be4ea23 | 2019-10-15 18:08:31 -0700 | [diff] [blame] | 410 | "otacerts", |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 411 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 412 | |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 413 | srcs: ["main.cc", "aosp/metrics_reporter_android.cc"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 414 | init_rc: ["update_engine.rc"], |
| 415 | } |
| 416 | |
| 417 | // update_engine_sideload (type: executable) |
| 418 | // ======================================================== |
| 419 | // A binary executable equivalent to update_engine daemon that installs an update |
| 420 | // from a local file directly instead of running in the background. Used in |
| 421 | // recovery image. |
| 422 | cc_binary { |
| 423 | name: "update_engine_sideload", |
| 424 | defaults: [ |
| 425 | "ue_defaults", |
| 426 | "update_metadata-protos_exports", |
| 427 | "libupdate_engine_boot_control_exports", |
| 428 | "libpayload_consumer_exports", |
| 429 | ], |
| 430 | recovery: true, |
| 431 | |
| 432 | cflags: ["-D_UE_SIDELOAD"], |
| 433 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 434 | // out of the DBus interface. |
| 435 | include_dirs: ["external/cros/system_api/dbus"], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 436 | header_libs: ["libgtest_prod_headers"], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 437 | |
| 438 | srcs: [ |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 439 | "aosp/hardware_android.cc", |
| 440 | "aosp/logging_android.cc", |
| 441 | "aosp/sideload_main.cc", |
| 442 | "aosp/update_attempter_android.cc", |
| 443 | "common/metrics_reporter_stub.cc", |
| 444 | "common/network_selector_stub.cc", |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 445 | "common/system_state.cc", |
| 446 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 447 | "metrics_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 448 | "update_boot_flags_action.cc", |
| 449 | "update_status_utils.cc", |
| 450 | ], |
| 451 | |
| 452 | // Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out, |
| 453 | // as it doesn't look beneficial to be installed separately due to its size. Note |
| 454 | // that we explicitly request their recovery variants, so that the expected files |
| 455 | // will be used and installed. |
| 456 | shared_libs: [ |
| 457 | "libbase", |
| 458 | "liblog", |
| 459 | ], |
| 460 | static_libs: [ |
| 461 | "libpayload_consumer", |
| 462 | "libupdate_engine_boot_control", |
| 463 | "update_metadata-protos", |
| 464 | |
| 465 | // We add the static versions of the shared libraries that are not installed to |
| 466 | // recovery image due to size concerns. Need to include all the static library |
| 467 | // dependencies of these static libraries. |
Yifan Hong | 126d13e | 2020-09-21 19:50:06 -0700 | [diff] [blame] | 468 | "gkiprops", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 469 | "libevent", |
| 470 | "libmodpb64", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 471 | "libprotobuf-cpp-lite", |
| 472 | "libbrillo-stream", |
| 473 | "libbrillo", |
| 474 | "libchrome", |
| 475 | ], |
| 476 | target: { |
| 477 | recovery: { |
| 478 | exclude_shared_libs: [ |
| 479 | "libprotobuf-cpp-lite", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 480 | "libbrillo-stream", |
| 481 | "libbrillo", |
| 482 | "libchrome", |
| 483 | ], |
| 484 | }, |
| 485 | }, |
| 486 | |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 487 | required: [ |
Tianjie Xu | be4ea23 | 2019-10-15 18:08:31 -0700 | [diff] [blame] | 488 | "otacerts.recovery", |
Tao Bao | 1e1c86c | 2019-04-18 10:48:32 -0700 | [diff] [blame] | 489 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 490 | } |
| 491 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 492 | // update_engine_client (type: executable) |
| 493 | // ======================================================== |
| 494 | // update_engine console client. |
| 495 | cc_binary { |
| 496 | name: "update_engine_client", |
| 497 | defaults: ["ue_defaults"], |
| 498 | |
| 499 | // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved |
| 500 | // out of the DBus interface. |
| 501 | include_dirs: ["external/cros/system_api/dbus"], |
| 502 | |
| 503 | shared_libs: [ |
| 504 | "libbinder", |
| 505 | "libbinderwrapper", |
| 506 | "libbrillo-binder", |
| 507 | "libutils", |
| 508 | ], |
| 509 | |
| 510 | aidl: { |
| 511 | local_include_dirs: ["binder_bindings"], |
| 512 | }, |
| 513 | |
| 514 | srcs: [ |
| 515 | ":libupdate_engine_aidl", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 516 | "aosp/update_engine_client_android.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 517 | "common/error_code_utils.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 518 | "update_status_utils.cc", |
| 519 | ], |
| 520 | } |
| 521 | |
| 522 | // libpayload_generator (type: static_library) |
| 523 | // ======================================================== |
| 524 | // server-side code. This is used for delta_generator and unittests but not |
| 525 | // for any client code. |
| 526 | cc_defaults { |
| 527 | name: "libpayload_generator_exports", |
| 528 | defaults: [ |
| 529 | "libpayload_consumer_exports", |
| 530 | "update_metadata-protos_exports", |
| 531 | ], |
| 532 | |
Tianjie | 37ae856 | 2020-03-25 15:16:01 -0700 | [diff] [blame] | 533 | header_libs: [ |
| 534 | "bootimg_headers", |
| 535 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 536 | static_libs: [ |
| 537 | "libavb", |
| 538 | "libbrotli", |
| 539 | "libbsdiff", |
| 540 | "libdivsufsort", |
| 541 | "libdivsufsort64", |
| 542 | "liblzma", |
| 543 | "libpayload_consumer", |
| 544 | "libpuffdiff", |
| 545 | "libverity_tree", |
| 546 | "update_metadata-protos", |
Kelvin Zhang | eb8703b | 2020-12-10 14:17:21 -0500 | [diff] [blame] | 547 | "libpayload_extent_utils", |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 548 | "libcow_size_estimator", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 549 | ], |
| 550 | shared_libs: [ |
| 551 | "libbase", |
| 552 | "libext2fs", |
| 553 | ], |
| 554 | } |
| 555 | |
| 556 | cc_library_static { |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 557 | name: "libpayload_extent_ranges", |
| 558 | defaults: [ |
| 559 | "ue_defaults", |
| 560 | ], |
| 561 | host_supported: true, |
Kelvin Zhang | 9b10dba | 2020-09-25 17:09:11 -0400 | [diff] [blame] | 562 | recovery_available: true, |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 563 | srcs: [ |
| 564 | "payload_generator/extent_ranges.cc", |
| 565 | ], |
| 566 | static_libs: [ |
| 567 | "update_metadata-protos", |
| 568 | ], |
| 569 | } |
| 570 | |
| 571 | cc_library_static { |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 572 | name: "libcow_size_estimator", |
| 573 | defaults: [ |
| 574 | "ue_defaults", |
| 575 | "update_metadata-protos_exports" |
| 576 | ], |
| 577 | host_supported: true, |
| 578 | recovery_available: true, |
| 579 | srcs: [ |
| 580 | "payload_generator/cow_size_estimator.cc", |
| 581 | ], |
| 582 | static_libs: [ |
| 583 | "update_metadata-protos", |
| 584 | "libbase", |
| 585 | "libsnapshot_cow", |
| 586 | "libcow_operation_convert", |
| 587 | ], |
| 588 | } |
| 589 | |
| 590 | cc_library_static { |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 591 | name: "libpayload_generator", |
| 592 | defaults: [ |
| 593 | "ue_defaults", |
| 594 | "libpayload_generator_exports", |
| 595 | ], |
| 596 | host_supported: true, |
| 597 | |
| 598 | srcs: [ |
Amin Hassani | 538bd59 | 2020-11-04 20:46:08 -0800 | [diff] [blame] | 599 | "common/system_state.cc", |
| 600 | "download_action.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 601 | "payload_generator/ab_generator.cc", |
| 602 | "payload_generator/annotated_operation.cc", |
| 603 | "payload_generator/blob_file_writer.cc", |
| 604 | "payload_generator/block_mapping.cc", |
| 605 | "payload_generator/boot_img_filesystem.cc", |
| 606 | "payload_generator/bzip.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 607 | "payload_generator/deflate_utils.cc", |
| 608 | "payload_generator/delta_diff_generator.cc", |
| 609 | "payload_generator/delta_diff_utils.cc", |
| 610 | "payload_generator/ext2_filesystem.cc", |
| 611 | "payload_generator/extent_ranges.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 612 | "payload_generator/full_update_generator.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 613 | "payload_generator/mapfile_filesystem.cc", |
Tianjie | e9156ec | 2020-08-11 11:13:54 -0700 | [diff] [blame] | 614 | "payload_generator/merge_sequence_generator.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 615 | "payload_generator/payload_file.cc", |
| 616 | "payload_generator/payload_generation_config_android.cc", |
| 617 | "payload_generator/payload_generation_config.cc", |
Amin Hassani | 7982100 | 2019-05-06 17:40:49 -0700 | [diff] [blame] | 618 | "payload_generator/payload_properties.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 619 | "payload_generator/payload_signer.cc", |
| 620 | "payload_generator/raw_filesystem.cc", |
| 621 | "payload_generator/squashfs_filesystem.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 622 | "payload_generator/xz_android.cc", |
| 623 | ], |
| 624 | } |
| 625 | |
| 626 | // delta_generator (type: executable) |
| 627 | // ======================================================== |
| 628 | // server-side delta generator. |
| 629 | cc_binary_host { |
| 630 | name: "delta_generator", |
| 631 | defaults: [ |
| 632 | "ue_defaults", |
| 633 | "libpayload_generator_exports", |
| 634 | "libpayload_consumer_exports", |
| 635 | ], |
| 636 | |
| 637 | static_libs: [ |
| 638 | "libavb_host_sysdeps", |
| 639 | "libpayload_consumer", |
| 640 | "libpayload_generator", |
| 641 | ], |
| 642 | |
| 643 | srcs: ["payload_generator/generate_delta_main.cc"], |
| 644 | } |
| 645 | |
| 646 | cc_test { |
| 647 | name: "ue_unittest_delta_generator", |
| 648 | defaults: [ |
| 649 | "ue_defaults", |
| 650 | "libpayload_generator_exports", |
| 651 | "libpayload_consumer_exports", |
| 652 | ], |
| 653 | |
| 654 | static_libs: [ |
| 655 | "libpayload_consumer", |
| 656 | "libpayload_generator", |
| 657 | ], |
| 658 | |
| 659 | srcs: ["payload_generator/generate_delta_main.cc"], |
| 660 | |
| 661 | gtest: false, |
| 662 | stem: "delta_generator", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 663 | } |
| 664 | |
| 665 | // test_http_server (type: executable) |
| 666 | // ======================================================== |
| 667 | // Test HTTP Server. |
| 668 | cc_test { |
| 669 | name: "test_http_server", |
| 670 | defaults: ["ue_defaults"], |
| 671 | srcs: [ |
| 672 | "common/http_common.cc", |
| 673 | "test_http_server.cc", |
| 674 | ], |
| 675 | |
| 676 | gtest: false, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 677 | } |
| 678 | |
| 679 | // test_subprocess (type: executable) |
| 680 | // ======================================================== |
| 681 | // Test helper subprocess program. |
| 682 | cc_test { |
| 683 | name: "test_subprocess", |
| 684 | defaults: ["ue_defaults"], |
| 685 | srcs: ["test_subprocess.cc"], |
| 686 | |
| 687 | gtest: false, |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 688 | } |
| 689 | |
| 690 | // Public keys for unittests. |
| 691 | // ======================================================== |
| 692 | genrule { |
| 693 | name: "ue_unittest_keys", |
| 694 | 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] | 695 | "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] | 696 | "openssl rsa -in $(location unittest_key_RSA4096.pem) -pubout -out $(location unittest_key_RSA4096.pub.pem) &&" + |
| 697 | "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] | 698 | srcs: [ |
| 699 | "unittest_key.pem", |
| 700 | "unittest_key2.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 701 | "unittest_key_RSA4096.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 702 | "unittest_key_EC.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 703 | ], |
| 704 | out: [ |
| 705 | "unittest_key.pub.pem", |
| 706 | "unittest_key2.pub.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 707 | "unittest_key_RSA4096.pub.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 708 | "unittest_key_EC.pub.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 709 | ], |
| 710 | } |
| 711 | |
| 712 | // Sample images for unittests. |
| 713 | // ======================================================== |
| 714 | // Extract sample image from the compressed sample_images.tar.bz2 file used by |
| 715 | // the unittests. |
| 716 | genrule { |
| 717 | name: "ue_unittest_disk_imgs", |
| 718 | cmd: "tar -jxf $(in) -C $(genDir)/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img", |
| 719 | srcs: ["sample_images/sample_images.tar.bz2"], |
| 720 | out: [ |
| 721 | "gen/disk_ext2_1k.img", |
| 722 | "gen/disk_ext2_4k.img", |
| 723 | "gen/disk_ext2_4k_empty.img", |
| 724 | "gen/disk_ext2_unittest.img", |
| 725 | ], |
| 726 | } |
| 727 | |
| 728 | // update_engine_unittests (type: executable) |
| 729 | // ======================================================== |
| 730 | // Main unittest file. |
| 731 | cc_test { |
| 732 | name: "update_engine_unittests", |
| 733 | defaults: [ |
| 734 | "ue_defaults", |
| 735 | "libpayload_generator_exports", |
| 736 | "libupdate_engine_android_exports", |
| 737 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 738 | |
| 739 | static_libs: [ |
| 740 | "libpayload_generator", |
| 741 | "libbrillo-test-helpers", |
| 742 | "libgmock", |
| 743 | "libchrome_test_helpers", |
| 744 | "libupdate_engine_android", |
Tianjie Xu | 173e619 | 2019-12-10 10:56:01 -0800 | [diff] [blame] | 745 | "libdm", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 746 | ], |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 747 | |
Yifan Hong | 87ea73f | 2019-09-12 13:07:37 -0700 | [diff] [blame] | 748 | header_libs: [ |
| 749 | "libstorage_literals_headers", |
| 750 | ], |
| 751 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 752 | data: [ |
Tao Bao | 9456b6f | 2019-04-29 18:14:58 -0700 | [diff] [blame] | 753 | ":test_http_server", |
| 754 | ":test_subprocess", |
| 755 | ":ue_unittest_delta_generator", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 756 | ":ue_unittest_disk_imgs", |
| 757 | ":ue_unittest_keys", |
Tianjie Xu | 7a78d63 | 2019-10-08 16:32:39 -0700 | [diff] [blame] | 758 | "otacerts.zip", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 759 | "unittest_key.pem", |
| 760 | "unittest_key2.pem", |
xunchang | cda3c03 | 2019-03-26 15:41:14 -0700 | [diff] [blame] | 761 | "unittest_key_RSA4096.pem", |
Tianjie Xu | 7bbe015 | 2019-10-09 18:11:15 -0700 | [diff] [blame] | 762 | "unittest_key_EC.pem", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 763 | "update_engine.conf", |
| 764 | ], |
| 765 | |
Tao Bao | 9456b6f | 2019-04-29 18:14:58 -0700 | [diff] [blame] | 766 | // We cannot use the default generated AndroidTest.xml because of the use of helper modules |
| 767 | // (i.e. test_http_server, test_subprocess, ue_unittest_delta_generator). |
| 768 | test_config: "test_config.xml", |
| 769 | test_suites: ["device-tests"], |
| 770 | |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 771 | srcs: [ |
Mohammad Samiul Islam | 24a8279 | 2021-02-12 16:52:36 +0000 | [diff] [blame] | 772 | "aosp/apex_handler_android_unittest.cc", |
Kelvin Zhang | b4b95c2 | 2021-04-05 15:56:26 -0400 | [diff] [blame] | 773 | "aosp/cleanup_previous_update_action_unittest.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 774 | "aosp/dynamic_partition_control_android_unittest.cc", |
| 775 | "aosp/update_attempter_android_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 776 | "certificate_checker_unittest.cc", |
| 777 | "common/action_pipe_unittest.cc", |
| 778 | "common/action_processor_unittest.cc", |
| 779 | "common/action_unittest.cc", |
Kelvin Zhang | b05e4e2 | 2020-09-25 16:16:19 -0400 | [diff] [blame] | 780 | "common/cow_operation_convert_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 781 | "common/cpu_limiter_unittest.cc", |
| 782 | "common/fake_prefs.cc", |
| 783 | "common/file_fetcher_unittest.cc", |
| 784 | "common/hash_calculator_unittest.cc", |
| 785 | "common/http_fetcher_unittest.cc", |
| 786 | "common/hwid_override_unittest.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 787 | "common/metrics_reporter_stub.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 788 | "common/mock_http_fetcher.cc", |
| 789 | "common/prefs_unittest.cc", |
| 790 | "common/proxy_resolver_unittest.cc", |
| 791 | "common/subprocess_unittest.cc", |
| 792 | "common/terminator_unittest.cc", |
| 793 | "common/test_utils.cc", |
| 794 | "common/utils_unittest.cc", |
Amin Hassani | ec7bc11 | 2020-10-29 16:47:58 -0700 | [diff] [blame] | 795 | "download_action_android_unittest.cc", |
Jae Hoon Kim | 0ae8fe1 | 2019-06-26 14:32:50 -0700 | [diff] [blame] | 796 | "libcurl_http_fetcher_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 797 | "payload_consumer/bzip_extent_writer_unittest.cc", |
| 798 | "payload_consumer/cached_file_descriptor_unittest.cc", |
Kelvin Zhang | 46d6c49 | 2021-04-26 17:51:25 -0400 | [diff] [blame] | 799 | "payload_consumer/cow_writer_file_descriptor_unittest.cc", |
Tianjie Xu | 7a78d63 | 2019-10-08 16:32:39 -0700 | [diff] [blame] | 800 | "payload_consumer/certificate_parser_android_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 801 | "payload_consumer/delta_performer_integration_test.cc", |
| 802 | "payload_consumer/delta_performer_unittest.cc", |
Kelvin Zhang | 9bd519d | 2020-09-23 12:55:19 -0400 | [diff] [blame] | 803 | "payload_consumer/partition_writer_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 804 | "payload_consumer/extent_reader_unittest.cc", |
| 805 | "payload_consumer/extent_writer_unittest.cc", |
Kelvin Zhang | 9754f17 | 2020-09-25 15:22:35 -0400 | [diff] [blame] | 806 | "payload_consumer/snapshot_extent_writer_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 807 | "payload_consumer/fake_file_descriptor.cc", |
| 808 | "payload_consumer/file_descriptor_utils_unittest.cc", |
| 809 | "payload_consumer/file_writer_unittest.cc", |
| 810 | "payload_consumer/filesystem_verifier_action_unittest.cc", |
Amin Hassani | 2379503 | 2020-11-24 14:38:55 -0800 | [diff] [blame] | 811 | "payload_consumer/install_plan_unittest.cc", |
Kelvin Zhang | 40d9666 | 2021-02-24 14:21:29 -0500 | [diff] [blame] | 812 | "payload_consumer/install_operation_executor_unittest.cc", |
Tianjie | 99d570d | 2020-06-04 14:57:19 -0700 | [diff] [blame] | 813 | "payload_consumer/partition_update_generator_android_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 814 | "payload_consumer/postinstall_runner_action_unittest.cc", |
| 815 | "payload_consumer/verity_writer_android_unittest.cc", |
| 816 | "payload_consumer/xz_extent_writer_unittest.cc", |
| 817 | "payload_generator/ab_generator_unittest.cc", |
| 818 | "payload_generator/blob_file_writer_unittest.cc", |
| 819 | "payload_generator/block_mapping_unittest.cc", |
| 820 | "payload_generator/boot_img_filesystem_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 821 | "payload_generator/deflate_utils_unittest.cc", |
| 822 | "payload_generator/delta_diff_utils_unittest.cc", |
| 823 | "payload_generator/ext2_filesystem_unittest.cc", |
| 824 | "payload_generator/extent_ranges_unittest.cc", |
| 825 | "payload_generator/extent_utils_unittest.cc", |
| 826 | "payload_generator/fake_filesystem.cc", |
| 827 | "payload_generator/full_update_generator_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 828 | "payload_generator/mapfile_filesystem_unittest.cc", |
Tianjie | 87af6c0 | 2020-08-11 15:06:26 -0700 | [diff] [blame] | 829 | "payload_generator/merge_sequence_generator_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 830 | "payload_generator/payload_file_unittest.cc", |
| 831 | "payload_generator/payload_generation_config_android_unittest.cc", |
| 832 | "payload_generator/payload_generation_config_unittest.cc", |
Jae Hoon Kim | 4b6d126 | 2019-06-20 10:41:18 -0700 | [diff] [blame] | 833 | "payload_generator/payload_properties_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 834 | "payload_generator/payload_signer_unittest.cc", |
| 835 | "payload_generator/squashfs_filesystem_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 836 | "payload_generator/zip_unittest.cc", |
| 837 | "testrunner.cc", |
Jae Hoon Kim | 916af85 | 2019-08-01 17:45:30 -0700 | [diff] [blame] | 838 | "update_status_utils_unittest.cc", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 839 | ], |
| 840 | } |
| 841 | |
| 842 | // Brillo update payload generation script |
| 843 | // ======================================================== |
Martin Stjernholm | 18e9f3c | 2020-09-08 13:56:59 +0100 | [diff] [blame] | 844 | sh_binary { |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 845 | name: "brillo_update_payload", |
| 846 | device_supported: false, |
| 847 | host_supported: true, |
| 848 | |
Martin Stjernholm | 18e9f3c | 2020-09-08 13:56:59 +0100 | [diff] [blame] | 849 | src: "scripts/brillo_update_payload", |
Dan Willemsen | f5a904e | 2018-10-23 01:02:44 -0700 | [diff] [blame] | 850 | required: [ |
| 851 | "delta_generator", |
| 852 | "shflags", |
| 853 | "simg2img", |
| 854 | ], |
| 855 | |
| 856 | target: { |
| 857 | darwin: { |
| 858 | enabled: false, |
| 859 | }, |
| 860 | }, |
Colin Cross | 606913a | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 861 | } |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 862 | |
| 863 | // update_engine header library |
| 864 | cc_library_headers { |
| 865 | name: "libupdate_engine_headers", |
Yifan Hong | 309c8a8 | 2020-10-06 18:31:08 -0700 | [diff] [blame] | 866 | |
| 867 | // This header library is available to core and product modules. |
Justin Yun | 6d121de | 2020-11-11 19:31:57 +0900 | [diff] [blame] | 868 | product_available: true, |
Yifan Hong | 309c8a8 | 2020-10-06 18:31:08 -0700 | [diff] [blame] | 869 | |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 870 | export_include_dirs: ["."], |
| 871 | apex_available: [ |
| 872 | "com.android.gki.*", |
David Anderson | 5e6dfe3 | 2020-09-17 15:50:33 -0700 | [diff] [blame] | 873 | "//apex_available:platform", |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 874 | ], |
David Anderson | c1c9305 | 2020-08-26 18:22:09 +0000 | [diff] [blame] | 875 | host_supported: true, |
David Anderson | 5e6dfe3 | 2020-09-17 15:50:33 -0700 | [diff] [blame] | 876 | recovery_available: true, |
| 877 | ramdisk_available: true, |
| 878 | |
| 879 | target: { |
| 880 | darwin: { |
| 881 | enabled: false, |
| 882 | }, |
| 883 | } |
Yifan Hong | d51738c | 2020-07-23 17:06:25 -0700 | [diff] [blame] | 884 | } |
Kelvin Zhang | b93055f | 2021-02-03 14:22:35 -0500 | [diff] [blame] | 885 | |
| 886 | cc_binary_host { |
| 887 | name: "cow_converter", |
| 888 | defaults: [ |
| 889 | "ue_defaults", |
| 890 | "libpayload_consumer_exports", |
| 891 | ], |
| 892 | srcs: [ |
| 893 | "aosp/cow_converter.cc", |
| 894 | ], |
| 895 | static_libs: [ |
| 896 | "liblog", |
| 897 | "libbrotli", |
| 898 | "libbase", |
| 899 | "libcow_operation_convert", |
| 900 | "libcow_size_estimator", |
| 901 | "libpayload_consumer", |
| 902 | "libpayload_extent_ranges", |
| 903 | "libpayload_extent_utils", |
| 904 | "libsnapshot_cow", |
| 905 | "libz", |
| 906 | "update_metadata-protos", |
| 907 | ], |
Elliott Hughes | 88f3c8c | 2021-04-22 13:47:21 -0700 | [diff] [blame] | 908 | } |