Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 29be3f6 | 2021-02-12 18:00:57 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "bootable_recovery_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["bootable_recovery_license"], |
| 22 | } |
| 23 | |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "update_verifier_defaults", |
| 26 | |
Tianjie Xu | 446b64b | 2018-09-19 15:45:28 -0700 | [diff] [blame] | 27 | defaults: [ |
| 28 | "recovery_defaults", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 29 | ], |
| 30 | |
| 31 | local_include_dirs: [ |
| 32 | "include", |
| 33 | ], |
| 34 | } |
| 35 | |
Kelvin Zhang | b4b619c | 2021-06-03 09:33:55 -0400 | [diff] [blame] | 36 | python_library_host { |
| 37 | name: "care_map_proto_py", |
| 38 | srcs: [ |
| 39 | "care_map.proto", |
| 40 | ], |
| 41 | proto: {type: "lite", canonical_path_from_root: false}, |
| 42 | version: { |
| 43 | py2: { |
| 44 | enabled: true, |
| 45 | }, |
| 46 | py3: { |
| 47 | enabled: true, |
| 48 | }, |
| 49 | }, |
| 50 | visibility: [ |
| 51 | "//build/make/tools/releasetools:__subpackages__", |
| 52 | ], |
| 53 | } |
| 54 | |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 55 | cc_library_static { |
| 56 | name: "libupdate_verifier", |
| 57 | |
| 58 | defaults: [ |
| 59 | "update_verifier_defaults", |
| 60 | ], |
| 61 | |
| 62 | srcs: [ |
Tianjie Xu | 4d9e62d | 2018-05-11 10:41:44 -0700 | [diff] [blame] | 63 | "care_map.proto", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 64 | "update_verifier.cpp", |
| 65 | ], |
| 66 | |
| 67 | export_include_dirs: [ |
| 68 | "include", |
| 69 | ], |
| 70 | |
| 71 | static_libs: [ |
| 72 | "libotautil", |
Daniel Rosenberg | 15f22bd | 2019-01-22 19:57:28 -0800 | [diff] [blame] | 73 | "libvold_binder", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 74 | ], |
| 75 | |
Akilesh Kailash | dc1f6da | 2022-03-23 18:53:52 +0000 | [diff] [blame] | 76 | whole_static_libs: [ |
Kelvin Zhang | fa554fe | 2022-04-01 14:17:10 -0700 | [diff] [blame^] | 77 | "libsnapshot_snapuserd", |
Akilesh Kailash | dc1f6da | 2022-03-23 18:53:52 +0000 | [diff] [blame] | 78 | ], |
| 79 | |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 80 | shared_libs: [ |
| 81 | "android.hardware.boot@1.0", |
Kelvin Zhang | fa554fe | 2022-04-01 14:17:10 -0700 | [diff] [blame^] | 82 | "libboot_control_client", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 83 | "libbase", |
| 84 | "libcutils", |
Daniel Rosenberg | 15f22bd | 2019-01-22 19:57:28 -0800 | [diff] [blame] | 85 | "libbinder", |
| 86 | "libutils", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 87 | ], |
Tianjie Xu | 4d9e62d | 2018-05-11 10:41:44 -0700 | [diff] [blame] | 88 | |
| 89 | proto: { |
| 90 | type: "lite", |
| 91 | export_proto_headers: true, |
Tianjie Xu | 7e520d2 | 2018-08-13 16:41:30 -0700 | [diff] [blame] | 92 | }, |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | cc_binary { |
| 96 | name: "update_verifier", |
| 97 | |
| 98 | defaults: [ |
| 99 | "update_verifier_defaults", |
| 100 | ], |
| 101 | |
| 102 | srcs: [ |
| 103 | "update_verifier_main.cpp", |
| 104 | ], |
| 105 | |
| 106 | static_libs: [ |
| 107 | "libupdate_verifier", |
| 108 | "libotautil", |
Daniel Rosenberg | 15f22bd | 2019-01-22 19:57:28 -0800 | [diff] [blame] | 109 | "libvold_binder", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 110 | ], |
| 111 | |
| 112 | shared_libs: [ |
| 113 | "android.hardware.boot@1.0", |
| 114 | "libbase", |
| 115 | "libcutils", |
| 116 | "libhardware", |
| 117 | "libhidlbase", |
| 118 | "liblog", |
Tianjie Xu | 4d9e62d | 2018-05-11 10:41:44 -0700 | [diff] [blame] | 119 | "libprotobuf-cpp-lite", |
Daniel Rosenberg | 15f22bd | 2019-01-22 19:57:28 -0800 | [diff] [blame] | 120 | "libbinder", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 121 | "libutils", |
Kelvin Zhang | fa554fe | 2022-04-01 14:17:10 -0700 | [diff] [blame^] | 122 | "libboot_control_client", |
Tao Bao | afb9fc2 | 2018-04-19 14:49:32 -0700 | [diff] [blame] | 123 | ], |
| 124 | |
| 125 | init_rc: [ |
| 126 | "update_verifier.rc", |
| 127 | ], |
| 128 | } |
Tianjie Xu | 7e520d2 | 2018-08-13 16:41:30 -0700 | [diff] [blame] | 129 | |
| 130 | python_binary_host { |
| 131 | name: "care_map_generator", |
| 132 | |
| 133 | srcs: [ |
| 134 | "care_map_generator.py", |
| 135 | "care_map.proto", |
| 136 | ], |
| 137 | libs: [ |
| 138 | "python-symbol", |
| 139 | // Soong won't add "libprotobuf-python" to the dependencies if |
| 140 | // filegroup contains .proto files. So add it here explicitly. |
| 141 | "libprotobuf-python", |
| 142 | ], |
| 143 | proto: { |
| 144 | canonical_path_from_root: false, |
| 145 | }, |
| 146 | |
| 147 | version: { |
| 148 | py2: { |
Tianjie Xu | 7e520d2 | 2018-08-13 16:41:30 -0700 | [diff] [blame] | 149 | enabled: false, |
| 150 | embedded_launcher: false, |
| 151 | }, |
Krzysztof KosiĆski | 9c857f8 | 2021-02-24 16:02:25 -0800 | [diff] [blame] | 152 | py3: { |
| 153 | enabled: true, |
| 154 | embedded_launcher: true, |
| 155 | }, |
Tianjie Xu | 7e520d2 | 2018-08-13 16:41:30 -0700 | [diff] [blame] | 156 | }, |
| 157 | } |