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