Add camera legacy support by checking BOARD_CONFIG_CAMERA_KERNEL_NAME to decide which folder will be used to compile the camera techpack. Also, due to camera legacy, the camera uapi kernel headers installation routines need to be updated to consider the camera legacy support. This commit also 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: I845c5cb49c388bc15eba2fbf0ed0724e93de5192 Reviewed-on: https://gerrit.mot.com/2632695 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Rafael Ortolan <rafones@motorola.com> Reviewed-by: Rav(CR) Vembu <raviv@motorola.com> Reviewed-by: Miguel Nicodemus <miguelh@motorola.com> Tested-by: Jira Key Submit-Approved: Jira Key
149 lines
6.6 KiB
Plaintext
149 lines
6.6 KiB
Plaintext
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.asm) " +
|
|
"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.asm) " +
|
|
"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.asm) " +
|
|
"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.asm) " +
|
|
"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,
|
|
}
|