blob: 521624c8889d85e7efd2834e1709337899f4729d [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 {
Nolen Johnson9020f282021-02-22 12:36:48 -0500194 name: "legacy_hw_disk_encryption",
195 module_type: "cc_defaults",
196 config_namespace: "blissQcomVars",
197 bool_variables: ["legacy_hw_disk_encryption"],
198 properties: ["cppflags"],
199}
200
201legacy_hw_disk_encryption {
202 name: "legacy_hw_disk_encryption_defaults",
203 soong_config_variables: {
204 legacy_hw_disk_encryption: {
205 cppflags: ["-DLEGACY_HW_DISK_ENCRYPTION"],
206 },
207 },
208}
209
210soong_config_module_type {
Pig02f678a2020-10-15 02:58:37 +0800211 name: "no_cameraserver",
212 module_type: "cc_defaults",
213 config_namespace: "blissGlobalVars",
214 bool_variables: ["has_legacy_camera_hal1"],
215 properties: [
216 "cppflags",
217 ],
218}
219
220no_cameraserver {
221 name: "no_cameraserver_defaults",
222 soong_config_variables: {
223 has_legacy_camera_hal1: {
224 cppflags: [
225 "-DNO_CAMERA_SERVER",
226 "-Wno-overloaded-virtual",
227 ],
228 },
229 },
230}
231
232soong_config_module_type {
233 name: "camera_in_mediaserver",
234 module_type: "cc_defaults",
235 config_namespace: "blissGlobalVars",
236 bool_variables: ["has_legacy_camera_hal1"],
237 properties: [
238 "overrides",
239 "shared_libs",
240 ],
241}
242
243camera_in_mediaserver {
244 name: "camera_in_mediaserver_defaults",
245 defaults: ["no_cameraserver_defaults"],
246 soong_config_variables: {
247 has_legacy_camera_hal1: {
248 overrides: ["cameraserver"],
249 shared_libs: [
250 "android.hardware.camera.common@1.0",
251 "android.hardware.camera.device@3.4",
252 "android.hardware.camera.provider@2.6",
253 "libcameraservice",
254 "libgui",
255 ],
256 },
257 },
258}
259
260soong_config_module_type {
Jan Altensena61f9302020-10-17 18:10:26 +0200261 name: "has_memfd_backport",
262 module_type: "cc_defaults",
263 config_namespace: "blissGlobalVars",
264 bool_variables: ["has_memfd_backport"],
265 properties: ["cppflags"],
266}
267
268has_memfd_backport {
269 name: "has_memfd_backport_defaults",
270 soong_config_variables: {
271 has_memfd_backport: {
272 cppflags: ["-DHAS_MEMFD_BACKPORT"],
273 },
274 },
275}
276
277soong_config_module_type {
Pig02f678a2020-10-15 02:58:37 +0800278 name: "bootloader_message_offset",
279 module_type: "cc_defaults",
280 config_namespace: "blissGlobalVars",
281 value_variables: ["bootloader_message_offset"],
Alessandro Astonebe38c0a2020-10-01 13:01:36 +0200282 properties: [
283 "cflags",
284 "export_cflags",
285 ],
Pig02f678a2020-10-15 02:58:37 +0800286}
287
288bootloader_message_offset {
289 name: "bootloader_message_offset_defaults",
290 soong_config_variables: {
291 bootloader_message_offset: {
292 cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
Alessandro Astonebe38c0a2020-10-01 13:01:36 +0200293 export_cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
Pig02f678a2020-10-15 02:58:37 +0800294 },
295 },
296}
297
298soong_config_module_type {
299 name: "camera_parameter_library",
300 module_type: "cc_defaults",
301 config_namespace: "blissGlobalVars",
302 value_variables: ["uses_camera_parameter_lib"],
303 properties: ["whole_static_libs"],
304}
305
306camera_parameter_library {
307 name: "camera_parameter_library_defaults",
308 soong_config_variables: {
309 uses_camera_parameter_lib: {
310 whole_static_libs: ["%s"],
311 },
312 },
313}
314
315// NVIDIA specific config modules
316soong_config_module_type {
317 name: "nvidia_enhancements",
318 module_type: "cc_defaults",
319 config_namespace: "blissNvidiaVars",
320 bool_variables: ["uses_nvidia_enhancements"],
321 properties: ["cppflags"],
322}
323
324nvidia_enhancements {
325 name: "nvidia_enhancements_defaults",
326 soong_config_variables: {
327 uses_nvidia_enhancements: {
328 cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"],
329 },
330 },
331}
332
333// QCOM specific config modules
334soong_config_module_type {
335 name: "librmnetctl_pre_uplink",
336 module_type: "cc_defaults",
337 config_namespace: "blissQcomVars",
338 bool_variables: ["uses_pre_uplink_features_netmgrd"],
339 properties: ["cflags"],
340}
341
342librmnetctl_pre_uplink {
343 name: "librmnetctl_pre_uplink_defaults",
344 soong_config_variables: {
345 uses_pre_uplink_features_netmgrd: {
346 cflags: ["-DNO_UPLINK_FEATURES"],
347 },
348 },
349}
350
351soong_config_module_type {
352 name: "qti_camera_device",
353 module_type: "cc_defaults",
354 config_namespace: "blissQcomVars",
355 bool_variables: ["uses_qti_camera_device"],
356 properties: [
357 "cppflags",
358 "shared_libs",
359 ],
360}
361
362qti_camera_device {
363 name: "qti_camera_device_defaults",
364 soong_config_variables: {
365 uses_qti_camera_device: {
366 cppflags: ["-DQTI_CAMERA_DEVICE"],
367 shared_libs: ["vendor.qti.hardware.camera.device@1.0"],
368 },
369 },
370}
371
372soong_config_module_type {
LuK1337e7aff482021-04-10 10:56:15 +0200373 name: "qti_usb_hal_supported_modes",
374 module_type: "cc_defaults",
375 config_namespace: "blissQcomVars",
376 bool_variables: ["supports_audio_accessory", "supports_debug_accessory"],
377 properties: [
378 "cppflags",
379 ],
380}
381
382qti_usb_hal_supported_modes {
383 name: "qti_usb_hal_supported_modes_defaults",
384 soong_config_variables: {
385 supports_audio_accessory: {
386 cppflags: ["-DSUPPORTS_AUDIO_ACCESSORY"],
387 },
388 supports_debug_accessory: {
389 cppflags: ["-DSUPPORTS_DEBUG_ACCESSORY"],
390 },
391 },
392}
393
394soong_config_module_type {
Pig02f678a2020-10-15 02:58:37 +0800395 name: "extended_compress_format",
396 module_type: "cc_defaults",
397 config_namespace: "blissQcomVars",
398 bool_variables: ["supports_extended_compress_format"],
399 properties: ["cflags"],
400}
401
402extended_compress_format {
403 name: "extended_compress_format_defaults",
404 soong_config_variables: {
405 supports_extended_compress_format: {
406 cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"],
407 },
408 },
409}
410
411soong_config_module_type {
412 name: "vold_hw_fde",
413 module_type: "cc_defaults",
414 config_namespace: "blissQcomVars",
415 bool_variables: ["supports_hw_fde"],
416 properties: [
417 "cflags",
418 "header_libs",
419 "shared_libs",
420 ],
421}
422
423vold_hw_fde {
424 name: "vold_hw_fde_defaults",
425 soong_config_variables: {
426 supports_hw_fde: {
427 cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"],
428 header_libs: ["libcryptfs_hw_headers"],
429 shared_libs: ["libcryptfs_hw"],
430 },
431 },
432}
433
434soong_config_module_type {
435 name: "vold_hw_fde_perf",
436 module_type: "cc_defaults",
437 config_namespace: "blissQcomVars",
438 bool_variables: ["supports_hw_fde_perf"],
439 properties: [
440 "cflags",
441 "shared_libs",
442 ],
443}
444
445vold_hw_fde_perf {
446 name: "vold_hw_fde_perf_defaults",
447 soong_config_variables: {
448 supports_hw_fde_perf: {
449 cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"],
450 shared_libs: ["libcryptfs_hw"],
451 },
452 },
453}
454
455soong_config_module_type {
456 name: "qti_cryptfshw_qsee",
457 module_type: "cc_defaults",
458 config_namespace: "blissQcomVars",
459 bool_variables: ["should_wait_for_qsee"],
460 properties: ["cflags"],
461}
462
463qti_cryptfshw_qsee {
464 name: "qti_cryptfshw_qsee_defaults",
465 soong_config_variables: {
466 should_wait_for_qsee: {
467 cflags: ["-DWAIT_FOR_QSEE"],
468 },
469 },
470}
471
472soong_config_module_type {
473 name: "surfaceflinger_qcom_extensions",
474 module_type: "cc_defaults",
475 config_namespace: "blissQcomVars",
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100476 value_variables: ["qcom_display_headers_namespace"],
Pig02f678a2020-10-15 02:58:37 +0800477 properties: [
478 "cppflags",
479 "header_libs",
480 ],
481}
482
483surfaceflinger_qcom_extensions {
484 name: "surfaceflinger_qcom_ext_defaults",
485 soong_config_variables: {
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100486 qcom_display_headers_namespace: {
Pig02f678a2020-10-15 02:58:37 +0800487 cppflags: ["-DQCOM_UM_FAMILY"],
Alessandro Astone3fc779e2021-01-05 18:04:14 +0100488 header_libs: ["//%s:display_intf_headers"],
Pig02f678a2020-10-15 02:58:37 +0800489 },
490 },
491}
492
493soong_config_module_type {
494 name: "stagefright_qcom_legacy",
495 module_type: "cc_defaults",
496 config_namespace: "blissQcomVars",
497 bool_variables: ["uses_qcom_bsp_legacy"],
498 properties: ["cppflags"],
499}
500
501stagefright_qcom_legacy {
502 name: "stagefright_qcom_legacy_defaults",
503 soong_config_variables: {
504 uses_qcom_bsp_legacy: {
505 cppflags: ["-DQCOM_BSP_LEGACY"],
506 },
507 },
508}