Skip to content

Commit ef0791e

Browse files
author
pswbuild
committed
Synchronize code for OnePlus CPH2745_16.0.3.501(EX01) CPH2747_16.0.3.501(EX01) PLK110_16.0.3.503(CN01)
Based on QCOM release TAG:android16-6.12-2025-06_r40
1 parent 16099f8 commit ef0791e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

scripts/Makefile.vmlinux

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,29 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
3939
cmd_link_vmlinux = \
4040
$< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)"; \
4141
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
42-
42+
vnd_root_dir := $(patsubst %/vnd/%,%,$(word 1,$(subst /vnd/, ,$(srctree))))/vnd
43+
kernel_version := kernel-$(shell echo $(KERNELVERSION) | cut -d. -f1-2)
44+
mtk_gki_vmlinux_file := $(vnd_root_dir)/vendor/aosp_gki/$(kernel_version)/aarch64/gki/vmlinux
45+
qcom_gki_vmlinux_file := $(vnd_root_dir)/kernel_platform/oplus/platform/aosp_gki/gki/vmlinux
46+
ifneq ($(wildcard $(qcom_gki_vmlinux_file)),)
47+
gki_vmlinux_path := $(qcom_gki_vmlinux_file)
48+
else ifneq ($(wildcard $(mtk_gki_vmlinux_file)),)
49+
gki_vmlinux_path := $(mtk_gki_vmlinux_file)
50+
else
51+
$(warning gki vmlinux files is not found!)
52+
endif
4353
targets += vmlinux
4454
vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
4555
+$(call if_changed_dep,link_vmlinux)
4656
$(Q)cp $(objtree)/vmlinux $(objtree)/vmlinux_oki
57+
ifneq ($(and $(filter user,$(TARGET_BUILD_VARIANT)),$(gki_vmlinux_path)),)
58+
ifeq ($(filter no oki ogki,$(OPLUS_USE_PREBUILT_BOOTIMAGE)),)
59+
$(Q)echo "Using GKI vmlinux from: $(gki_vmlinux_path)"
60+
$(Q)cp $(gki_vmlinux_path) $(objtree)/vmlinux
61+
else
62+
$(Q)echo "Skipping GKI vmlinux copy for OPLUS_USE_PREBUILT_BOOTIMAGE: $(OPLUS_USE_PREBUILT_BOOTIMAGE)"
63+
endif
64+
endif
4765

4866
# module.builtin.ranges
4967
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)