blob: ac07bf79f8a83c4b2d55dac4fd79edd280b27bc8 [file] [log] [blame]
Tao Baod2f2ad62018-03-23 23:24:25 -07001// Copyright (C) 2018 The Android Open Source Project
Steve Kondik641cbca2013-10-19 19:49:20 -07002// Copyright (C) 2019 The LineageOS Project
Tao Baod2f2ad62018-03-23 23:24:25 -07003//
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
16cc_defaults {
17 name: "recovery_defaults",
18
19 cflags: [
Tao Bao818f9382018-08-06 15:52:24 -070020 "-D_FILE_OFFSET_BITS=64",
21
22 // Must be the same as RECOVERY_API_VERSION.
23 "-DRECOVERY_API_VERSION=3",
24
Tao Baod2f2ad62018-03-23 23:24:25 -070025 "-Wall",
26 "-Werror",
27 ],
28}
29
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070030cc_library_static {
31 name: "librecovery_fastboot",
32 recovery_available: true,
33 defaults: [
34 "recovery_defaults",
35 ],
36
37 srcs: [
38 "fastboot/fastboot.cpp",
39 ],
40
41 shared_libs: [
42 "libbase",
43 "libbootloader_message",
44 "libcutils",
45 "liblog",
Tianjie Xu8f397302018-08-20 13:40:47 -070046 "librecovery_ui",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070047 ],
48
49 static_libs: [
50 "librecovery_ui_default",
51 ],
52}
53
Tao Bao5fc72a12018-08-07 14:38:51 -070054cc_defaults {
55 name: "librecovery_defaults",
56
57 defaults: [
58 "recovery_defaults",
59 ],
60
61 shared_libs: [
David Anderson89d2d052019-10-15 13:22:20 -070062 "android.hardware.boot@1.0",
63 "android.hardware.boot@1.1",
Tao Bao5fc72a12018-08-07 14:38:51 -070064 "libbase",
65 "libbootloader_message",
66 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "libcutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070068 "libfs_mgr",
David Anderson89d2d052019-10-15 13:22:20 -070069 "liblp",
Tao Bao5fc72a12018-08-07 14:38:51 -070070 "liblog",
David Anderson89d2d052019-10-15 13:22:20 -070071 "libprotobuf-cpp-lite",
Tao Bao5fc72a12018-08-07 14:38:51 -070072 "libziparchive",
Tom Marshall5b9e6cb2019-01-04 14:37:31 -080073 "libvolume_manager",
Tao Bao5fc72a12018-08-07 14:38:51 -070074 ],
75
76 static_libs: [
Tianjie Xu58a27692019-08-06 12:32:05 -070077 "libc++fs",
Tao Bao0deed332019-04-08 11:26:11 -070078 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070079 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070080 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070081 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070082 "libotautil",
David Anderson89d2d052019-10-15 13:22:20 -070083 "libsnapshot_nobinder",
Tao Bao5fc72a12018-08-07 14:38:51 -070084 ],
85}
86
87cc_library_static {
88 name: "librecovery",
89 recovery_available: true,
90
91 defaults: [
92 "librecovery_defaults",
93 ],
94
95 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070096 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070097 ],
98
Tianjie Xu8f397302018-08-20 13:40:47 -070099 shared_libs: [
100 "librecovery_ui",
101 ],
xunchang37304f32019-03-12 12:40:14 -0700102}
103
Tom Cherry24dd3142019-11-04 15:17:17 -0800104prebuilt_etc {
105 name: "init_recovery.rc",
106 filename: "init.rc",
107 src: "etc/init.rc",
108 sub_dir: "init/hw",
109 recovery: true,
110}
111
Tao Bao5fc72a12018-08-07 14:38:51 -0700112cc_binary {
113 name: "recovery",
114 recovery: true,
115
116 defaults: [
xunchang24788852019-03-22 16:08:52 -0700117 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700118 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700119 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700120 ],
121
122 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700123 "recovery_main.cpp",
Tom Marshall5b9e6cb2019-01-04 14:37:31 -0800124 "volclient.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -0700125 ],
126
127 shared_libs: [
128 "librecovery_ui",
129 ],
130
131 static_libs: [
Steve Kondik641cbca2013-10-19 19:49:20 -0700132 "libc++fs",
Tao Bao5fc72a12018-08-07 14:38:51 -0700133 "librecovery",
134 "librecovery_ui_default",
135 ],
136
137 required: [
138 "e2fsdroid.recovery",
Tom Cherry24dd3142019-11-04 15:17:17 -0800139 "init_recovery.rc",
Tao Bao5fc72a12018-08-07 14:38:51 -0700140 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700141 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700142 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700143 "mke2fs.recovery",
Steve Kondik641cbca2013-10-19 19:49:20 -0700144 "mkshrc.recovery",
145 "reboot.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700146 "recovery_deps",
Tom Cherry24dd3142019-11-04 15:17:17 -0800147 "ueventd.rc.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700148 ],
149}
150
Tao Baod2f2ad62018-03-23 23:24:25 -0700151// The dynamic executable that runs after /data mounts.
152cc_binary {
153 name: "recovery-persist",
154
155 defaults: [
156 "recovery_defaults",
157 ],
158
159 srcs: [
160 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700161 ],
162
163 shared_libs: [
164 "libbase",
165 "liblog",
166 ],
167
Jerry Zhang152933a2018-05-02 16:56:00 -0700168 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700169 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700170 ],
171
Tao Baod2f2ad62018-03-23 23:24:25 -0700172 init_rc: [
173 "recovery-persist.rc",
174 ],
175}
176
177// The dynamic executable that runs at init.
178cc_binary {
179 name: "recovery-refresh",
180
181 defaults: [
182 "recovery_defaults",
183 ],
184
185 srcs: [
186 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700187 ],
188
189 shared_libs: [
190 "libbase",
191 "liblog",
192 ],
193
Jerry Zhang152933a2018-05-02 16:56:00 -0700194 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700195 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700196 ],
197
Tao Baod2f2ad62018-03-23 23:24:25 -0700198 init_rc: [
199 "recovery-refresh.rc",
200 ],
201}
Tao Baoef5e38f2018-07-24 15:34:39 -0700202
203filegroup {
204 name: "res-testdata",
205
206 srcs: [
207 "res-*/images/*_text.png",
208 ],
209}