twrp-depmod: only run when TW_LOAD_VENDOR_MODULES is set (2/2)

Change-Id: Id9519c8fb38c7033eb1b34b70f97051e04cb5647
This commit is contained in:
Captain Throwback
2022-04-14 19:50:46 -04:00
committed by bigbiff
parent 5aa96d0ee6
commit 5a109b76f3
+4 -1
View File
@@ -373,12 +373,13 @@ endif # BOARD_INCLUDE_DTB_IN_BOOTIMG
endif # FULL_KERNEL_BUILD
ifneq ($(TW_LOAD_VENDOR_MODULES),)
define twrp-depmod
@echo "calling depmod on prebuilt modules"
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/vendor/lib/modules/1.1
$(DEPMOD) -b $(TARGET_RECOVERY_ROOT_OUT)/vendor 1.1
endef
endif
## Install it
ifeq ($(NEEDS_KERNEL_COPY),true)
@@ -386,9 +387,11 @@ file := $(INSTALLED_KERNEL_TARGET)
ALL_PREBUILT += $(file)
$(file) : $(KERNEL_BIN) | $(ACP) | $(DEPMOD)
$(transform-prebuilt-to-target)
ifneq ($(TW_LOAD_VENDOR_MODULES),)
ifdef TARGET_PREBUILT_KERNEL
$(call twrp-depmod)
endif
endif
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
endif