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