blob: a44a2c625ee96f30015c85ed711b67d6c4bf8318 [file] [log] [blame]
Tao Baod2f2ad62018-03-23 23:24:25 -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
15cc_defaults {
16 name: "recovery_defaults",
17
18 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070019 "-D_FILE_OFFSET_BITS=64",
20
21 // Must be the same as RECOVERY_API_VERSION.
22 "-DRECOVERY_API_VERSION=3",
23
Tao Baod2f2ad62018-03-23 23:24:25 -070024 "-Wall",
25 "-Werror",
26 ],
27}
28
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070029cc_library_static {
30 name: "librecovery_fastboot",
31 recovery_available: true,
32 defaults: [
33 "recovery_defaults",
34 ],
35
36 srcs: [
37 "fastboot/fastboot.cpp",
38 ],
39
40 shared_libs: [
41 "libbase",
42 "libbootloader_message",
43 "libcutils",
44 "liblog",
Tianjie Xu8f397302018-08-20 13:40:47 -070045 "librecovery_ui",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070046 ],
47
48 static_libs: [
49 "librecovery_ui_default",
50 ],
51}
52
Tao Bao5fc72a12018-08-07 14:38:51 -070053cc_defaults {
54 name: "librecovery_defaults",
55
56 defaults: [
57 "recovery_defaults",
58 ],
59
60 shared_libs: [
Yifan Hong056538c2018-07-11 17:04:12 -070061 "android.hardware.health@2.0",
Tao Bao5fc72a12018-08-07 14:38:51 -070062 "libbase",
63 "libbootloader_message",
64 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070065 "libcutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070066 "libfs_mgr",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "liblog",
Tao Bao5fc72a12018-08-07 14:38:51 -070068 "libziparchive",
69 ],
70
71 static_libs: [
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070072 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070073 "libminui",
Tao Bao5fc72a12018-08-07 14:38:51 -070074 "libotautil",
Yifan Hong056538c2018-07-11 17:04:12 -070075
76 // external dependencies
77 "libhealthhalutils",
Tom Cherry72a114a2019-01-30 15:59:53 -080078 "libfstab",
Tao Bao5fc72a12018-08-07 14:38:51 -070079 ],
80}
81
82cc_library_static {
83 name: "librecovery",
84 recovery_available: true,
85
86 defaults: [
87 "librecovery_defaults",
88 ],
89
90 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070091 "fsck_unshare_blocks.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070092 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070093 ],
94
Tianjie Xu8f397302018-08-20 13:40:47 -070095 shared_libs: [
xunchang24788852019-03-22 16:08:52 -070096 "libinstall",
Tianjie Xu8f397302018-08-20 13:40:47 -070097 "librecovery_ui",
98 ],
xunchang37304f32019-03-12 12:40:14 -070099}
100
Tao Bao5fc72a12018-08-07 14:38:51 -0700101cc_binary {
102 name: "recovery",
103 recovery: true,
104
105 defaults: [
xunchang24788852019-03-22 16:08:52 -0700106 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700107 "librecovery_defaults",
108 ],
109
110 srcs: [
111 "logging.cpp",
112 "recovery_main.cpp",
113 ],
114
115 shared_libs: [
xunchang24788852019-03-22 16:08:52 -0700116 "libinstall",
Tao Bao7d2a63a2018-08-13 11:15:29 -0700117 "libminadbd_services",
Tao Bao5fc72a12018-08-07 14:38:51 -0700118 "librecovery_ui",
119 ],
120
121 static_libs: [
122 "librecovery",
123 "librecovery_ui_default",
124 ],
125
126 required: [
127 "e2fsdroid.recovery",
128 "librecovery_ui_ext",
Tao Bao7c074d92018-08-21 12:31:51 -0700129 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700130 "mke2fs.recovery",
131 "recovery_deps",
132 ],
133}
134
Tao Baod2f2ad62018-03-23 23:24:25 -0700135// The dynamic executable that runs after /data mounts.
136cc_binary {
137 name: "recovery-persist",
138
139 defaults: [
140 "recovery_defaults",
141 ],
142
143 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700144 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700145 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700146 ],
147
148 shared_libs: [
149 "libbase",
150 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700151 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700152 ],
153
Jerry Zhang152933a2018-05-02 16:56:00 -0700154 static_libs: [
155 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800156 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700157 ],
158
Tao Baod2f2ad62018-03-23 23:24:25 -0700159 init_rc: [
160 "recovery-persist.rc",
161 ],
162}
163
164// The dynamic executable that runs at init.
165cc_binary {
166 name: "recovery-refresh",
167
168 defaults: [
169 "recovery_defaults",
170 ],
171
172 srcs: [
Jerry Zhang152933a2018-05-02 16:56:00 -0700173 "logging.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700174 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700175 ],
176
177 shared_libs: [
178 "libbase",
179 "liblog",
180 ],
181
Jerry Zhang152933a2018-05-02 16:56:00 -0700182 static_libs: [
183 "libotautil",
Tom Cherry72a114a2019-01-30 15:59:53 -0800184 "libfstab",
Jerry Zhang152933a2018-05-02 16:56:00 -0700185 ],
186
Tao Baod2f2ad62018-03-23 23:24:25 -0700187 init_rc: [
188 "recovery-refresh.rc",
189 ],
190}
Tao Baoef5e38f2018-07-24 15:34:39 -0700191
192filegroup {
193 name: "res-testdata",
194
195 srcs: [
196 "res-*/images/*_text.png",
197 ],
198}