blob: 19333a9e2e2cfedfdf072396dd53cfecfcd22e5d [file] [log] [blame]
Pig02f678a2020-10-15 02:58:37 +08001// Bliss soong configs
2
Simon Shields4ed46052017-08-23 12:03:36 +10003bootstrap_go_package {
Jackeagled6811aa2019-09-24 08:26:40 +02004 name: "soong-bliss-generator",
5 pkgPath: "bliss/soong/generator",
Sam Mortimer80381b72018-09-18 15:56:14 -07006 deps: [
7 "blueprint",
8 "blueprint-pathtools",
9 "soong",
10 "soong-android",
11 "soong-shared",
12 ],
13 srcs: [
14 "generator/generator.go",
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070015 "generator/variables.go",
Sam Mortimer80381b72018-09-18 15:56:14 -070016 ],
17 pluginFor: ["soong_build"],
18}
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070019
Jackeagled6811aa2019-09-24 08:26:40 +020020bliss_generator {
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070021 name: "generated_kernel_includes",
22
23 // The headers make command
Rashed Abdel-Tawabba5ea352019-09-07 17:01:13 -070024 cmd: "$(PATH_OVERRIDE_SOONG) $(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070025
26 // Directories that can be imported by a cc_* module generated_headers property
dianlujitao9dfd5f72020-03-03 17:26:32 +080027 export_include_dirs: [
dianlujitao83d2fa42020-06-28 22:16:44 +080028 "usr/audio/include/uapi",
dianlujitao9dfd5f72020-03-03 17:26:32 +080029 "usr/include",
30 "usr/include/audio/include/uapi",
Pigf6e0a852020-10-15 02:58:37 +080031 "usr/techpack/audio/include",
dianlujitao9dfd5f72020-03-03 17:26:32 +080032 ],
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070033
34 // Sources for dependency tracking
35 dep_root: "$(TARGET_KERNEL_SOURCE)",
Pigf6e0a852020-10-15 02:58:37 +080036 dep_files: [
37 "Makefile",
38 "include/**/*",
39 "arch/$(KERNEL_ARCH)/include/**/*",
40 "techpack/audio/include/**/*",
41 ],
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070042}
43
44cc_library_headers {
45 name: "generated_kernel_headers",
46 generated_headers: ["generated_kernel_includes"],
47 export_generated_headers: ["generated_kernel_includes"],
48 vendor_available: true,
LuK133743442c22019-09-09 21:58:19 +020049 recovery_available: true,
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070050}
Pig02f678a2020-10-15 02:58:37 +080051
52// Target platform agnostic config modules
53soong_config_module_type {
Arne Coucherona31f8f92020-11-07 00:46:10 +010054 name: "disable_postrender_cleanup",
55 module_type: "cc_defaults",
56 config_namespace: "blissGlobalVars",
57 bool_variables: ["disable_postrender_cleanup"],
58 properties: ["cppflags"],
59}
60
61disable_postrender_cleanup {
62 name: "disable_postrender_cleanup_defaults",
63 soong_config_variables: {
64 disable_postrender_cleanup: {
65 cppflags: ["-DDISABLE_POSTRENDER_CLEANUP"],
66 },
67 },
68}
69
70soong_config_module_type {
Pig02f678a2020-10-15 02:58:37 +080071 name: "gralloc_10_usage_bits",
72 module_type: "cc_defaults",
73 config_namespace: "blissGlobalVars",
74 value_variables: ["additional_gralloc_10_usage_bits"],
75 properties: ["cppflags"],
76}
77
78gralloc_10_usage_bits {
79 name: "gralloc_10_usage_bits_defaults",
80 soong_config_variables: {
81 additional_gralloc_10_usage_bits: {
82 cppflags: ["-DADDNL_GRALLOC_10_USAGE_BITS=%s"],
83 },
84 },
85}
86
87soong_config_module_type {
88 name: "target_process_sdk_version_overrides",
89 module_type: "cc_defaults",
90 config_namespace: "blissGlobalVars",
91 value_variables: ["target_process_sdk_version_override"],
92 properties: ["cppflags"],
93}
94
95target_process_sdk_version_overrides {
96 name: "process_sdk_version_overrides_defaults",
97 soong_config_variables: {
98 target_process_sdk_version_override: {
99 cppflags: ["-DSDK_VERSION_OVERRIDES=\"%s\""],
100 },
101 },
102}
103
104soong_config_module_type {
105 name: "target_shim_libs",
106 module_type: "cc_defaults",
107 config_namespace: "blissGlobalVars",
108 value_variables: ["target_ld_shim_libs"],
109 properties: ["cppflags"],
110}
111
112target_shim_libs {
113 name: "shim_libs_defaults",
114 soong_config_variables: {
115 target_ld_shim_libs: {
116 cppflags: ["-DLD_SHIM_LIBS=\"%s\""],
117 },
118 },
119}
120
121soong_config_module_type {
122 name: "vendor_init",
123 module_type: "cc_defaults",
124 config_namespace: "blissGlobalVars",
125 value_variables: ["target_init_vendor_lib"],
126 properties: ["whole_static_libs"],
127}
128
129vendor_init {
130 name: "vendor_init_defaults",
131 soong_config_variables: {
132 target_init_vendor_lib: {
133 whole_static_libs: ["%s"],
134 },
135 },
136}
137
138soong_config_module_type {
139 name: "surfaceflinger_fod_lib",
140 module_type: "cc_defaults",
141 config_namespace: "blissGlobalVars",
142 value_variables: ["target_surfaceflinger_fod_lib"],
143 properties: [
144 "cppflags",
145 "whole_static_libs",
146 ],
147}
148
149surfaceflinger_fod_lib {
150 name: "surfaceflinger_fod_lib_defaults",
151 soong_config_variables: {
152 target_surfaceflinger_fod_lib: {
153 cppflags: ["-DTARGET_PROVIDES_FOD_LIB"],
154 whole_static_libs: ["%s"],
155 },
156 },
157}
158
159soong_config_module_type {
160 name: "ignores_ftp_pptp_conntrack_failure_defaults",
161 module_type: "cc_defaults",
162 config_namespace: "blissGlobalVars",
163 bool_variables: ["ignores_ftp_pptp_conntrack_failure"],
164 properties: ["cppflags"],
165}
166
167ignores_ftp_pptp_conntrack_failure_defaults {
168 name: "ignores_ftp_pptp_conntrack_failure",
169 soong_config_variables: {
170 ignores_ftp_pptp_conntrack_failure: {
Aayush Gupta3f8f66c2020-10-21 16:29:53 +0530171 cppflags: ["-DIGNORES_FTP_PPTP_CONNTRACK_FAILURE"],
Pig02f678a2020-10-15 02:58:37 +0800172 },
173 },
174}
175
176soong_config_module_type {
177 name: "needs_netd_direct_connect_rule",
178 module_type: "cc_defaults",
179 config_namespace: "blissGlobalVars",
180 bool_variables: ["needs_netd_direct_connect_rule"],
181 properties: ["cppflags"],
182}
183
184needs_netd_direct_connect_rule {
185 name: "needs_netd_direct_connect_rule_defaults",
186 soong_config_variables: {
187 needs_netd_direct_connect_rule: {
188 cppflags: ["-DNEEDS_NETD_DIRECT_CONNECT_RULE"],
189 },
190 },
191}
192
193soong_config_module_type {
194 name: "no_cameraserver",
195 module_type: "cc_defaults",
196 config_namespace: "blissGlobalVars",
197 bool_variables: ["has_legacy_camera_hal1"],
198 properties: [
199 "cppflags",
200 ],
201}
202
203no_cameraserver {
204 name: "no_cameraserver_defaults",
205 soong_config_variables: {
206 has_legacy_camera_hal1: {
207 cppflags: [
208 "-DNO_CAMERA_SERVER",
209 "-Wno-overloaded-virtual",
210 ],
211 },
212 },
213}
214
215soong_config_module_type {
216 name: "camera_in_mediaserver",
217 module_type: "cc_defaults",
218 config_namespace: "blissGlobalVars",
219 bool_variables: ["has_legacy_camera_hal1"],
220 properties: [
221 "overrides",
222 "shared_libs",
223 ],
224}
225
226camera_in_mediaserver {
227 name: "camera_in_mediaserver_defaults",
228 defaults: ["no_cameraserver_defaults"],
229 soong_config_variables: {
230 has_legacy_camera_hal1: {
231 overrides: ["cameraserver"],
232 shared_libs: [
233 "android.hardware.camera.common@1.0",
234 "android.hardware.camera.device@3.4",
235 "android.hardware.camera.provider@2.6",
236 "libcameraservice",
237 "libgui",
238 ],
239 },
240 },
241}
242
243soong_config_module_type {
244 name: "bootloader_message_offset",
245 module_type: "cc_defaults",
246 config_namespace: "blissGlobalVars",
247 value_variables: ["bootloader_message_offset"],
Alessandro Astonebe38c0a2020-10-01 13:01:36 +0200248 properties: [
249 "cflags",
250 "export_cflags",
251 ],
Pig02f678a2020-10-15 02:58:37 +0800252}
253
254bootloader_message_offset {
255 name: "bootloader_message_offset_defaults",
256 soong_config_variables: {
257 bootloader_message_offset: {
258 cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
Alessandro Astonebe38c0a2020-10-01 13:01:36 +0200259 export_cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
Pig02f678a2020-10-15 02:58:37 +0800260 },
261 },
262}
263
264soong_config_module_type {
265 name: "camera_parameter_library",
266 module_type: "cc_defaults",
267 config_namespace: "blissGlobalVars",
268 value_variables: ["uses_camera_parameter_lib"],
269 properties: ["whole_static_libs"],
270}
271
272camera_parameter_library {
273 name: "camera_parameter_library_defaults",
274 soong_config_variables: {
275 uses_camera_parameter_lib: {
276 whole_static_libs: ["%s"],
277 },
278 },
279}
280
281// NVIDIA specific config modules
282soong_config_module_type {
283 name: "nvidia_enhancements",
284 module_type: "cc_defaults",
285 config_namespace: "blissNvidiaVars",
286 bool_variables: ["uses_nvidia_enhancements"],
287 properties: ["cppflags"],
288}
289
290nvidia_enhancements {
291 name: "nvidia_enhancements_defaults",
292 soong_config_variables: {
293 uses_nvidia_enhancements: {
294 cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"],
295 },
296 },
297}
298
299// QCOM specific config modules
300soong_config_module_type {
301 name: "librmnetctl_pre_uplink",
302 module_type: "cc_defaults",
303 config_namespace: "blissQcomVars",
304 bool_variables: ["uses_pre_uplink_features_netmgrd"],
305 properties: ["cflags"],
306}
307
308librmnetctl_pre_uplink {
309 name: "librmnetctl_pre_uplink_defaults",
310 soong_config_variables: {
311 uses_pre_uplink_features_netmgrd: {
312 cflags: ["-DNO_UPLINK_FEATURES"],
313 },
314 },
315}
316
317soong_config_module_type {
318 name: "qti_camera_device",
319 module_type: "cc_defaults",
320 config_namespace: "blissQcomVars",
321 bool_variables: ["uses_qti_camera_device"],
322 properties: [
323 "cppflags",
324 "shared_libs",
325 ],
326}
327
328qti_camera_device {
329 name: "qti_camera_device_defaults",
330 soong_config_variables: {
331 uses_qti_camera_device: {
332 cppflags: ["-DQTI_CAMERA_DEVICE"],
333 shared_libs: ["vendor.qti.hardware.camera.device@1.0"],
334 },
335 },
336}
337
338soong_config_module_type {
339 name: "extended_compress_format",
340 module_type: "cc_defaults",
341 config_namespace: "blissQcomVars",
342 bool_variables: ["supports_extended_compress_format"],
343 properties: ["cflags"],
344}
345
346extended_compress_format {
347 name: "extended_compress_format_defaults",
348 soong_config_variables: {
349 supports_extended_compress_format: {
350 cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"],
351 },
352 },
353}
354
355soong_config_module_type {
356 name: "vold_hw_fde",
357 module_type: "cc_defaults",
358 config_namespace: "blissQcomVars",
359 bool_variables: ["supports_hw_fde"],
360 properties: [
361 "cflags",
362 "header_libs",
363 "shared_libs",
364 ],
365}
366
367vold_hw_fde {
368 name: "vold_hw_fde_defaults",
369 soong_config_variables: {
370 supports_hw_fde: {
371 cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"],
372 header_libs: ["libcryptfs_hw_headers"],
373 shared_libs: ["libcryptfs_hw"],
374 },
375 },
376}
377
378soong_config_module_type {
379 name: "vold_hw_fde_perf",
380 module_type: "cc_defaults",
381 config_namespace: "blissQcomVars",
382 bool_variables: ["supports_hw_fde_perf"],
383 properties: [
384 "cflags",
385 "shared_libs",
386 ],
387}
388
389vold_hw_fde_perf {
390 name: "vold_hw_fde_perf_defaults",
391 soong_config_variables: {
392 supports_hw_fde_perf: {
393 cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"],
394 shared_libs: ["libcryptfs_hw"],
395 },
396 },
397}
398
399soong_config_module_type {
400 name: "qti_cryptfshw_qsee",
401 module_type: "cc_defaults",
402 config_namespace: "blissQcomVars",
403 bool_variables: ["should_wait_for_qsee"],
404 properties: ["cflags"],
405}
406
407qti_cryptfshw_qsee {
408 name: "qti_cryptfshw_qsee_defaults",
409 soong_config_variables: {
410 should_wait_for_qsee: {
411 cflags: ["-DWAIT_FOR_QSEE"],
412 },
413 },
414}
415
416soong_config_module_type {
417 name: "surfaceflinger_qcom_extensions",
418 module_type: "cc_defaults",
419 config_namespace: "blissQcomVars",
420 value_variables: ["qcom_soong_namespace"],
421 properties: [
422 "cppflags",
423 "header_libs",
424 ],
425}
426
427surfaceflinger_qcom_extensions {
428 name: "surfaceflinger_qcom_ext_defaults",
429 soong_config_variables: {
430 qcom_soong_namespace: {
431 cppflags: ["-DQCOM_UM_FAMILY"],
432 header_libs: ["//%s/display:display_intf_headers"],
433 },
434 },
435}
436
437soong_config_module_type {
438 name: "stagefright_qcom_legacy",
439 module_type: "cc_defaults",
440 config_namespace: "blissQcomVars",
441 bool_variables: ["uses_qcom_bsp_legacy"],
442 properties: ["cppflags"],
443}
444
445stagefright_qcom_legacy {
446 name: "stagefright_qcom_legacy_defaults",
447 soong_config_variables: {
448 uses_qcom_bsp_legacy: {
449 cppflags: ["-DQCOM_BSP_LEGACY"],
450 },
451 },
452}