blob: eb737bba7ffb432a3f62daf67b7ac8a741f523e2 [file] [log] [blame]
Tom Cherry37b5ada2017-05-12 17:05:22 -07001//
2// Copyright (C) 2017 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
17cc_defaults {
18 name: "fs_mgr_defaults",
19 sanitize: {
20 misc_undefined: ["integer"],
21 },
22 local_include_dirs: ["include/"],
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070023 cflags: [
24 "-Wall",
25 "-Werror",
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070026 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070027}
28
Tao Baoa9fad6c2018-07-25 13:07:31 -070029cc_library {
Tom Cherry066fcdf2018-08-14 12:57:05 -070030 // Do not ever allow this library to be vendor_available as a shared library.
31 // It does not have a stable interface.
Tom Cherry37b5ada2017-05-12 17:05:22 -070032 name: "libfs_mgr",
33 defaults: ["fs_mgr_defaults"],
Jiyong Parka0e75042018-05-24 14:11:00 +090034 recovery_available: true,
Tom Cherry37b5ada2017-05-12 17:05:22 -070035 export_include_dirs: ["include"],
36 include_dirs: ["system/vold"],
37 srcs: [
David Andersonc6512132019-06-10 19:03:01 -070038 "file_wait.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070039 "fs_mgr.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070040 "fs_mgr_format.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070041 "fs_mgr_verity.cpp",
David Anderson62e5b202018-05-01 17:09:17 -070042 "fs_mgr_dm_linear.cpp",
Mark Salyzynb28389f2018-06-06 13:10:40 -070043 "fs_mgr_overlayfs.cpp",
Yifan Hongbf80e7d2018-12-03 13:46:56 -080044 "fs_mgr_roots.cpp",
Justin Yun6bab0a92018-10-29 18:31:48 +090045 "fs_mgr_vendor_overlay.cpp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090046 ],
Tao Baoa9fad6c2018-07-25 13:07:31 -070047 shared_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090048 "libbase",
Jiyong Parke7df1f72017-06-28 11:17:30 +090049 "libcrypto",
Tao Bao7aa46082018-08-13 22:25:34 -070050 "libcrypto_utils",
Tao Baoa9fad6c2018-07-25 13:07:31 -070051 "libcutils",
Jiyong Parke7df1f72017-06-28 11:17:30 +090052 "libext4_utils",
Tao Bao7aa46082018-08-13 22:25:34 -070053 "libfec",
Tao Baoa9fad6c2018-07-25 13:07:31 -070054 "liblog",
David Andersonf792e412018-07-27 16:05:31 -070055 "liblp",
Tao Bao7aa46082018-08-13 22:25:34 -070056 "libselinux",
Tao Baoa9fad6c2018-07-25 13:07:31 -070057 ],
58 static_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090059 "libavb",
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080060 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090061 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070062 "libdm",
David Anderson0e330f12019-01-03 18:16:56 -080063 "libgsi",
Jiyong Parke7df1f72017-06-28 11:17:30 +090064 ],
65 export_static_lib_headers: [
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080066 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090067 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070068 "libdm",
David Andersonf792e412018-07-27 16:05:31 -070069 ],
70 export_shared_lib_headers: [
David Andersonea3b8ac2018-06-07 15:36:09 -070071 "liblp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090072 ],
73 whole_static_libs: [
Jin Qian42d81372017-04-21 16:56:34 -070074 "liblogwrap",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070075 "libdm",
David Anderson924858c2019-06-26 17:00:00 -070076 "libext2_uuid",
Paul Crowley7160fc12019-10-25 17:12:45 -070077 "libfscrypt",
Jiyong Parke7df1f72017-06-28 11:17:30 +090078 "libfstab",
Tom Cherry37b5ada2017-05-12 17:05:22 -070079 ],
Tom Cherry31121ca2017-10-10 13:30:57 -070080 cppflags: [
Tom Cherry31121ca2017-10-10 13:30:57 -070081 "-DALLOW_ADBD_DISABLE_VERITY=0",
82 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070083 product_variables: {
84 debuggable: {
Tom Cherry31121ca2017-10-10 13:30:57 -070085 cppflags: [
86 "-UALLOW_ADBD_DISABLE_VERITY",
87 "-DALLOW_ADBD_DISABLE_VERITY=1",
88 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070089 },
Tom Cherry37b5ada2017-05-12 17:05:22 -070090 },
91}
Jiyong Parke7df1f72017-06-28 11:17:30 +090092
93cc_library_static {
Tom Cherry066fcdf2018-08-14 12:57:05 -070094 // Do not ever make this a shared library as long as it is vendor_available.
95 // It does not have a stable interface.
Jiyong Parke7df1f72017-06-28 11:17:30 +090096 name: "libfstab",
97 vendor_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090098 recovery_available: true,
Bowgo Tsaifa416f92019-01-07 15:30:27 +080099 host_supported: true,
Jiyong Parke7df1f72017-06-28 11:17:30 +0900100 defaults: ["fs_mgr_defaults"],
101 srcs: [
102 "fs_mgr_fstab.cpp",
103 "fs_mgr_boot_config.cpp",
104 "fs_mgr_slotselect.cpp",
105 ],
bohu91c4bd72019-01-11 14:25:58 -0800106 target: {
107 darwin: {
108 enabled: false,
109 },
110 },
Jiyong Parke7df1f72017-06-28 11:17:30 +0900111 export_include_dirs: ["include_fstab"],
David Anderson0e330f12019-01-03 18:16:56 -0800112 header_libs: [
113 "libbase_headers",
114 "libgsi_headers",
115 ],
Jiyong Parke7df1f72017-06-28 11:17:30 +0900116}
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800117
118cc_binary {
119 name: "remount",
120 defaults: ["fs_mgr_defaults"],
Mark Salyzyn1188ce42019-01-25 11:05:40 -0800121 static_libs: [
122 "libavb_user",
123 ],
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800124 shared_libs: [
Mark Salyzyn1188ce42019-01-25 11:05:40 -0800125 "libbootloader_message",
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800126 "libbase",
Mark Salyzync3fc2aa2019-04-30 13:21:04 -0700127 "libcutils",
Mark Salyzyn4469fb12019-01-30 10:19:15 -0800128 "libcrypto",
Mark Salyzync3fc2aa2019-04-30 13:21:04 -0700129 "libext4_utils",
Mark Salyzyn4469fb12019-01-30 10:19:15 -0800130 "libfec",
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800131 "libfs_mgr",
Mark Salyzync3fc2aa2019-04-30 13:21:04 -0700132 "liblog",
133 "liblp",
134 "libselinux",
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800135 ],
Mark Salyzyn1188ce42019-01-25 11:05:40 -0800136 header_libs: [
137 "libcutils_headers",
138 ],
Mark Salyzyn6b3f5872019-02-20 08:32:36 -0800139 srcs: [
140 "fs_mgr_remount.cpp",
141 ],
142 cppflags: [
143 "-DALLOW_ADBD_DISABLE_VERITY=0",
144 ],
145 product_variables: {
146 debuggable: {
147 cppflags: [
148 "-UALLOW_ADBD_DISABLE_VERITY",
149 "-DALLOW_ADBD_DISABLE_VERITY=1",
150 ],
151 },
152 },
153}