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