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