blob: 5d0968717baf217238c13e796b648e00e9dc976e [file] [log] [blame]
Tom Cherry14fc0132017-05-09 17:11:57 -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
Bob Badourd69ad692021-02-16 19:02:14 -080017package {
18 default_applicable_licenses: ["system_core_init_license"],
19}
20
21// Added automatically by a large-scale-change
22// See: http://go/android-license-faq
23license {
24 name: "system_core_init_license",
25 visibility: [":__subpackages__"],
26 license_kinds: [
27 "SPDX-license-identifier-Apache-2.0",
28 ],
29 license_text: [
30 "NOTICE",
31 ],
32}
33
Tom Cherry66196492020-02-06 11:56:58 -080034init_common_sources = [
35 "action.cpp",
36 "action_manager.cpp",
37 "action_parser.cpp",
38 "capabilities.cpp",
39 "epoll.cpp",
40 "import_parser.cpp",
41 "interface_utils.cpp",
42 "keychords.cpp",
43 "parser.cpp",
44 "property_type.cpp",
45 "rlimit_parser.cpp",
46 "service.cpp",
47 "service_list.cpp",
48 "service_parser.cpp",
49 "service_utils.cpp",
50 "subcontext.cpp",
51 "subcontext.proto",
52 "tokenizer.cpp",
53 "util.cpp",
54]
55init_device_sources = [
David Anderson41175592020-03-20 19:38:28 -070056 "block_dev_initializer.cpp",
Tom Cherry66196492020-02-06 11:56:58 -080057 "bootchart.cpp",
58 "builtins.cpp",
59 "devices.cpp",
60 "firmware_handler.cpp",
Steve Mucklea4bf2ce2019-11-01 13:58:02 -070061 "first_stage_console.cpp",
Tom Cherry66196492020-02-06 11:56:58 -080062 "first_stage_init.cpp",
63 "first_stage_mount.cpp",
64 "fscrypt_init_extensions.cpp",
65 "init.cpp",
66 "lmkd_service.cpp",
67 "modalias_handler.cpp",
68 "mount_handler.cpp",
69 "mount_namespace.cpp",
70 "persistent_properties.cpp",
71 "persistent_properties.proto",
72 "property_service.cpp",
73 "property_service.proto",
74 "reboot.cpp",
75 "reboot_utils.cpp",
76 "security.cpp",
77 "selabel.cpp",
78 "selinux.cpp",
79 "sigchld_handler.cpp",
David Anderson491e4da2020-12-08 00:21:20 -080080 "snapuserd_transition.cpp",
Tom Cherry66196492020-02-06 11:56:58 -080081 "switch_root.cpp",
82 "uevent_listener.cpp",
83 "ueventd.cpp",
84 "ueventd_parser.cpp",
85]
86init_host_sources = [
87 "check_builtins.cpp",
88 "host_import_parser.cpp",
89 "host_init_verifier.cpp",
90]
91
Santiago Seifertbe09a1e2021-09-23 13:07:25 +000092cc_defaults {
Tom Cherry14fc0132017-05-09 17:11:57 -070093 name: "init_defaults",
Tom Cherry14fc0132017-05-09 17:11:57 -070094 sanitize: {
Tom Cherry2ffd65e2017-07-26 14:17:09 -070095 misc_undefined: ["signed-integer-overflow"],
Tom Cherry14fc0132017-05-09 17:11:57 -070096 },
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070097 cflags: [
Tom Cherry14fc0132017-05-09 17:11:57 -070098 "-DLOG_UEVENTS=0",
99 "-Wall",
100 "-Wextra",
101 "-Wno-unused-parameter",
102 "-Werror",
Tom Cherry802864c2020-03-12 14:29:25 -0700103 "-Wthread-safety",
Steve Muckled75f30a2019-05-21 15:50:39 -0700104 "-DALLOW_FIRST_STAGE_CONSOLE=0",
Tom Cherry14fc0132017-05-09 17:11:57 -0700105 "-DALLOW_LOCAL_PROP_OVERRIDE=0",
106 "-DALLOW_PERMISSIVE_SELINUX=0",
107 "-DREBOOT_BOOTLOADER_ON_PANIC=0",
108 "-DWORLD_WRITABLE_KMSG=0",
109 "-DDUMP_ON_UMOUNT_FAILURE=0",
110 "-DSHUTDOWN_ZERO_TIMEOUT=0",
Tom Cherrya2f91362020-02-20 10:50:00 -0800111 "-DINIT_FULL_SOURCES",
Tom Cherry14fc0132017-05-09 17:11:57 -0700112 ],
113 product_variables: {
114 debuggable: {
115 cppflags: [
Steve Muckled75f30a2019-05-21 15:50:39 -0700116 "-UALLOW_FIRST_STAGE_CONSOLE",
117 "-DALLOW_FIRST_STAGE_CONSOLE=1",
Tom Cherry14fc0132017-05-09 17:11:57 -0700118 "-UALLOW_LOCAL_PROP_OVERRIDE",
119 "-DALLOW_LOCAL_PROP_OVERRIDE=1",
120 "-UALLOW_PERMISSIVE_SELINUX",
121 "-DALLOW_PERMISSIVE_SELINUX=1",
122 "-UREBOOT_BOOTLOADER_ON_PANIC",
123 "-DREBOOT_BOOTLOADER_ON_PANIC=1",
124 "-UWORLD_WRITABLE_KMSG",
125 "-DWORLD_WRITABLE_KMSG=1",
126 "-UDUMP_ON_UMOUNT_FAILURE",
127 "-DDUMP_ON_UMOUNT_FAILURE=1",
128 ],
129 },
130 eng: {
131 cppflags: [
132 "-USHUTDOWN_ZERO_TIMEOUT",
133 "-DSHUTDOWN_ZERO_TIMEOUT=1",
134 ],
135 },
Dmitry Shmidtc3bc5092017-08-23 14:57:07 -0700136 uml: {
137 cppflags: ["-DUSER_MODE_LINUX"],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800138 },
Tom Cherry14fc0132017-05-09 17:11:57 -0700139 },
Tom Cherry618d3102018-01-19 14:25:48 -0800140 static_libs: [
Tom Cherry618d3102018-01-19 14:25:48 -0800141 "libavb",
Bowgo Tsai30afda72019-04-11 23:57:24 +0800142 "libc++fs",
Yifan Hongd8ce1fb2019-03-22 17:21:58 -0700143 "libcgrouprc_format",
Suren Baghdasaryanc29c2ba2019-10-22 17:18:42 -0700144 "liblmkd_utils",
Steve Muckle18b981e2019-04-15 17:43:02 -0700145 "libmodprobe",
David Anderson9fd88622021-03-05 14:10:55 -0800146 "libprocinfo",
Tom Cherry618d3102018-01-19 14:25:48 -0800147 "libprotobuf-cpp-lite",
148 "libpropertyinfoserializer",
149 "libpropertyinfoparser",
David Andersonaca0bea2020-09-21 16:34:25 -0700150 "libsnapshot_cow",
David Andersondfe6d072019-10-09 16:24:03 -0700151 "libsnapshot_init",
Jooyung Han1d951b72020-07-05 03:33:36 +0900152 "libxml2",
Jiyong Park648ae3a2019-12-08 00:25:15 +0900153 "lib_apex_manifest_proto_lite",
Yifan Hong66f01152020-04-16 11:05:16 -0700154 "update_metadata-protos",
Jiyong Park787322c2018-06-01 19:26:42 +0900155 ],
156 shared_libs: [
Tom Cherry59656fb2019-05-28 10:19:44 -0700157 "libbacktrace",
Jiyong Park787322c2018-06-01 19:26:42 +0900158 "libbase",
Tao Bao66209ca2018-07-25 22:35:45 -0700159 "libbootloader_message",
160 "libcutils",
Jiyong Park787322c2018-06-01 19:26:42 +0900161 "libdl",
Tao Bao66209ca2018-07-25 22:35:45 -0700162 "libext4_utils",
163 "libfs_mgr",
David Anderson0e330f12019-01-03 18:16:56 -0800164 "libgsi",
Tao Bao66209ca2018-07-25 22:35:45 -0700165 "libhidl-gen-utils",
166 "libkeyutils",
167 "liblog",
168 "liblogwrap",
Tom Cherry7bfea3d2018-11-06 14:12:05 -0800169 "liblp",
Suren Baghdasaryan82b72a52018-12-21 11:41:50 -0800170 "libprocessgroup",
Yifan Hong6f9ce2e2019-03-05 15:47:16 -0800171 "libprocessgroup_setup",
Jiyong Park012171d2018-06-19 16:55:05 +0900172 "libselinux",
Martijn Coenen62e985a2018-09-04 06:29:14 +0200173 "libutils",
Tom Cherry618d3102018-01-19 14:25:48 -0800174 ],
Jiyong Park93318d42018-12-26 17:34:39 +0900175 bootstrap: true,
Daniel Norman8082ba22019-07-23 10:26:15 -0700176 visibility: [":__subpackages__"],
Tom Cherry14fc0132017-05-09 17:11:57 -0700177}
178
179cc_library_static {
180 name: "libinit",
Tom Cherry31438482018-07-20 14:57:00 -0700181 recovery_available: true,
Daniel Norman8082ba22019-07-23 10:26:15 -0700182 defaults: [
183 "init_defaults",
184 "selinux_policy_version",
185 ],
Tom Cherry66196492020-02-06 11:56:58 -0800186 srcs: init_common_sources + init_device_sources,
Jooyung Han1d951b72020-07-05 03:33:36 +0900187 generated_sources: [
188 "apex-info-list",
189 ],
Daniel Norman8082ba22019-07-23 10:26:15 -0700190 whole_static_libs: [
191 "libcap",
192 "com.android.sysprop.apex",
Nikita Ioffe23dbd6d2019-11-14 01:21:24 +0000193 "com.android.sysprop.init",
Daniel Norman8082ba22019-07-23 10:26:15 -0700194 ],
Jayant Chowdhary478c7c12018-03-28 18:45:35 -0700195 header_libs: ["bootimg_headers"],
Tom Cherrya97faba2017-09-15 15:44:04 -0700196 proto: {
197 type: "lite",
198 export_proto_headers: true,
199 },
Martijn Coenen62e985a2018-09-04 06:29:14 +0200200
201 target: {
202 recovery: {
203 cflags: ["-DRECOVERY"],
Jooyung Han1d951b72020-07-05 03:33:36 +0900204 exclude_static_libs: [
205 "libxml2",
206 ],
207 exclude_generated_sources: [
208 "apex-info-list",
209 ],
Daniel Norman8082ba22019-07-23 10:26:15 -0700210 exclude_shared_libs: [
211 "libbinder",
212 "libutils",
213 ],
Martijn Coenen62e985a2018-09-04 06:29:14 +0200214 },
215 },
Tom Cherry14fc0132017-05-09 17:11:57 -0700216}
217
Steven Morelandceb36d02019-07-15 15:12:56 -0700218phony {
219 name: "init",
220 required: [
221 "init_second_stage",
222 ],
223}
224
Tom Cherry14fc0132017-05-09 17:11:57 -0700225cc_binary {
Tom Cherry31438482018-07-20 14:57:00 -0700226 name: "init_second_stage",
227 recovery_available: true,
228 stem: "init",
Tom Cherry14fc0132017-05-09 17:11:57 -0700229 defaults: ["init_defaults"],
Tom Cherry31438482018-07-20 14:57:00 -0700230 static_libs: ["libinit"],
Tom Cherry618d3102018-01-19 14:25:48 -0800231 srcs: ["main.cpp"],
Tom Cherry31438482018-07-20 14:57:00 -0700232 symlinks: ["ueventd"],
Martijn Coenen62e985a2018-09-04 06:29:14 +0200233 target: {
Yi-Yo Chiang9ba6a5b2021-07-24 22:50:17 +0800234 platform: {
235 required: [
236 "init.rc",
237 "ueventd.rc",
238 "e2fsdroid",
Suren Baghdasaryan642048d2021-06-15 12:28:24 -0700239 "extra_free_kbytes.sh",
Yi-Yo Chiang9ba6a5b2021-07-24 22:50:17 +0800240 "make_f2fs",
241 "mke2fs",
242 "sload_f2fs",
243 ],
244 },
Martijn Coenen62e985a2018-09-04 06:29:14 +0200245 recovery: {
246 cflags: ["-DRECOVERY"],
Jooyung Han1d951b72020-07-05 03:33:36 +0900247 exclude_static_libs: [
248 "libxml2",
249 ],
Daniel Norman8082ba22019-07-23 10:26:15 -0700250 exclude_shared_libs: [
251 "libbinder",
252 "libutils",
253 ],
Yi-Yo Chiang9ba6a5b2021-07-24 22:50:17 +0800254 required: [
255 "init_recovery.rc",
256 "ueventd.rc.recovery",
257 "e2fsdroid.recovery",
258 "make_f2fs.recovery",
259 "mke2fs.recovery",
260 "sload_f2fs.recovery",
261 ],
Martijn Coenen62e985a2018-09-04 06:29:14 +0200262 },
263 },
Jiyong Park90353782021-01-25 18:41:40 +0900264 visibility: ["//packages/modules/Virtualization/microdroid"],
Tom Cherry14fc0132017-05-09 17:11:57 -0700265}
Tom Cherry14fc0132017-05-09 17:11:57 -0700266
Inseob Kim2e200582021-06-11 12:58:53 +0900267soong_config_module_type {
268 name: "init_first_stage_cc_defaults",
269 module_type: "cc_defaults",
270 config_namespace: "ANDROID",
Bowgo Tsaiab079af2021-07-14 15:39:53 +0800271 bool_variables: ["BOARD_BUILD_SYSTEM_ROOT_IMAGE", "BOARD_USES_RECOVERY_AS_BOOT"],
Inseob Kim2e200582021-06-11 12:58:53 +0900272 properties: ["installable"],
273}
274
275// Do not install init_first_stage even with mma if we're system-as-root.
276// Otherwise, it will overwrite the symlink.
277init_first_stage_cc_defaults {
278 name: "init_first_stage_defaults",
279 soong_config_variables: {
280 BOARD_BUILD_SYSTEM_ROOT_IMAGE: {
281 installable: false,
282 },
Bowgo Tsaiab079af2021-07-14 15:39:53 +0800283 BOARD_USES_RECOVERY_AS_BOOT: {
284 installable: false,
285 },
Inseob Kim2e200582021-06-11 12:58:53 +0900286 },
287}
288
Jiyong Park13eb0532021-02-15 14:13:51 +0900289cc_binary {
Inseob Kim2e200582021-06-11 12:58:53 +0900290 name: "init_first_stage",
291 stem: "init",
292 defaults: ["init_first_stage_defaults"],
Jiyong Park13eb0532021-02-15 14:13:51 +0900293
294 srcs: [
295 "block_dev_initializer.cpp",
296 "devices.cpp",
297 "first_stage_console.cpp",
298 "first_stage_init.cpp",
299 "first_stage_main.cpp",
300 "first_stage_mount.cpp",
301 "reboot_utils.cpp",
302 "selabel.cpp",
303 "selinux.cpp",
304 "service_utils.cpp",
305 "snapuserd_transition.cpp",
306 "switch_root.cpp",
307 "uevent_listener.cpp",
308 "util.cpp",
309 ],
310
311 static_libs: [
312 "libc++fs",
313 "libfs_avb",
314 "libfs_mgr",
315 "libfec",
316 "libfec_rs",
317 "libsquashfs_utils",
318 "liblogwrap",
319 "libext4_utils",
320 "libcrypto_utils",
321 "libsparse",
322 "libavb",
323 "libkeyutils",
324 "liblp",
325 "libcutils",
326 "libbase",
327 "liblog",
328 "libcrypto_static",
329 "libdl",
330 "libz",
331 "libselinux",
332 "libcap",
333 "libgsi",
334 "libcom.android.sysprop.apex",
335 "liblzma",
336 "libunwindstack_no_dex",
337 "libbacktrace_no_dex",
338 "libmodprobe",
339 "libext2_uuid",
340 "libprotobuf-cpp-lite",
341 "libsnapshot_cow",
342 "libsnapshot_init",
343 "update_metadata-protos",
David Anderson9fd88622021-03-05 14:10:55 -0800344 "libprocinfo",
Jiyong Park13eb0532021-02-15 14:13:51 +0900345 ],
346
347 static_executable: true,
Inseob Kim2e200582021-06-11 12:58:53 +0900348 system_shared_libs: [],
Jiyong Park13eb0532021-02-15 14:13:51 +0900349
350 cflags: [
351 "-Wall",
352 "-Wextra",
353 "-Wno-unused-parameter",
354 "-Werror",
355 "-DALLOW_FIRST_STAGE_CONSOLE=0",
356 "-DALLOW_LOCAL_PROP_OVERRIDE=0",
357 "-DALLOW_PERMISSIVE_SELINUX=0",
358 "-DREBOOT_BOOTLOADER_ON_PANIC=0",
359 "-DWORLD_WRITABLE_KMSG=0",
360 "-DDUMP_ON_UMOUNT_FAILURE=0",
361 "-DSHUTDOWN_ZERO_TIMEOUT=0",
362 "-DLOG_UEVENTS=0",
363 "-DSEPOLICY_VERSION=30", // TODO(jiyong): externalize the version number
364 ],
365
366 product_variables: {
367 debuggable: {
368 cflags: [
369 "-UALLOW_FIRST_STAGE_CONSOLE",
370 "-DALLOW_FIRST_STAGE_CONSOLE=1",
371
372 "-UALLOW_LOCAL_PROP_OVERRIDE",
373 "-DALLOW_LOCAL_PROP_OVERRIDE=1",
374
375 "-UALLOW_PERMISSIVE_SELINUX",
376 "-DALLOW_PERMISSIVE_SELINUX=1",
377
378 "-UREBOOT_BOOTLOADER_ON_PANIC",
379 "-DREBOOT_BOOTLOADER_ON_PANIC=1",
380
381 "-UWORLD_WRITABLE_KMSG",
382 "-DWORLD_WRITABLE_KMSG=1",
383
384 "-UDUMP_ON_UMOUNT_FAILURE",
385 "-DDUMP_ON_UMOUNT_FAILURE=1",
386 ],
387 },
388
389 eng: {
390 cflags: [
391 "-USHUTDOWN_ZERO_TIMEOUT",
392 "-DSHUTDOWN_ZERO_TIMEOUT=1",
393 ],
394 },
395 },
396
397 sanitize: {
398 misc_undefined: ["signed-integer-overflow"],
Inseob Kim2e200582021-06-11 12:58:53 +0900399
400 // First stage init is weird: it may start without stdout/stderr, and no /proc.
Jiyong Park13eb0532021-02-15 14:13:51 +0900401 hwaddress: false,
402 },
Inseob Kim2e200582021-06-11 12:58:53 +0900403
404 // Install adb_debug.prop into debug ramdisk.
405 // This allows adb root on a user build, when debug ramdisk is used.
406 required: ["adb_debug.prop"],
407
408 ramdisk: true,
409
410 install_in_root: true,
411}
412
413phony {
414 name: "init_system",
415 required: ["init_second_stage"],
Jiyong Park13eb0532021-02-15 14:13:51 +0900416}
417
Tom Cherry14fc0132017-05-09 17:11:57 -0700418// Tests
419// ------------------------------------------------------------------------------
420
421cc_test {
Tom Cherry17b2be02019-08-20 10:43:48 -0700422 name: "CtsInitTestCases",
Tom Cherry14fc0132017-05-09 17:11:57 -0700423 defaults: ["init_defaults"],
Josh Gao6cad1392019-08-27 16:02:38 -0700424 require_root: true,
425
Tom Cherry17b2be02019-08-20 10:43:48 -0700426 compile_multilib: "both",
427 multilib: {
428 lib32: {
429 suffix: "32",
430 },
431 lib64: {
432 suffix: "64",
433 },
434 },
435
Tom Cherry14fc0132017-05-09 17:11:57 -0700436 srcs: [
437 "devices_test.cpp",
Tom Cherrydcb3d152019-08-07 16:02:28 -0700438 "firmware_handler_test.cpp",
Tom Cherry14fc0132017-05-09 17:11:57 -0700439 "init_test.cpp",
Mark Salyzyn75b901d2018-05-15 11:19:43 -0700440 "keychords_test.cpp",
Tom Cherrybdbf5042020-03-04 10:52:08 -0800441 "oneshot_on_test.cpp",
Tom Cherry16fad422017-08-04 15:59:03 -0700442 "persistent_properties_test.cpp",
Tom Cherry14fc0132017-05-09 17:11:57 -0700443 "property_service_test.cpp",
Tom Cherry927c5d52017-12-11 01:40:07 -0800444 "property_type_test.cpp",
Tom Cherry7ac013d2017-08-25 10:39:25 -0700445 "rlimit_parser_test.cpp",
Tom Cherry14fc0132017-05-09 17:11:57 -0700446 "service_test.cpp",
Tom Cherrycb0f9bb2017-09-12 15:58:47 -0700447 "subcontext_test.cpp",
Tom Cherry2a5a4e72018-06-26 13:56:34 -0700448 "tokenizer_test.cpp",
Tom Cherry5f0198b2018-07-17 15:28:16 -0700449 "ueventd_parser_test.cpp",
Tom Cherryc2e181c2017-07-14 16:29:23 -0700450 "ueventd_test.cpp",
Tom Cherry14fc0132017-05-09 17:11:57 -0700451 "util_test.cpp",
452 ],
Tom Cherry618d3102018-01-19 14:25:48 -0800453 static_libs: ["libinit"],
Tom Cherry17b2be02019-08-20 10:43:48 -0700454
455 test_suites: [
456 "cts",
457 "device-tests",
Tom Cherry17b2be02019-08-20 10:43:48 -0700458 ],
Tom Cherry14fc0132017-05-09 17:11:57 -0700459}
460
Tom Cherrycb0f9bb2017-09-12 15:58:47 -0700461cc_benchmark {
462 name: "init_benchmarks",
463 defaults: ["init_defaults"],
464 srcs: [
465 "subcontext_benchmark.cpp",
466 ],
Tom Cherry618d3102018-01-19 14:25:48 -0800467 static_libs: ["libinit"],
Tom Cherrycb0f9bb2017-09-12 15:58:47 -0700468}
469
Tom Cherrya2f91362020-02-20 10:50:00 -0800470cc_defaults {
471 name: "libinit_test_utils_libraries_defaults",
472 shared_libs: [
473 "libbase",
474 "libcutils",
475 "libselinux",
476 "libhidl-gen-utils",
477 "liblog",
478 "libprocessgroup",
479 "libprotobuf-cpp-lite",
480 ],
481}
482
483cc_library_static {
484 name: "libinit_test_utils",
485 defaults: ["libinit_test_utils_libraries_defaults"],
486 cflags: [
487 "-Wall",
488 "-Wextra",
489 "-Wno-unused-parameter",
490 "-Werror",
491 ],
492 srcs: init_common_sources + [
493 "test_utils/service_utils.cpp",
494 ],
495 whole_static_libs: [
496 "libcap",
497 ],
498 export_include_dirs: ["test_utils/include"], // for tests
499}
500
Tom Cherryde6bd502018-02-13 16:50:08 -0800501// Host Verifier
502// ------------------------------------------------------------------------------
503
504genrule {
505 name: "generated_stub_builtin_function_map",
Tom Cherry4772f1d2019-07-30 09:34:41 -0700506 tool_files: ["host_builtin_map.py"],
Tom Cherryde6bd502018-02-13 16:50:08 -0800507 out: ["generated_stub_builtin_function_map.h"],
Daniel Normand2533c32019-08-02 15:13:50 -0700508 srcs: [
509 "builtins.cpp",
510 "check_builtins.cpp",
511 ],
Tom Cherry4772f1d2019-07-30 09:34:41 -0700512 cmd: "$(location host_builtin_map.py) --builtins $(location builtins.cpp) --check_builtins $(location check_builtins.cpp) > $(out)",
Tom Cherryde6bd502018-02-13 16:50:08 -0800513}
514
515cc_binary {
516 name: "host_init_verifier",
517 host_supported: true,
Tom Cherryde6bd502018-02-13 16:50:08 -0800518 cflags: [
519 "-Wall",
520 "-Wextra",
521 "-Wno-unused-parameter",
522 "-Werror",
523 ],
524 static_libs: [
525 "libbase",
526 "libselinux",
Tom Cherryb5f2ec02019-11-08 17:54:27 -0800527 "libpropertyinfoserializer",
528 "libpropertyinfoparser",
Tom Cherryde6bd502018-02-13 16:50:08 -0800529 ],
530 whole_static_libs: ["libcap"],
531 shared_libs: [
Tom Cherryde6bd502018-02-13 16:50:08 -0800532 "libcutils",
Daniel Norman3f42a762019-07-09 11:00:53 -0700533 "libhidl-gen-utils",
Steven Moreland422a7582019-10-15 14:53:19 -0700534 "libhidlmetadata",
Daniel Norman3f42a762019-07-09 11:00:53 -0700535 "liblog",
536 "libprocessgroup",
537 "libprotobuf-cpp-lite",
Tom Cherryde6bd502018-02-13 16:50:08 -0800538 ],
Tom Cherry66196492020-02-06 11:56:58 -0800539 srcs: init_common_sources + init_host_sources,
Tom Cherryde6bd502018-02-13 16:50:08 -0800540 proto: {
541 type: "lite",
542 },
Yifan Hong3c4aa112018-06-20 22:49:48 +0000543 generated_headers: [
544 "generated_stub_builtin_function_map",
Daniel Norman8082ba22019-07-23 10:26:15 -0700545 "generated_android_ids",
Yifan Hong3c4aa112018-06-20 22:49:48 +0000546 ],
Tom Cherry96ff0fe2018-02-28 17:20:27 -0800547 target: {
Tom Cherry547f7312018-02-28 21:40:46 -0800548 android: {
549 enabled: false,
550 },
Tom Cherry96ff0fe2018-02-28 17:20:27 -0800551 darwin: {
Yifan Hong3c4aa112018-06-20 22:49:48 +0000552 enabled: false,
Tom Cherry96ff0fe2018-02-28 17:20:27 -0800553 },
554 },
Tom Cherryde6bd502018-02-13 16:50:08 -0800555}
Suren Baghdasaryan642048d2021-06-15 12:28:24 -0700556
557sh_binary {
558 name: "extra_free_kbytes.sh",
559 src: "extra_free_kbytes.sh",
560}