mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
Due to camera legacy, the camera uapi kernel headers installation routines need to be updated to consider the camera legacy support. This commit fixes the routines to install kernel headers for 'make headers_install' and also 'qti_generate_kernel_headers_arm' and 'qti_generate_kernel_headers_arm64'. Change-Id: Iec98dad164d5efc0acaa8f90c29a9672efbe3142 Reviewed-on: https://gerrit.mot.com/2619497 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Rafael Ortolan <rafones@motorola.com> Reviewed-by: Rav(CR) Vembu <raviv@motorola.com> Submit-Approved: Jira Key
148 lines
6.5 KiB
Text
148 lines
6.5 KiB
Text
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,
|
|
}
|