fogona:vibrator bring up for driver after resolved build error

add MODULE_KERNEL_VERSION config
modify Makefile adaptation kernel 5.15

Change-Id: I1f1bdc754628ce5e64d55c81765256d24b4c493c
Reviewed-on: https://gerrit.mot.com/2677106
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
longc 2023-07-15 16:23:29 +08:00 • committed by longc156
commit 3ca9c84195
2 changed files with 20 additions and 0 deletions

View file

@ -5,6 +5,8 @@ ifeq ($(VIBRATOR_NOISE_CAMERA), true)
KBUILD_OPTIONS += CONFIG_VIBRATOR_NOISE_CAMERA=y
endif
KBUILD_OPTIONS += MODULE_KERNEL_VERSION=$(TARGET_KERNEL_VERSION)
include $(CLEAR_VARS)
LOCAL_MODULE := ldo_vibrator_mmi.ko
LOCAL_MODULE_TAGS := optional

View file

@ -1,3 +1,20 @@
ifeq ($(strip $(MODULE_KERNEL_VERSION)), 5.15)
all: modules
modules:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
%:
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
clean:
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
rm -rf .tmp_versions
else
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
all:
@ -8,3 +25,4 @@ modules_install:
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
endif