blob: 50618f956b86abcf440917e5c303f8737319ca8e [file] [log] [blame]
David Andersonee84d742019-01-07 18:10:29 -08001//
David Andersonc053b3b2019-01-08 18:22:07 -08002// Copyright (C) 2019 The Android Open Source Project
David Andersonee84d742019-01-07 18:10:29 -08003//
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
Bob Badourc4e74fd2021-02-12 15:14:18 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
David Andersonee84d742019-01-07 18:10:29 -080021cc_binary {
22 name: "gsi_tool",
23 shared_libs: [
David Andersonc053b3b2019-01-08 18:22:07 -080024 "gsi_aidl_interface-cpp",
David Andersonee84d742019-01-07 18:10:29 -080025 "libbase",
David Anderson83fdeca2019-09-09 17:56:22 -070026 "libbinder",
David Andersonb33f2b12019-01-22 14:14:10 -080027 "libcutils",
David Andersonc053b3b2019-01-08 18:22:07 -080028 "libgsi",
David Andersonee84d742019-01-07 18:10:29 -080029 "liblog",
David Andersonee84d742019-01-07 18:10:29 -080030 "libutils",
31 ],
David Anderson83fdeca2019-09-09 17:56:22 -070032 static_libs: [
33 "libgsid",
34 ],
David Andersonee84d742019-01-07 18:10:29 -080035 srcs: [
36 "gsi_tool.cpp",
37 ],
38}
39
40cc_library {
41 name: "libgsi",
Inseob Kimd1ec5f82021-06-14 11:55:32 +090042 ramdisk_available: true,
David Andersone4358272021-07-23 16:57:41 -070043 vendor_ramdisk_available: true,
David Andersonee84d742019-01-07 18:10:29 -080044 recovery_available: true,
Howard Chen9e20bdf2019-01-09 17:54:26 +080045 host_supported: true,
David Andersonee84d742019-01-07 18:10:29 -080046 srcs: [
47 "libgsi.cpp",
48 ],
49 shared_libs: [
50 "libbase",
51 ],
52 export_include_dirs: ["include"],
53}
54
David Anderson83fdeca2019-09-09 17:56:22 -070055cc_library_static {
56 name: "libgsid",
57 srcs: [
58 "libgsid.cpp",
59 ],
60 shared_libs: [
61 "gsi_aidl_interface-cpp",
62 "libbase",
63 "libbinder",
David Anderson83fdeca2019-09-09 17:56:22 -070064 "libutils",
65 ],
David Anderson83fdeca2019-09-09 17:56:22 -070066 export_include_dirs: ["include"],
67}
68
David Andersonee84d742019-01-07 18:10:29 -080069cc_library_headers {
70 name: "libgsi_headers",
Howard Chen9e20bdf2019-01-09 17:54:26 +080071 host_supported: true,
Inseob Kimd1ec5f82021-06-14 11:55:32 +090072 ramdisk_available: true,
David Andersone4358272021-07-23 16:57:41 -070073 vendor_ramdisk_available: true,
David Andersonee84d742019-01-07 18:10:29 -080074 recovery_available: true,
75 vendor_available: true,
76 export_include_dirs: ["include"],
77}
David Andersonc053b3b2019-01-08 18:22:07 -080078
79cc_binary {
80 name: "gsid",
81 srcs: [
82 "daemon.cpp",
83 "gsi_service.cpp",
Howard Chen4663de62019-11-05 20:46:20 +080084 "partition_installer.cpp",
David Andersonc053b3b2019-01-08 18:22:07 -080085 ],
86 required: [
87 "mke2fs",
88 ],
89 init_rc: [
90 "gsid.rc",
91 ],
92 shared_libs: [
David Andersonc053b3b2019-01-08 18:22:07 -080093 "libbase",
94 "libbinder",
David Andersond614eca2019-09-09 17:57:06 -070095 "libcrypto",
David Andersonc053b3b2019-01-08 18:22:07 -080096 "liblog",
David Andersonc053b3b2019-01-08 18:22:07 -080097 ],
98 static_libs: [
David Andersond614eca2019-09-09 17:57:06 -070099 "gsi_aidl_interface-cpp",
Yo Chiang53bed1c2020-01-01 16:25:19 +0800100 "libavb",
David Andersond614eca2019-09-09 17:57:06 -0700101 "libcutils",
David Anderson963d7cc2019-01-17 13:34:57 -0800102 "libdm",
David Andersond614eca2019-09-09 17:57:06 -0700103 "libext4_utils",
David Andersond614eca2019-09-09 17:57:06 -0700104 "libfs_mgr",
105 "libgsi",
106 "libgsid",
107 "liblp",
Yi-Yo Chiangf72d88a2021-03-22 13:45:39 +0800108 "libselinux",
David Andersond614eca2019-09-09 17:57:06 -0700109 "libutils",
Howard Chenee5c2b12019-11-08 11:57:47 +0800110 "libc++fs",
Yo Chiang1f080912020-10-07 17:29:57 +0800111 "libvold_binder",
David Andersonc053b3b2019-01-08 18:22:07 -0800112 ],
Yo Chiang721a0e42020-12-28 19:29:47 +0800113 header_libs: [
114 "libstorage_literals_headers",
115 ],
Stephen Hines60bbc032020-07-14 18:02:03 -0700116 target: {
117 android: {
118 shared_libs: [
119 "libprocessgroup",
120 "libvndksupport",
121 ],
122 },
123 },
David Andersonc053b3b2019-01-08 18:22:07 -0800124 local_include_dirs: ["include"],
125}
126
127aidl_interface {
128 name: "gsi_aidl_interface",
Jiyong Park4801a3f2020-04-13 12:56:16 +0900129 unstable: true,
David Anderson6f373b72019-06-05 15:04:00 -0700130 srcs: [":gsiservice_aidl"],
David Andersonc053b3b2019-01-08 18:22:07 -0800131 local_include_dir: "aidl",
132 backend: {
133 ndk: {
134 enabled: false,
135 },
136 },
137}
138
139filegroup {
140 name: "gsiservice_aidl",
141 srcs: [
Yo Chiang53bed1c2020-01-01 16:25:19 +0800142 "aidl/android/gsi/AvbPublicKey.aidl",
David Anderson6a5b8a72019-01-16 16:24:48 -0800143 "aidl/android/gsi/GsiProgress.aidl",
David Andersonc053b3b2019-01-08 18:22:07 -0800144 "aidl/android/gsi/IGsiService.aidl",
Howard Chen7885d3c2020-02-26 12:48:41 +0800145 "aidl/android/gsi/IGsiServiceCallback.aidl",
Yo Chiang53bed1c2020-01-01 16:25:19 +0800146 "aidl/android/gsi/IImageService.aidl",
Yifan Hongd66695b2019-12-23 16:07:45 -0800147 "aidl/android/gsi/IProgressCallback.aidl",
David Anderson6f373b72019-06-05 15:04:00 -0700148 "aidl/android/gsi/MappedImage.aidl",
David Andersonc053b3b2019-01-08 18:22:07 -0800149 ],
Jiyong Parkeaabad02019-08-16 21:10:23 +0900150 path: "aidl",
David Andersonc053b3b2019-01-08 18:22:07 -0800151}