This repository has been archived by the owner on Oct 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Androidbp
148 lines (139 loc) · 6.54 KB
/
Androidbp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
cc_binary_host {
name: "unifdef",
srcs: ["scripts/unifdef.c"],
sanitize: {
never: true,
},
}
genrule {
name: "gen-headers_install.sh",
srcs: ["scripts/headers_install.sh"],
out: ["headers_install.sh"],
// (Ie3b8c36b7d60bd950c28bac566e04f43de78cf98,b/178500203)
cmd: "sed 's+scripts/unifdef+$$LOC_UNIFDEF+g' $(in) > $(out)",
}
cc_prebuilt_binary {
name: "headers_install.sh",
device_supported: false,
host_supported: true,
srcs: [":gen-headers_install.sh"],
}
// Use the following for verbose output from kernel_headers.py.
// kernel_headers_verbose = "--verbose "
// Use the following for minimal output from kernel_headers.py.
kernel_headers_verbose = ""
build = ["gen_headers_arm.bp", "gen_headers_arm64.bp"]
soong_config_module_type {
name: "mmi_camera_legacy_genrule_defaults",
module_type: "genrule_defaults",
config_namespace: "mmi_camera_legacy",
variables: ["board_config_camera_legacy_kernel"],
properties: ["cmd"],
}
soong_config_string_variable {
name: "board_config_camera_legacy_kernel",
values: ["enabled", "disabled"],
}
mmi_camera_legacy_genrule_defaults {
name: "mmi_kernel_headers_cmdrules_arm",
soong_config_variables: {
board_config_camera_legacy_kernel: {
disabled: {
cmd: "python3 $(location kernel_headers.py) " +
kernel_headers_verbose +
"--header_arch arm " +
"--gen_dir $(genDir) " +
"--arch_asm_kbuild $(location arch/arm/include/uapi/asm/Kbuild) " +
"--arch_include_uapi $(locations arch/arm/include/uapi/**/*.h) " +
"--techpack_include_uapi $(locations techpack/*/include/uapi/*/**/*.h) " +
"--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild) " +
"headers " +
"--old_gen_headers_bp $(location gen_headers_arm.bp) " +
"--new_gen_headers_bp $(location :qti_generate_gen_headers_arm) " +
"--version_makefile $(location Makefile) " +
"--arch_syscall_tool $(location arch/arm/tools/syscallhdr.sh) " +
"--arch_syscall_tbl $(location arch/arm/tools/syscall.tbl) " +
"--headers_install $(location headers_install.sh) " +
"--unifdef $(location unifdef) " +
"--include_uapi $(locations include/uapi/**/*.h)",
},
enabled: {
cmd: "python3 $(location kernel_headers.py) " +
kernel_headers_verbose +
"--header_arch arm " +
"--gen_dir $(genDir) " +
"--arch_asm_kbuild $(location arch/arm/include/uapi/asm/Kbuild) " +
"--arch_include_uapi $(locations arch/arm/include/uapi/**/*.h) " +
"--techpack_include_uapi $(locations techpack/*/include/uapi/*/**/*.h) " +
"--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild) " +
"headers " +
"--old_gen_headers_bp $(location gen_headers_arm.bp) " +
"--new_gen_headers_bp $(location :qti_generate_gen_headers_arm) " +
"--version_makefile $(location Makefile) " +
"--arch_syscall_tool $(location arch/arm/tools/syscallhdr.sh) " +
"--arch_syscall_tbl $(location arch/arm/tools/syscall.tbl) " +
"--headers_install $(location headers_install.sh) " +
"--unifdef $(location unifdef) " +
"--include_uapi $(locations include/uapi/**/*.h) " +
"--camera_legacy ",
},
},
},
}
mmi_camera_legacy_genrule_defaults {
name: "mmi_kernel_headers_cmdrules_arm64",
soong_config_variables: {
board_config_camera_legacy_kernel: {
disabled: {
cmd: "python3 $(location kernel_headers.py) " +
kernel_headers_verbose +
"--header_arch arm64 " +
"--gen_dir $(genDir) " +
"--arch_asm_kbuild $(location arch/arm64/include/uapi/asm/Kbuild) " +
"--arch_include_uapi $(locations arch/arm64/include/uapi/**/*.h) " +
"--techpack_include_uapi $(locations techpack/*/include/uapi/*/**/*.h) " +
"--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild) " +
"headers " +
"--old_gen_headers_bp $(location gen_headers_arm64.bp) " +
"--new_gen_headers_bp $(location :qti_generate_gen_headers_arm64) " +
"--version_makefile $(location Makefile) " +
"--headers_install $(location headers_install.sh) " +
"--unifdef $(location unifdef) " +
"--include_uapi $(locations include/uapi/**/*.h)",
},
enabled: {
cmd: "python3 $(location kernel_headers.py) " +
kernel_headers_verbose +
"--header_arch arm64 " +
"--gen_dir $(genDir) " +
"--arch_asm_kbuild $(location arch/arm64/include/uapi/asm/Kbuild) " +
"--arch_include_uapi $(locations arch/arm64/include/uapi/**/*.h) " +
"--techpack_include_uapi $(locations techpack/*/include/uapi/*/**/*.h) " +
"--asm_generic_kbuild $(location include/uapi/asm-generic/Kbuild) " +
"headers " +
"--old_gen_headers_bp $(location gen_headers_arm64.bp) " +
"--new_gen_headers_bp $(location :qti_generate_gen_headers_arm64) " +
"--version_makefile $(location Makefile) " +
"--headers_install $(location headers_install.sh) " +
"--unifdef $(location unifdef) " +
"--include_uapi $(locations include/uapi/**/*.h) " +
"--camera_legacy ",
},
},
},
}
cc_library_headers {
name: "qti_kernel_headers",
arch: {
arm: {
generated_headers: ["qti_generate_kernel_headers_arm"],
export_generated_headers: ["qti_generate_kernel_headers_arm"],
},
arm64: {
generated_headers: ["qti_generate_kernel_headers_arm64"],
export_generated_headers: ["qti_generate_kernel_headers_arm64"],
},
},
vendor: true,
recovery_available: true,
}