blob: 4ad1cabcab8b28f5809bf02c57bd705dc5ca6675 [file] [log] [blame]
Bob Badourd7d85312022-04-20 19:40:47 -07001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
TeYuan Wang708a1df2022-03-28 20:26:06 +08005soong_config_module_type {
6 name: "thermal_hal_feature_cc_defaults",
7 module_type: "cc_defaults",
8 config_namespace: "thermal_hal_feature",
9 variables: ["pid"],
10 properties: ["cflags", "srcs"],
Bob Badour361af062022-01-25 13:11:59 -080011}
12
TeYuan Wang708a1df2022-03-28 20:26:06 +080013soong_config_string_variable {
14 name: "pid",
15 values: ["apply_1_0", "apply_2_0"],
16}
17
18thermal_hal_feature_cc_defaults {
19 name: "thermal_hal_feature_defaults",
20 soong_config_variables: {
21 pid: {
22 apply_1_0: {
23 srcs: [
TeYuan Wangd2920b92022-05-25 15:40:20 +080024 "pid_1_0/service.cpp",
25 "pid_1_0/Thermal.cpp",
26 "pid_1_0/thermal-helper.cpp",
TeYuan Wang708a1df2022-03-28 20:26:06 +080027 "pid_1_0/utils/thermal_throttling.cpp",
TeYuan Wangd2920b92022-05-25 15:40:20 +080028 "pid_1_0/utils/thermal_info.cpp",
29 "pid_1_0/utils/thermal_files.cpp",
30 "pid_1_0/utils/power_files.cpp",
31 "pid_1_0/utils/powerhal_helper.cpp",
32 "pid_1_0/utils/thermal_watcher.cpp",
TeYuan Wang708a1df2022-03-28 20:26:06 +080033 ],
34 },
35 apply_2_0: {
36 srcs: [
TeYuan Wangd2920b92022-05-25 15:40:20 +080037 "service.cpp",
38 "Thermal.cpp",
39 "thermal-helper.cpp",
TeYuan Wang708a1df2022-03-28 20:26:06 +080040 "utils/thermal_throttling.cpp",
TeYuan Wangd2920b92022-05-25 15:40:20 +080041 "utils/thermal_info.cpp",
42 "utils/thermal_files.cpp",
43 "utils/power_files.cpp",
44 "utils/powerhal_helper.cpp",
45 "utils/thermal_watcher.cpp",
TeYuan Wang708a1df2022-03-28 20:26:06 +080046 ],
47 },
48 },
49 },
Bob Badour0c82fe12021-03-11 17:38:34 -080050}
51
Wei Wang086a2b22018-10-22 13:54:33 -070052cc_binary {
53 name: "android.hardware.thermal@2.0-service.pixel",
54 defaults: [
55 "hidl_defaults",
TeYuan Wang708a1df2022-03-28 20:26:06 +080056 "thermal_hal_feature_defaults",
Wei Wang086a2b22018-10-22 13:54:33 -070057 ],
58 vendor: true,
59 relative_install_path: "hw",
60 vintf_fragments: ["android.hardware.thermal@2.0-service.pixel.xml"],
61 init_rc: [
62 "android.hardware.thermal@2.0-service.pixel.rc",
63 ],
Wei Wang086a2b22018-10-22 13:54:33 -070064 shared_libs: [
65 "libbase",
TeYuan Wang2f5b7f62019-01-07 13:39:21 +080066 "libcutils",
Wei Wang086a2b22018-10-22 13:54:33 -070067 "libhidlbase",
Inseob Kim75a7c112019-09-11 14:14:42 +090068 "libjsoncpp",
Wei Wang086a2b22018-10-22 13:54:33 -070069 "libutils",
davidchaod9a195e2020-10-26 19:41:29 +080070 "libnl",
Kyle Lin7c8556b2020-08-07 17:02:55 +080071 "libbinder_ndk",
Wei Wang086a2b22018-10-22 13:54:33 -070072 "android.hardware.thermal@1.0",
73 "android.hardware.thermal@2.0",
Jiyong Park78901b92021-08-30 15:29:07 +090074 "android.hardware.power-V1-ndk",
75 "pixel-power-ext-V1-ndk"
Wei Wang086a2b22018-10-22 13:54:33 -070076 ],
77 cflags: [
78 "-Wall",
79 "-Werror",
Wei Wangbe444752019-02-01 15:12:28 -080080 "-Wextra",
81 "-Wunused",
Wei Wang086a2b22018-10-22 13:54:33 -070082 ],
Wei Wang1c473562018-10-23 21:14:06 -070083 tidy: true,
84 tidy_checks: [
85 "android-*",
86 "cert-*",
87 "clang-analyzer-security*",
88 ],
89 tidy_flags: [
Wei Wangf1513822019-11-20 12:00:21 -080090 "-warnings-as-errors=android-*,clang-analyzer-security*,cert-*"
91 ],
92}
93
94sh_binary {
95 name: "thermal_logd",
96 src: "init.thermal.logging.sh",
97 vendor: true,
98 init_rc: [
99 "pixel-thermal-logd.rc",
Wei Wang1c473562018-10-23 21:14:06 -0700100 ],
Wei Wang086a2b22018-10-22 13:54:33 -0700101}
TeYuan Wang753d11a2020-05-05 20:00:07 +0800102
103sh_binary {
104 name: "thermal_symlinks",
105 src: "init.thermal.symlinks.sh",
106 vendor: true,
107 init_rc: [
108 "pixel-thermal-symlinks.rc",
109 ],
110}