blob: 1ae8ff78d63175bceb94e2f3bea28b11fae80518 [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: [
Tao Bao5fc72a12018-08-07 14:38:51 -070061 "libbase",
62 "libbootloader_message",
63 "libcrypto",
Tao Bao5fc72a12018-08-07 14:38:51 -070064 "libcutils",
Tao Bao5fc72a12018-08-07 14:38:51 -070065 "libfs_mgr",
Tao Bao5fc72a12018-08-07 14:38:51 -070066 "liblog",
Tao Bao5fc72a12018-08-07 14:38:51 -070067 "libziparchive",
68 ],
69
70 static_libs: [
Tianjie Xu58a27692019-08-06 12:32:05 -070071 "libc++fs",
Tao Bao0deed332019-04-08 11:26:11 -070072 "libinstall",
Hridya Valsaraju20c81b32018-07-27 22:09:12 -070073 "librecovery_fastboot",
Tao Bao5fc72a12018-08-07 14:38:51 -070074 "libminui",
Tao Baoe3f09a72019-10-01 11:55:36 -070075 "librecovery_utils",
Tao Bao5fc72a12018-08-07 14:38:51 -070076 "libotautil",
Tao Bao5fc72a12018-08-07 14:38:51 -070077 ],
78}
79
80cc_library_static {
81 name: "librecovery",
82 recovery_available: true,
83
84 defaults: [
85 "librecovery_defaults",
86 ],
87
88 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -070089 "fsck_unshare_blocks.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070090 "recovery.cpp",
Tao Bao5fc72a12018-08-07 14:38:51 -070091 ],
92
Tianjie Xu8f397302018-08-20 13:40:47 -070093 shared_libs: [
94 "librecovery_ui",
95 ],
xunchang37304f32019-03-12 12:40:14 -070096}
97
Tom Cherry24dd3142019-11-04 15:17:17 -080098prebuilt_etc {
99 name: "init_recovery.rc",
100 filename: "init.rc",
101 src: "etc/init.rc",
102 sub_dir: "init/hw",
103 recovery: true,
104}
105
Tao Bao5fc72a12018-08-07 14:38:51 -0700106cc_binary {
107 name: "recovery",
108 recovery: true,
109
110 defaults: [
xunchang24788852019-03-22 16:08:52 -0700111 "libinstall_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700112 "librecovery_defaults",
Tao Bao832c9cd2019-09-27 23:32:00 -0700113 "librecovery_utils_defaults",
Tao Bao5fc72a12018-08-07 14:38:51 -0700114 ],
115
116 srcs: [
Tao Bao5fc72a12018-08-07 14:38:51 -0700117 "recovery_main.cpp",
118 ],
119
120 shared_libs: [
121 "librecovery_ui",
122 ],
123
124 static_libs: [
125 "librecovery",
126 "librecovery_ui_default",
127 ],
128
129 required: [
130 "e2fsdroid.recovery",
Tom Cherry24dd3142019-11-04 15:17:17 -0800131 "init_recovery.rc",
Tao Bao5fc72a12018-08-07 14:38:51 -0700132 "librecovery_ui_ext",
xunchang34690ce2019-04-05 16:16:07 -0700133 "minadbd",
Tao Bao7c074d92018-08-21 12:31:51 -0700134 "mke2fs.conf.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700135 "mke2fs.recovery",
136 "recovery_deps",
Tom Cherry24dd3142019-11-04 15:17:17 -0800137 "ueventd.rc.recovery",
Tao Bao5fc72a12018-08-07 14:38:51 -0700138 ],
139}
140
Tao Baod2f2ad62018-03-23 23:24:25 -0700141// The dynamic executable that runs after /data mounts.
142cc_binary {
143 name: "recovery-persist",
144
145 defaults: [
146 "recovery_defaults",
147 ],
148
149 srcs: [
150 "recovery-persist.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700151 ],
152
153 shared_libs: [
154 "libbase",
155 "liblog",
Tianjie Xu2b1a4642018-09-06 11:58:55 -0700156 "libmetricslogger",
Tao Baod2f2ad62018-03-23 23:24:25 -0700157 ],
158
Jerry Zhang152933a2018-05-02 16:56:00 -0700159 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700160 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700161 ],
162
Tao Baod2f2ad62018-03-23 23:24:25 -0700163 init_rc: [
164 "recovery-persist.rc",
165 ],
166}
167
168// The dynamic executable that runs at init.
169cc_binary {
170 name: "recovery-refresh",
171
172 defaults: [
173 "recovery_defaults",
174 ],
175
176 srcs: [
177 "recovery-refresh.cpp",
Tao Baod2f2ad62018-03-23 23:24:25 -0700178 ],
179
180 shared_libs: [
181 "libbase",
182 "liblog",
183 ],
184
Jerry Zhang152933a2018-05-02 16:56:00 -0700185 static_libs: [
Tao Baoe3f09a72019-10-01 11:55:36 -0700186 "librecovery_utils",
Jerry Zhang152933a2018-05-02 16:56:00 -0700187 ],
188
Tao Baod2f2ad62018-03-23 23:24:25 -0700189 init_rc: [
190 "recovery-refresh.rc",
191 ],
192}
Tao Baoef5e38f2018-07-24 15:34:39 -0700193
194filegroup {
195 name: "res-testdata",
196
197 srcs: [
198 "res-*/images/*_text.png",
199 ],
200}