Revert "techpack: add camera legacy support"
This reverts commit 657b260037.
Change-Id: I2d0c1b83c70098a59702c41c2e56de98f67d6f31
This commit is contained in:
6 files changed
+36
-154
No files matched your search
@@ -28,109 +28,6 @@ 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: {
|
||||
|
||||
+17
-1
@@ -1035,6 +1035,22 @@ genrule {
|
||||
":qti_generate_gen_headers_arm",
|
||||
],
|
||||
exclude_srcs: gen_headers_exclude_srcs_arm,
|
||||
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)",
|
||||
out: ["linux/version.h"] + gen_headers_out_arm,
|
||||
defaults: ["mmi_kernel_headers_cmdrules_arm"],
|
||||
}
|
||||
+15
-1
@@ -1028,6 +1028,20 @@ genrule {
|
||||
":qti_generate_gen_headers_arm64",
|
||||
],
|
||||
exclude_srcs: gen_headers_exclude_srcs_arm64,
|
||||
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)",
|
||||
out: ["linux/version.h"] + gen_headers_out_arm64,
|
||||
defaults: ["mmi_kernel_headers_cmdrules_arm64"],
|
||||
}
|
||||
+2
-12
@@ -755,7 +755,7 @@ def gen_headers(
|
||||
verbose, header_arch, gen_dir, arch_asm_kbuild, asm_generic_kbuild, module_dir,
|
||||
old_gen_headers_bp, new_gen_headers_bp, version_makefile,
|
||||
arch_syscall_tool, arch_syscall_tbl, headers_install, unifdef, include_uapi,
|
||||
arch_include_uapi, techpack_include_uapi, camera_legacy):
|
||||
arch_include_uapi, techpack_include_uapi):
|
||||
"""Generate the kernel headers.
|
||||
|
||||
This script generates the version.h file, the arch-specific headers including
|
||||
@@ -814,11 +814,6 @@ def gen_headers(
|
||||
arch_uapi_include_prefix, h):
|
||||
error_count += 1
|
||||
|
||||
|
||||
if camera_legacy == True:
|
||||
legacy_product = os.getenv('TARGET_PRODUCT').split("_", 1)[0]
|
||||
techpack_include_uapi = [i.replace('techpack/camera','techpack/camera-legacy/' + legacy_product) for i in techpack_include_uapi]
|
||||
|
||||
for h in techpack_include_uapi:
|
||||
techpack_uapi_include_prefix = os.path.join(h.split('/include/uapi')[0], 'include', 'uapi') + os.sep
|
||||
if not run_headers_install(
|
||||
@@ -958,11 +953,6 @@ def main():
|
||||
required=True,
|
||||
nargs='*',
|
||||
help='The list of include/uapi header files.')
|
||||
parser_headers.add_argument(
|
||||
'--camera_legacy',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='If set, define the camera legacy folder being used. By default, it\'s disabled.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -1013,7 +1003,7 @@ def main():
|
||||
args.asm_generic_kbuild, module_dir, args.old_gen_headers_bp, args.new_gen_headers_bp,
|
||||
args.version_makefile, args.arch_syscall_tool, args.arch_syscall_tbl,
|
||||
args.headers_install, args.unifdef, args.include_uapi, args.arch_include_uapi,
|
||||
args.techpack_include_uapi, args.camera_legacy)
|
||||
args.techpack_include_uapi)
|
||||
|
||||
print('error: unknown mode: %s' % args.mode)
|
||||
return 1
|
||||
|
||||
@@ -35,29 +35,13 @@ $(subdirs):
|
||||
# We have only sub-directories there.
|
||||
skip-inst := $(if $(filter %/uapi,$(obj)),1)
|
||||
|
||||
ifeq ($(skip-inst),)
|
||||
ifeq ($(BOARD_CONFIG_CAMERA_KERNEL_NAME),)
|
||||
skip-inst := $(if $(filter legacy,$(obj)),1)
|
||||
else
|
||||
ifneq (, $(findstring camera, $(obj)))
|
||||
ifeq (, $(findstring $(BOARD_CONFIG_CAMERA_KERNEL_NAME), $(obj)))
|
||||
skip-inst := 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(skip-inst),)
|
||||
|
||||
# Kbuild file is optional
|
||||
kbuild-file := $(srctree)/$(obj)/Kbuild
|
||||
-include $(kbuild-file)
|
||||
|
||||
ifeq (, $(findstring $(BOARD_CONFIG_CAMERA_KERNEL_NAME), $(obj)))
|
||||
installdir := $(INSTALL_HDR_PATH)/$(dst)
|
||||
else
|
||||
installdir := $(INSTALL_HDR_PATH)/$(subst camera-legacy/$(BOARD_CONFIG_CAMERA_KERNEL_NAME),camera,$(dst))
|
||||
endif
|
||||
gendir := $(objtree)/$(subst include/,include/generated/,$(obj))
|
||||
header-files := $(notdir $(wildcard $(srcdir)/*.h))
|
||||
header-files += $(notdir $(wildcard $(srcdir)/*.agh))
|
||||
|
||||
+2
-21
@@ -1,27 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
TECHPACK?=y
|
||||
|
||||
ifeq ($(BOARD_CONFIG_CAMERA_KERNEL_NAME),)
|
||||
$(info "using default camera path")
|
||||
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*"\
|
||||
| grep -v legacy)
|
||||
else
|
||||
$(info "using camera-legacy/$(BOARD_CONFIG_CAMERA_KERNEL_NAME)")
|
||||
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*"\
|
||||
| grep -v camera)
|
||||
techpack-dirs += $(shell find $(srctree)/techpack -maxdepth 2 -mindepth 2 -name "$(BOARD_CONFIG_CAMERA_KERNEL_NAME)")
|
||||
endif
|
||||
techpack-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*")
|
||||
obj-${TECHPACK} += stub/ $(addsuffix /,$(subst $(srctree)/techpack/,,$(techpack-dirs)))
|
||||
|
||||
ifeq ($(BOARD_CONFIG_CAMERA_KERNEL_NAME),)
|
||||
$(info "using default camera path")
|
||||
techpack-header-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*"\
|
||||
| grep -v legacy)
|
||||
else
|
||||
$(info "using camera-legacy/$(BOARD_CONFIG_CAMERA_KERNEL_NAME)")
|
||||
techpack-header-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*"\
|
||||
| grep -v camera)
|
||||
techpack-header-dirs += $(shell find $(srctree)/techpack -maxdepth 2 -mindepth 2 -name "$(BOARD_CONFIG_CAMERA_KERNEL_NAME)")
|
||||
endif
|
||||
|
||||
techpack-header-dirs := $(shell find $(srctree)/techpack -maxdepth 1 -mindepth 1 -type d -not -name ".*")
|
||||
header-${TECHPACK} += $(addsuffix /include/uapi/,$(subst $(srctree)/techpack/,,$(techpack-header-dirs)))
|
||||
Reference in new issue
Block a user