blob: 26ff5305c5aecaf67b6e917fa6ee60ebc92eb955 [file] [log] [blame]
Tao Baoafb9fc22018-04-19 14:49:32 -07001// 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 Badour29be3f62021-02-12 18:00:57 -080015package {
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 Baoafb9fc22018-04-19 14:49:32 -070024cc_defaults {
25 name: "update_verifier_defaults",
26
Tianjie Xu446b64b2018-09-19 15:45:28 -070027 defaults: [
28 "recovery_defaults",
Tao Baoafb9fc22018-04-19 14:49:32 -070029 ],
30
31 local_include_dirs: [
32 "include",
33 ],
34}
35
Kelvin Zhangb4b619c2021-06-03 09:33:55 -040036python_library_host {
37 name: "care_map_proto_py",
38 srcs: [
39 "care_map.proto",
40 ],
41 proto: {type: "lite", canonical_path_from_root: false},
Kelvin Zhangb4b619c2021-06-03 09:33:55 -040042 visibility: [
43 "//build/make/tools/releasetools:__subpackages__",
44 ],
45}
46
Tao Baoafb9fc22018-04-19 14:49:32 -070047cc_library_static {
48 name: "libupdate_verifier",
49
50 defaults: [
51 "update_verifier_defaults",
52 ],
53
54 srcs: [
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070055 "care_map.proto",
Tao Baoafb9fc22018-04-19 14:49:32 -070056 "update_verifier.cpp",
57 ],
58
59 export_include_dirs: [
60 "include",
61 ],
62
63 static_libs: [
64 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080065 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -070066 ],
67
Akilesh Kailashdc1f6da2022-03-23 18:53:52 +000068 whole_static_libs: [
Kelvin Zhangfa554fe2022-04-01 14:17:10 -070069 "libsnapshot_snapuserd",
Akilesh Kailashdc1f6da2022-03-23 18:53:52 +000070 ],
71
Tao Baoafb9fc22018-04-19 14:49:32 -070072 shared_libs: [
73 "android.hardware.boot@1.0",
Kelvin Zhangfa554fe2022-04-01 14:17:10 -070074 "libboot_control_client",
Tao Baoafb9fc22018-04-19 14:49:32 -070075 "libbase",
76 "libcutils",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -080077 "libbinder",
78 "libutils",
Tao Baoafb9fc22018-04-19 14:49:32 -070079 ],
Tianjie Xu4d9e62d2018-05-11 10:41:44 -070080
81 proto: {
82 type: "lite",
83 export_proto_headers: true,
Tianjie Xu7e520d22018-08-13 16:41:30 -070084 },
Tao Baoafb9fc22018-04-19 14:49:32 -070085}
86
87cc_binary {
88 name: "update_verifier",
89
90 defaults: [
91 "update_verifier_defaults",
92 ],
93
94 srcs: [
95 "update_verifier_main.cpp",
96 ],
97
98 static_libs: [
99 "libupdate_verifier",
100 "libotautil",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -0800101 "libvold_binder",
Tao Baoafb9fc22018-04-19 14:49:32 -0700102 ],
103
104 shared_libs: [
105 "android.hardware.boot@1.0",
106 "libbase",
107 "libcutils",
108 "libhardware",
109 "libhidlbase",
110 "liblog",
Tianjie Xu4d9e62d2018-05-11 10:41:44 -0700111 "libprotobuf-cpp-lite",
Daniel Rosenberg15f22bd2019-01-22 19:57:28 -0800112 "libbinder",
Tao Baoafb9fc22018-04-19 14:49:32 -0700113 "libutils",
Kelvin Zhangfa554fe2022-04-01 14:17:10 -0700114 "libboot_control_client",
Tao Baoafb9fc22018-04-19 14:49:32 -0700115 ],
116
117 init_rc: [
118 "update_verifier.rc",
119 ],
120}
Tianjie Xu7e520d22018-08-13 16:41:30 -0700121
122python_binary_host {
123 name: "care_map_generator",
124
125 srcs: [
126 "care_map_generator.py",
127 "care_map.proto",
128 ],
129 libs: [
130 "python-symbol",
131 // Soong won't add "libprotobuf-python" to the dependencies if
132 // filegroup contains .proto files. So add it here explicitly.
133 "libprotobuf-python",
134 ],
135 proto: {
136 canonical_path_from_root: false,
137 },
138
139 version: {
Krzysztof Kosiński9c857f82021-02-24 16:02:25 -0800140 py3: {
Krzysztof Kosiński9c857f82021-02-24 16:02:25 -0800141 embedded_launcher: true,
142 },
Tianjie Xu7e520d22018-08-13 16:41:30 -0700143 },
144}